GCC Middle and Back End API Reference
|
#include <context.h>
Public Member Functions | |
column_policy (const context &dc) | |
int | converted_column (expanded_location s) const |
label_text | get_location_text (const expanded_location &s, bool show_column, bool colorize) const |
int | get_tabstop () const |
Private Attributes | |
file_cache & | m_file_cache |
column_options | m_column_options |
A bundle of state for determining column numbers in diagnostics (tab stops, whether to start at 0 or 1, etc). Uses a file_cache to handle tabs.
diagnostics::column_policy::column_policy | ( | const context & | dc | ) |
References m_column_options, and m_file_cache.
int diagnostics::column_policy::converted_column | ( | expanded_location | s | ) | const |
Given an expanded_location, convert the column (which is in 1-based bytes) to the requested units and origin. Return -1 if the column is invalid (<= 0).
References m_column_options, and m_file_cache.
Referenced by get_location_text(), and diagnostics::html_builder::make_element_for_diagnostic().
label_text diagnostics::column_policy::get_location_text | ( | const expanded_location & | s, |
bool | show_column, | ||
bool | colorize ) const |
Return a string describing a location e.g. "foo.c:42:10".
References build_message_string(), colorize_start(), colorize_stop(), converted_column(), diagnostics::text_sink::maybe_line_and_column(), progname, and special_fname_builtin().
Referenced by diagnostics::default_start_span_fn< to_text >(), diagnostics::text_sink::get_location_text(), and diagnostics::to_text::layout_printer< to_text >.
|
inline |
References m_column_options.
|
private |
Referenced by column_policy(), converted_column(), and get_tabstop().
|
private |
Referenced by column_policy(), and converted_column().