GCC Middle and Back End API Reference
|
#include <diagnostic.h>
Public Member Functions | |
diagnostic_column_policy (const diagnostic_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 |
enum diagnostics_column_unit | m_column_unit |
int | m_column_origin |
int | m_tabstop |
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.
diagnostic_column_policy::diagnostic_column_policy | ( | const diagnostic_context & | dc | ) |
References m_column_origin, m_column_unit, m_file_cache, and m_tabstop.
int diagnostic_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 convert_column_unit(), m_column_origin, m_column_unit, m_file_cache, and m_tabstop.
Referenced by get_location_text(), and json_from_expanded_location().
label_text diagnostic_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(), maybe_line_and_column(), progname, and special_fname_builtin().
Referenced by default_diagnostic_start_span_fn(), and diagnostic_text_output_format::get_location_text().
|
inline |
References m_tabstop.
|
private |
Referenced by converted_column(), and diagnostic_column_policy().
|
private |
Referenced by converted_column(), and diagnostic_column_policy().
|
private |
Referenced by converted_column(), and diagnostic_column_policy().
|
private |
Referenced by converted_column(), diagnostic_column_policy(), and get_tabstop().