GCC Middle and Back End API Reference
|
#include <context.h>
Data Structures | |
struct | urlifier_stack_node |
Public Types | |
typedef void(* | set_locations_callback_t) (const context &, diagnostic_info *) |
Data Fields | |
bool | m_show_column |
bool | m_pedantic_errors |
bool | m_permissive |
bool | m_inhibit_warnings |
bool | m_warn_system_headers |
void * | m_client_aux_data |
location_t | m_last_location |
Private Member Functions | |
void | error_recursion () ATTRIBUTE_NORETURN |
bool | diagnostic_enabled (diagnostic_info *diagnostic) |
void | get_any_inlining_info (diagnostic_info *diagnostic) |
void | check_max_errors (bool flush) |
void | action_after_output (enum kind diag_kind) |
void | inhibit_notes_in_group (bool inhibit=true) |
bool | notes_inhibited_in_group () const |
Friends | |
class | source_print_policy |
class | text_sink |
class | buffer |
text_starter_fn & | text_starter (context *dc) |
start_span_fn< to_text > & | start_span (context *dc) |
text_finalizer_fn & | text_finalizer (context *dc) |
This class encapsulates the state of the diagnostics subsystem as a whole (either directly, or via owned objects of other classes, to avoid global variables). It has responsibility for: - being a central place for clients to report diagnostics - reporting those diagnostics to zero or more output sinks (e.g. text vs SARIF) - providing a "dump" member function for a debug dump of the state of the diagnostics subsytem - direct vs buffered diagnostics (see class diagnostics::buffer) - tracking the original argv of the program (for SARIF output) - crash-handling It delegates responsibility to various other classes: - the various output sinks (instances of diagnostics::sink subclasses) - formatting of messages (class pretty_printer) - an optional urlifier to inject URLs into formatted messages - counting the number of diagnostics reported of each kind (class diagnostics::counters) - calling out to a option_id_manager to determine if a particular warning is enabled or disabled - tracking pragmas that enable/disable warnings in a range of source code - a cache for use when quoting the user's source code (class file_cache) - a text_art::theme - a diagnostics::changes::change_set for generating patches from fix-it hints - diagnostics::client_data_hooks for metadata. Try to avoid adding new responsibilities to this class itself, to avoid the "blob" anti-pattern.
typedef void(* diagnostics::context::set_locations_callback_t) (const context &, diagnostic_info *) |
|
private |
Take any action which is expected to happen after the diagnostic is written out. This function does not always return.
References diagnostics::bt_callback(), bt_err_callback(), count, FATAL_EXIT_CODE, finish(), fnotice(), gcc_unreachable, ICE_EXIT_CODE, m_abort_on_error, m_fatal_errors, m_report_bug, and real_abort().
Referenced by error_recursion(), flush_diagnostic_buffer(), and report_diagnostic().
void diagnostics::context::add_sink | ( | std::unique_ptr< sink > | sink_ | ) |
void diagnostics::context::begin_group | ( | ) |
class diagnostics::context.
References m_diagnostic_groups.
Referenced by diagnostic_report_diagnostic(), emit_diagnostic_with_group(), and emit_diagnostic_with_group_va().
char * diagnostics::context::build_indent_prefix | ( | ) | const |
|
private |
Check if we've met the maximum error limit, and if so fatally exit with a message. FLUSH indicates whether a diagnostics::context::finish call is needed.
References count, diagnostic_count(), FATAL_EXIT_CODE, finish(), fnotice(), and m_max_errors.
Referenced by flush_diagnostic_buffer(), and report_diagnostic().
|
inline |
References classify_diagnostic(), diagnostics::logging::log_function_params::log_param_kind(), diagnostics::logging::log_function_params::log_param_location_t(), diagnostics::logging::log_function_params::log_param_option_id(), m_logger, and m_option_classifier.
Referenced by classify_diagnostic(), and diagnostic_classify_diagnostic().
void diagnostics::context::clear_diagnostic_buffer | ( | buffer & | buffer_ | ) |
Clear BUFFER_ without flushing it.
References buffer, diagnostics::counters::clear(), diagnostics::buffer::m_diagnostic_counters, m_last_location, diagnostics::buffer::m_per_sink_buffers, and UNKNOWN_LOCATION.
|
inline |
References m_reference_printer.
void diagnostics::context::color_init | ( | int | value | ) |
Maybe initialize the color support. We require clients to do this explicitly, since most clients don't want color. When called without a VALUE, it initializes with DIAGNOSTICS_COLOR_DEFAULT.
References colorize_init(), DIAGNOSTICS_COLOR_AUTO, m_reference_printer, m_sinks, and pp_show_color().
Referenced by diagnostic_color_init().
|
inline |
References m_diagnostic_counters.
Referenced by check_max_errors(), execution_failed_p(), and report_diagnostic().
|
inline |
References m_diagnostic_counters.
|
private |
Returns whether a DIAGNOSTIC should be printed, and adjusts diagnostic->kind as appropriate for #pragma GCC diagnostic and -Werror=foo.
References diagnostics::any, get_any_inlining_info(), m_opt_permissive, m_option_classifier, option_enabled_p(), and option_unspecified_p().
Referenced by report_diagnostic(), and warning_enabled_at().
bool diagnostics::context::diagnostic_impl | ( | rich_location * | richloc, |
const metadata * | metadata, | ||
option_id | opt_id, | ||
const char * | gmsgid, | ||
va_list * | ap, | ||
enum kind | kind ) |
Implement emit_diagnostic, inform, warning, warning_at, pedwarn, permerror, error, error_at, error_at, sorry, fatal_error, internal_error, and internal_error_no_backtrace, as documented and defined below.
References ap, diagnostic_set_info(), diagnostics::logging::log_function_params::log_param_kind(), diagnostics::logging::log_function_params::log_param_option_id(), diagnostics::logging::log_function_params::log_param_string(), diagnostics::option_id::m_idx, m_logger, diagnostic::m_metadata, m_opt_permissive, m_permissive, and report_diagnostic().
Referenced by emit_diagnostic_with_group_va().
bool diagnostics::context::diagnostic_n_impl | ( | rich_location * | richloc, |
const metadata * | metadata, | ||
option_id | opt_id, | ||
unsigned HOST_WIDE_INT | n, | ||
const char * | singular_gmsgid, | ||
const char * | plural_gmsgid, | ||
va_list * | ap, | ||
enum kind | kind ) |
Implement inform_n, warning_n, and error_n, as documented and defined below.
References ap, diagnostic_set_info_translated(), diagnostics::logging::log_function_params::log_param_kind(), diagnostics::logging::log_function_params::log_param_option_id(), diagnostics::logging::log_function_params::log_params_n_gmsgids(), m_logger, diagnostic::m_metadata, ngettext, report_diagnostic(), and ULONG_MAX.
|
inline |
References DEBUG_FUNCTION, and dump().
void diagnostics::context::dump | ( | FILE * | outfile, |
int | indent ) const |
Dump state of this diagnostics::context to OUT, for debugging.
References diagnostics::dumping::emit_heading(), diagnostics::dumping::emit_indent(), diagnostics::dumping::emit_none(), i, m_diagnostic_buffer, m_diagnostic_counters, m_file_cache, m_reference_printer, and m_sinks.
bool diagnostics::context::emit_diagnostic_with_group | ( | enum kind kind | , |
rich_location & | richloc, | ||
const metadata * | metadata, | ||
option_id | opt_id, | ||
const char * | gmsgid, | ||
... ) |
Emit a diagnostic within a diagnostic group on this context.
References ap, begin_group(), emit_diagnostic_with_group_va(), and end_group().
Referenced by diagnostics::open_html_output_file(), and diagnostics::output_file::try_to_open().
bool diagnostics::context::emit_diagnostic_with_group_va | ( | enum kind kind | , |
rich_location & | richloc, | ||
const metadata * | metadata, | ||
option_id | opt_id, | ||
const char * | gmsgid, | ||
va_list * | ap ) |
As above, but taking a va_list *.
References ap, begin_group(), diagnostic_impl(), and end_group().
Referenced by emit_diagnostic_with_group().
void diagnostics::context::emit_diagram | ( | const diagram & | diag | ) |
Emit DIAGRAM to this context, respecting the output format.
References m_diagrams, and m_sinks.
void diagnostics::context::end_group | ( | ) |
References DIAGNOSTICS_LOG_SCOPE_PRINTF0, get_logger(), inhibit_notes_in_group(), m_diagnostic_groups, and m_sinks.
Referenced by diagnostic_report_diagnostic(), emit_diagnostic_with_group(), emit_diagnostic_with_group_va(), and finish().
|
private |
Inform the user that an error occurred while trying to report some other error. This indicates catastrophic internal inconsistencies, so give up now. But do try to flush out the previous error. This mustn't use internal_error, that will cause infinite recursion.
References action_after_output(), fnotice(), m_lock, m_reference_printer, pp_newline_and_flush(), and real_abort().
Referenced by report_diagnostic().
bool diagnostics::context::execution_failed_p | ( | ) | const |
Return true if sufficiently severe diagnostics have been seen that we ought to exit with a non-zero exit code.
References diagnostic_count().
Referenced by diagnostics::sarif_invocation::prepare_to_flush().
void diagnostics::context::finish | ( | ) |
Do any cleaning up required after the last diagnostic is emitted.
References dump(), end_group(), m_client_data_hooks, m_diagnostic_groups, m_diagrams, m_file_cache, m_fixits_change_set, m_logger, m_option_classifier, m_option_id_mgr, m_original_argv, m_reference_printer, m_sinks, m_urlifier_stack, pop_urlifier(), and set_diagnostic_buffer().
Referenced by action_after_output(), check_max_errors(), and diagnostic_finish().
void diagnostics::context::flush_diagnostic_buffer | ( | buffer & | buffer_ | ) |
Flush the diagnostics in BUFFER_ to this context, clearing BUFFER_.
References action_after_output(), buffer, check_max_errors(), diagnostics::buffer::diagnostic_count(), diagnostics::buffer::m_diagnostic_counters, m_diagnostic_counters, diagnostics::buffer::m_per_sink_buffers, and diagnostics::counters::move_to().
|
private |
Update the inlining info in this context for a DIAGNOSTIC.
References diagnostic_location(), in_system_header_at(), and m_set_locations_cb.
Referenced by diagnostic_enabled().
|
inline |
References m_option_classifier.
|
inline |
References m_client_data_hooks.
Referenced by diagnostics::sarif_invocation::prepare_to_flush(), and diagnostics::sarif_builder::sarif_builder().
|
inline |
References m_column_options.
Referenced by common_handle_option(), and report_diagnostic().
|
inline |
References m_column_options.
|
inline |
References buffer, and m_diagnostic_buffer.
References m_diagnostic_groups.
Referenced by diagnostics::sarif_result::on_nested_diagnostic().
|
inline |
References m_diagrams.
Referenced by diagnostics::use_unicode_p().
|
inline |
References m_escape_format.
|
inline |
References gcc_assert, and m_file_cache.
Referenced by report_diagnostic().
|
inline |
References m_fixits_change_set.
|
inline |
References m_lang_mask.
|
inline |
References m_logger.
Referenced by end_group(), handle_OPT_fdiagnostics_add_output_(), handle_OPT_fdiagnostics_set_output_(), and report_diagnostic().
const logical_locations::manager * diagnostics::context::get_logical_location_manager | ( | ) | const |
References m_client_data_hooks.
|
inline |
References m_original_argv.
|
inline |
References m_path_format.
|
inline |
sink & diagnostics::context::get_sink | ( | size_t | idx | ) | const |
References gcc_assert, and m_sinks.
|
inline |
|
inline |
References m_source_printing.
const urlifier * diagnostics::context::get_urlifier | ( | ) | const |
References m_urlifier_stack.
|
inline |
References m_inhibit_notes_p.
State whether we should inhibit notes in the current diagnostic_group and its future children if any.
References gcc_assert, and m_diagnostic_groups.
Referenced by end_group(), pop_nesting_level(), and report_diagnostic().
void diagnostics::context::initialize | ( | int | n_opts | ) |
Initialize the diagnostic message outputting machinery.
References diagnostics::default_start_span_fn(), diagnostics::default_text_finalizer(), diagnostics::default_text_starter(), DIAGNOSTICS_COLUMN_UNIT_DISPLAY, DIAGNOSTICS_ESCAPE_FORMAT_UNICODE, DIAGNOSTICS_TEXT_ART_CHARSET_ASCII, DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI, DPF_NONE, EXTRA_DIAGNOSTIC_OUTPUT_fixits_v1, EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2, EXTRA_DIAGNOSTIC_OUTPUT_none, fopen, get_reference_printer(), i, m_abort_on_error, m_adjust_diagnostic_info, m_client_aux_data, m_client_data_hooks, m_column_options, m_diagnostic_buffer, m_diagnostic_counters, m_diagnostic_groups, m_diagrams, m_escape_format, m_extra_output_kind, m_fatal_errors, m_file_cache, m_fixits_change_set, m_inhibit_notes_p, m_inhibit_warnings, m_internal_error, m_last_location, m_lock, m_logger, m_max_errors, m_n_opts, m_opt_permissive, m_option_classifier, m_option_id_mgr, m_original_argv, m_path_format, m_pedantic_errors, m_permissive, m_reference_printer, m_report_bug, m_set_locations_cb, m_show_column, m_show_cwe, m_show_option_requested, m_show_path_depths, m_show_rules, m_sinks, m_source_printing, m_text_callbacks, m_urlifier_stack, m_warn_system_headers, m_warning_as_error_requested, pp_line_cutoff(), set_caret_max_width(), set_text_art_charset(), text_sink, and UNKNOWN_LOCATION.
Referenced by diagnostic_initialize().
void diagnostics::context::initialize_fixits_change_set | ( | ) |
References gcc_assert, m_file_cache, and m_fixits_change_set.
void diagnostics::context::initialize_input_context | ( | diagnostic_input_charset_callback | ccb, |
bool | should_skip_bom ) |
Create the file_cache, if not already created, and tell it how to translate files on input.
References m_file_cache.
Referenced by diagnostic_initialize_input_context().
|
inline |
References m_option_id_mgr.
|
inline |
References m_option_id_mgr.
void diagnostics::context::maybe_show_locus | ( | const rich_location & | richloc, |
const source_printing_options & | opts, | ||
enum kind | diagnostic_kind, | ||
pretty_printer & | pp, | ||
source_effect_info * | effects ) |
As per diagnostics::source_print_policy::print, but don't print anything if source printing is disabled, or if the location hasn't changed.
References BUILTINS_LOCATION, diagnostics::source_printing_options::enabled, m_last_location, diagnostics::source_print_policy::print(), and source_print_policy.
Referenced by diagnostic_show_locus().
void diagnostics::context::maybe_show_locus_as_html | ( | const rich_location & | richloc, |
const source_printing_options & | opts, | ||
enum kind | diagnostic_kind, | ||
xml::printer & | xp, | ||
source_effect_info * | effects, | ||
html_label_writer * | label_writer ) |
As above, but print in HTML form to XP. If non-null, use LABEL_WRITER when writing labelled ranges.
References BUILTINS_LOCATION, diagnostics::source_printing_options::enabled, m_last_location, diagnostics::source_print_policy::print_as_html(), and source_print_policy.
Referenced by diagnostic_show_locus_as_html().
|
private |
Return whether notes must be inhibited in the current diagnostic_group.
References m_diagnostic_groups.
Referenced by report_diagnostic().
References m_option_id_mgr.
Referenced by diagnostics::option_classifier::classify_diagnostic(), and diagnostic_enabled().
References m_option_classifier.
Referenced by diagnostic_enabled().
|
inline |
References m_option_classifier.
|
inline |
References m_option_classifier.
|
inline |
References diagnostics::logging::log_function_params::log_param_location_t(), m_logger, and m_option_classifier.
Referenced by diagnostic_pop_diagnostics().
void diagnostics::context::pop_nesting_level | ( | ) |
References inhibit_notes_in_group(), and m_diagnostic_groups.
void diagnostics::context::pop_urlifier | ( | ) |
References gcc_assert, diagnostics::context::urlifier_stack_node::m_owned, diagnostics::context::urlifier_stack_node::m_urlifier, and m_urlifier_stack.
Referenced by finish().
void diagnostics::context::push_borrowed_urlifier | ( | const urlifier & | loan | ) |
References gcc_assert, and m_urlifier_stack.
|
inline |
References diagnostics::logging::log_function_params::log_param_location_t(), m_logger, and m_option_classifier.
Referenced by diagnostic_push_diagnostics().
void diagnostics::context::push_nesting_level | ( | ) |
References m_diagnostic_groups.
void diagnostics::context::push_owned_urlifier | ( | std::unique_ptr< urlifier > | ptr | ) |
References gcc_assert, and m_urlifier_stack.
void diagnostics::context::refresh_output_sinks | ( | ) |
Give all output sinks a chance to rebuild their pretty_printer.
References m_sinks.
Referenced by set_pretty_printer().
void diagnostics::context::remove_all_output_sinks | ( | ) |
References m_sinks.
Referenced by set_sink().
bool diagnostics::context::report_diagnostic | ( | diagnostic_info * | diagnostic | ) |
Report a diagnostic message (an error or a warning) as specified by this diagnostics::context. front-end independent format specifiers are exactly those described in the documentation of output_format. Return true if a diagnostic was printed, false otherwise.
References action_after_output(), check_max_errors(), diagnostic_count(), diagnostic_enabled(), diagnostic_location(), DIAGNOSTICS_COLUMN_UNIT_BYTE, DIAGNOSTICS_COLUMN_UNIT_DISPLAY, DIAGNOSTICS_LOG_SCOPE_PRINTF0, error_recursion(), expand_location(), EXTRA_DIAGNOSTIC_OUTPUT_fixits_v1, EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2, fnotice(), gcc_assert, get_column_options(), get_file_cache(), get_logger(), ICE_EXIT_CODE, inhibit_notes_in_group(), m_abort_on_error, m_adjust_diagnostic_info, diagnostics::counters::m_count_for_kind, m_diagnostic_buffer, m_diagnostic_counters, m_diagnostic_groups, m_extra_output_kind, m_fixits_change_set, m_inhibit_notes_p, m_inhibit_warnings, m_internal_error, m_lock, m_logger, m_pedantic_errors, m_reference_printer, m_sinks, m_warn_system_headers, m_warning_as_error_requested, notes_inhibited_in_group(), pp_flush(), pp_format(), pp_newline_and_flush(), diagnostics::print_parseable_fixits(), and va_copy.
Referenced by diagnostic_impl(), diagnostic_n_impl(), and diagnostic_report_diagnostic().
void diagnostics::context::report_global_digraph | ( | const lazily_created< digraphs::digraph > & | ldg | ) |
References m_sinks.
void diagnostics::context::report_verbatim | ( | text_info & | text | ) |
References m_sinks, diagnostics::logical_locations::text, and va_copy.
|
inline |
References m_abort_on_error.
Referenced by setup_core_dumping().
|
inline |
References m_adjust_diagnostic_info.
void diagnostics::context::set_caret_max_width | ( | int | value | ) |
Set caret_max_width to value.
References get_reference_printer(), get_terminal_width(), INT_MAX, m_source_printing, and pp_buffer().
Referenced by common_handle_option(), and initialize().
void diagnostics::context::set_client_data_hooks | ( | std::unique_ptr< client_data_hooks > | hooks | ) |
References m_client_data_hooks.
Referenced by tree_diagnostics_defaults().
void diagnostics::context::set_diagnostic_buffer | ( | buffer * | buffer_ | ) |
Methods fns of diagnostics::context relating to buffering.
If BUFFER_ is non-null, use BUFFER as the active diagnostics::buffer on this context. BUFFER is borrowed. If BUFFER_ is null, stop any buffering on this context until the next call to this function.
References buffer, diagnostics::buffer::ensure_per_sink_buffers(), gcc_assert, m_diagnostic_buffer, m_diagnostic_groups, diagnostics::buffer::m_per_sink_buffers, and m_sinks.
Referenced by finish().
|
inline |
References m_escape_format.
Referenced by common_handle_option(), and diagnostics::sarif_builder::make_location_object().
|
inline |
References m_extra_output_kind.
Referenced by common_handle_option().
|
inline |
References m_fatal_errors.
Referenced by common_handle_option().
void diagnostics::context::set_format_decoder | ( | printer_fn | format_decoder | ) |
Set FORMAT_DECODER on the reference printer and on the pretty_printer of all output sinks.
References m_reference_printer, m_sinks, and pp_format_decoder().
Referenced by tree_diagnostics_defaults().
|
inline |
References m_internal_error.
void diagnostics::context::set_main_input_filename | ( | const char * | filename | ) |
References m_sinks.
Referenced by diagnostic_manager_set_analysis_target().
|
inline |
References m_max_errors.
Referenced by common_handle_option().
void diagnostics::context::set_nesting_level | ( | int | new_level | ) |
References m_diagnostic_groups.
void diagnostics::context::set_option_id_manager | ( | std::unique_ptr< option_id_manager > | option_id_mgr, |
unsigned | lang_mask ) |
References m_lang_mask, and m_option_id_mgr.
void diagnostics::context::set_original_argv | ( | unique_argv | original_argv | ) |
References m_original_argv, and unique_argv::release().
|
inline |
References m_path_format.
Referenced by common_handle_option().
|
inline |
References m_opt_permissive.
void diagnostics::context::set_prefixing_rule | ( | diagnostic_prefixing_rule_t | rule | ) |
References m_reference_printer, m_sinks, and pp_prefixing_rule().
Referenced by common_handle_option().
void diagnostics::context::set_pretty_printer | ( | std::unique_ptr< pretty_printer > | pp | ) |
Set PP as the reference printer for this context. Refresh all output sinks.
References m_reference_printer, and refresh_output_sinks().
|
inline |
References m_report_bug.
Referenced by common_handle_option().
|
inline |
References m_set_locations_cb.
Referenced by tree_diagnostics_defaults().
|
inline |
References m_show_cwe.
Referenced by common_handle_option().
void diagnostics::context::set_show_highlight_colors | ( | bool | val | ) |
References m_reference_printer, m_sinks, and pp_show_highlight_colors().
Referenced by common_handle_option(), and driver_handle_option().
void diagnostics::context::set_show_nesting | ( | bool | val | ) |
References m_sinks.
Referenced by common_handle_option().
void diagnostics::context::set_show_nesting_levels | ( | bool | val | ) |
References m_sinks.
Referenced by common_handle_option().
void diagnostics::context::set_show_nesting_locations | ( | bool | val | ) |
References m_sinks.
Referenced by common_handle_option().
|
inline |
References m_show_option_requested.
Referenced by common_handle_option().
|
inline |
References m_show_path_depths.
Referenced by common_handle_option().
|
inline |
References m_show_rules.
Referenced by common_handle_option().
void diagnostics::context::set_sink | ( | std::unique_ptr< sink > | sink_ | ) |
References DIAGNOSTICS_LOG_SCOPE_PRINTF0, m_logger, m_sinks, and remove_all_output_sinks().
Referenced by handle_OPT_fdiagnostics_set_output_(), and diagnostics::init_sarif_sink().
void diagnostics::context::set_text_art_charset | ( | enum diagnostic_text_art_charset | charset | ) |
Initialize this context's m_diagrams based on CHARSET. Specifically, make a text_art::theme object for m_diagrams.m_theme, (or nullptr for "no diagrams").
References DIAGNOSTICS_TEXT_ART_CHARSET_ASCII, DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI, DIAGNOSTICS_TEXT_ART_CHARSET_NONE, DIAGNOSTICS_TEXT_ART_CHARSET_UNICODE, gcc_unreachable, and m_diagrams.
Referenced by common_handle_option(), driver_handle_option(), and initialize().
|
inline |
References m_warning_as_error_requested.
Referenced by common_handle_option().
|
inline |
References m_show_path_depths.
Referenced by diagnostics::print_path_as_html().
bool diagnostics::context::supports_fnotice_on_stderr_p | ( | ) | const |
Return true if there are no machine-readable formats writing to stderr.
References m_sinks.
void diagnostics::context::urls_init | ( | int | value | ) |
Initialize URL support within this context based on VALUE, handling "auto".
References determine_url_format(), DIAGNOSTICS_URL_AUTO, m_reference_printer, and m_sinks.
Referenced by diagnostic_urls_init().
|
inline |
References m_warning_as_error_requested.
Returns whether warning OPT_ID is enabled at LOC.
References diagnostic_enabled(), diagnostic_report_warnings_p, and line_table.
|
friend |
References buffer.
Referenced by buffer, clear_diagnostic_buffer(), flush_diagnostic_buffer(), get_diagnostic_buffer(), and set_diagnostic_buffer().
|
friend |
References source_print_policy.
Referenced by maybe_show_locus(), maybe_show_locus_as_html(), and source_print_policy.
|
friend |
Client supplied function called between disjoint spans of source code, so that the context can print something to indicate that a new span of source code has begun.
References m_text_callbacks, and m_text_start_span.
|
friend |
Client supplied function called after a diagnostic message is displayed (for text-based diagnostic output).
References m_end_diagnostic, and m_text_callbacks.
|
friend |
References text_sink.
Referenced by initialize(), and text_sink.
|
friend |
Client supplied function to announce a diagnostic (for text-based diagnostic output).
References m_begin_diagnostic, and m_text_callbacks.
|
private |
Referenced by action_after_output(), initialize(), report_diagnostic(), and set_abort_on_error().
|
private |
Referenced by initialize(), report_diagnostic(), and set_adjust_diagnostic_info_callback().
text_starter_fn diagnostics::context::m_begin_diagnostic |
Referenced by text_starter.
void* diagnostics::context::m_client_aux_data |
Referenced by initialize().
|
private |
Referenced by finish(), get_client_data_hooks(), get_logical_location_manager(), initialize(), and set_client_data_hooks().
|
private |
Referenced by get_column_options(), get_column_options(), and initialize().
|
private |
Referenced by dump(), get_diagnostic_buffer(), initialize(), report_diagnostic(), and set_diagnostic_buffer().
|
private |
Referenced by diagnostic_count(), diagnostic_count(), dump(), flush_diagnostic_buffer(), initialize(), and report_diagnostic().
struct { ... } diagnostics::context::m_diagnostic_groups |
int diagnostics::context::m_diagnostic_nesting_level |
struct { ... } diagnostics::context::m_diagrams |
Referenced by emit_diagram(), finish(), get_diagram_theme(), initialize(), and set_text_art_charset().
int diagnostics::context::m_emission_count |
text_finalizer_fn diagnostics::context::m_end_diagnostic |
Referenced by text_finalizer.
|
private |
Referenced by get_escape_format(), initialize(), and set_escape_format().
|
private |
Referenced by initialize(), report_diagnostic(), and set_extra_output_kind().
|
private |
Referenced by action_after_output(), initialize(), and set_fatal_errors().
|
private |
Referenced by dump(), finish(), get_file_cache(), initialize(), initialize_fixits_change_set(), and initialize_input_context().
|
private |
Referenced by finish(), get_fixits_change_set(), initialize(), initialize_fixits_change_set(), and report_diagnostic().
int diagnostics::context::m_group_nesting_depth |
start_span_fn<to_html> diagnostics::context::m_html_start_span |
|
private |
Referenced by diagnostics::text_sink::append_note(), inhibit_notes(), initialize(), and report_diagnostic().
bool diagnostics::context::m_inhibit_warnings |
Referenced by common_handle_option(), initialize(), and report_diagnostic().
int diagnostics::context::m_inhibiting_notes_from |
|
private |
Referenced by initialize(), report_diagnostic(), and set_internal_error_callback().
|
private |
Referenced by get_lang_mask(), and set_option_id_manager().
location_t diagnostics::context::m_last_location |
Referenced by clear_diagnostic_buffer(), initialize(), maybe_show_locus(), and maybe_show_locus_as_html().
|
private |
Referenced by error_recursion(), initialize(), and report_diagnostic().
|
private |
|
private |
Referenced by check_max_errors(), initialize(), and set_max_errors().
|
private |
Referenced by initialize().
|
private |
Referenced by diagnostic_enabled(), diagnostic_impl(), initialize(), and set_permissive_option().
|
private |
|
private |
Referenced by finish(), initialize(), make_option_name(), make_option_url(), option_enabled_p(), and set_option_id_manager().
|
private |
Referenced by finish(), get_original_argv(), initialize(), and set_original_argv().
|
private |
Referenced by get_path_format(), initialize(), and set_path_format().
bool diagnostics::context::m_pedantic_errors |
Referenced by common_handle_option(), initialize(), and report_diagnostic().
bool diagnostics::context::m_permissive |
Referenced by diagnostic_impl(), and initialize().
|
private |
|
private |
Referenced by action_after_output(), initialize(), and set_report_bug().
|
private |
Referenced by get_any_inlining_info(), initialize(), and set_set_locations_callback().
bool diagnostics::context::m_show_column |
|
private |
Referenced by initialize(), and set_show_cwe().
|
private |
Referenced by initialize(), and set_show_option_requested().
|
private |
Referenced by initialize(), set_show_path_depths(), and show_path_depths_p().
|
private |
Referenced by initialize(), and set_show_rules().
Referenced by add_sink(), color_init(), dump(), emit_diagram(), end_group(), finish(), get_sink(), initialize(), refresh_output_sinks(), remove_all_output_sinks(), report_diagnostic(), report_global_digraph(), report_verbatim(), set_diagnostic_buffer(), set_format_decoder(), set_main_input_filename(), set_prefixing_rule(), set_show_highlight_colors(), set_show_nesting(), set_show_nesting_levels(), set_show_nesting_locations(), set_sink(), supports_fnotice_on_stderr_p(), and urls_init().
|
private |
Referenced by get_source_printing_options(), get_source_printing_options(), initialize(), and set_caret_max_width().
struct { ... } diagnostics::context::m_text_callbacks |
Referenced by initialize(), start_span, text_finalizer, and text_starter.
start_span_fn<to_text> diagnostics::context::m_text_start_span |
Referenced by start_span.
text_art::theme* diagnostics::context::m_theme |
|
private |
Referenced by finish(), get_urlifier(), initialize(), pop_urlifier(), push_borrowed_urlifier(), and push_owned_urlifier().
bool diagnostics::context::m_warn_system_headers |
Referenced by common_handle_option(), initialize(), and report_diagnostic().
|
private |
Referenced by initialize(), report_diagnostic(), set_warning_as_error_requested(), and warning_as_error_requested_p().