GCC Middle and Back End API Reference
diagnostic_context Class Reference

#include <diagnostic.h>

Collaboration diagram for diagnostic_context:

Public Types

typedef void(* ice_handler_callback_t) (diagnostic_context *)
 
typedef void(* set_locations_callback_t) (diagnostic_context *, diagnostic_info *)
 

Public Member Functions

void initialize (int n_opts)
 
void color_init (int value)
 
void urls_init (int value)
 
void finish ()
 
void set_set_locations_callback (set_locations_callback_t cb)
 
void initialize_input_context (diagnostic_input_charset_callback ccb, bool should_skip_bom)
 
void begin_group ()
 
void end_group ()
 
bool warning_enabled_at (location_t loc, int opt)
 
bool option_unspecified_p (int opt) const
 
bool report_diagnostic (diagnostic_info *)
 
void report_current_module (location_t where)
 
void check_max_errors (bool flush)
 
void action_after_output (diagnostic_t diag_kind)
 
diagnostic_t classify_diagnostic (int option_index, diagnostic_t new_kind, location_t where)
 
void push_diagnostics (location_t where)
 
void pop_diagnostics (location_t where)
 
void maybe_show_locus (const rich_location &richloc, diagnostic_t diagnostic_kind, pretty_printer *pp, diagnostic_source_effect_info *effect_info)
 
void emit_diagram (const diagnostic_diagram &diagram)
 
const diagnostic_output_formatget_output_format () const
 
void set_output_format (diagnostic_output_format *output_format)
 
void set_text_art_charset (enum diagnostic_text_art_charset charset)
 
void set_client_data_hooks (diagnostic_client_data_hooks *hooks)
 
void set_urlifier (urlifier *)
 
void create_edit_context ()
 
void set_warning_as_error_requested (bool val)
 
void set_report_bug (bool val)
 
void set_extra_output_kind (enum diagnostics_extra_output_kind kind)
 
void set_show_cwe (bool val)
 
void set_show_rules (bool val)
 
void set_path_format (enum diagnostic_path_format val)
 
void set_show_path_depths (bool val)
 
void set_show_option_requested (bool val)
 
void set_max_errors (int val)
 
void set_escape_format (enum diagnostics_escape_format val)
 
void set_ice_handler_callback (ice_handler_callback_t cb)
 
bool warning_as_error_requested_p () const
 
bool show_path_depths_p () const
 
enum diagnostic_path_format get_path_format () const
 
enum diagnostics_escape_format get_escape_format () const
 
file_cacheget_file_cache () const
 
edit_contextget_edit_context () const
 
const diagnostic_client_data_hooksget_client_data_hooks ()
 
text_art::theme * get_diagram_theme () const
 
int converted_column (expanded_location s) const
 
int & diagnostic_count (diagnostic_t kind)
 
bool option_enabled_p (int option_index) const
 
charmake_option_name (int option_index, diagnostic_t orig_diag_kind, diagnostic_t diag_kind) const
 
charmake_option_url (int option_index) const
 
void set_option_hooks (diagnostic_option_enabled_cb option_enabled_cb, void *option_state, diagnostic_make_option_name_cb make_option_name_cb, diagnostic_make_option_url_cb make_option_url_cb, unsigned lang_mask)
 
unsigned get_lang_mask () const
 
label_text get_location_text (const expanded_location &s) const
 

Data Fields

pretty_printerprinter
 
bool m_abort_on_error
 
bool m_show_column
 
bool m_pedantic_errors
 
bool m_permissive
 
int m_opt_permissive
 
bool m_fatal_errors
 
bool m_inhibit_warnings
 
bool m_warn_system_headers
 
void(* m_internal_error )(diagnostic_context *, const char *, va_list *)
 
void(* m_print_path )(diagnostic_context *, const diagnostic_path *)
 
json::value *(* m_make_json_for_path )(diagnostic_context *, const diagnostic_path *)
 
voidm_client_aux_data
 
location_t m_last_location
 
bool m_inhibit_notes_p
 
diagnostic_source_printing_options m_source_printing
 
enum diagnostics_column_unit m_column_unit
 
int m_column_origin
 
int m_tabstop
 

Private Member Functions

bool includes_seen_p (const line_map_ordinary *map)
 
void print_any_cwe (const diagnostic_info &diagnostic)
 
void print_any_rules (const diagnostic_info &diagnostic)
 
void print_option_information (const diagnostic_info &diagnostic, diagnostic_t orig_diag_kind)
 
void show_any_path (const diagnostic_info &diagnostic)
 
void error_recursion () ATTRIBUTE_NORETURN
 
bool diagnostic_enabled (diagnostic_info *diagnostic)
 
void get_any_inlining_info (diagnostic_info *diagnostic)
 
void show_locus (const rich_location &richloc, diagnostic_t diagnostic_kind, pretty_printer *pp, diagnostic_source_effect_info *effect_info)
 

Private Attributes

file_cachem_file_cache
 
int m_diagnostic_count [DK_LAST_DIAGNOSTIC_KIND]
 
bool m_warning_as_error_requested
 
int m_n_opts
 
diagnostic_option_classifier m_option_classifier
 
bool m_show_cwe
 
bool m_show_rules
 
enum diagnostic_path_format m_path_format
 
bool m_show_path_depths
 
bool m_show_option_requested
 
int m_max_errors
 
struct { 
 
   diagnostic_starter_fn   m_begin_diagnostic 
 
   diagnostic_start_span_fn   m_start_span 
 
   diagnostic_finalizer_fn   m_end_diagnostic 
 
m_text_callbacks 
 
struct { 
 
   diagnostic_option_enabled_cb   m_option_enabled_cb 
 
   void *   m_option_state 
 
   diagnostic_make_option_name_cb   m_make_option_name_cb 
 
   diagnostic_make_option_url_cb   m_make_option_url_cb 
 
   unsigned   m_lang_mask 
 
m_option_callbacks 
 
urlifierm_urlifier
 
const line_map_ordinarym_last_module
 
int m_lock
 
bool m_report_bug
 
enum diagnostics_extra_output_kind m_extra_output_kind
 
enum diagnostics_escape_format m_escape_format
 
edit_contextm_edit_context_ptr
 
struct { 
 
   int   m_nesting_depth 
 
   int   m_emission_count 
 
m_diagnostic_groups 
 
diagnostic_output_formatm_output_format
 
set_locations_callback_t m_set_locations_cb
 
ice_handler_callback_t m_ice_handler_cb
 
hash_set< location_t, false, location_hash > * m_includes_seen
 
diagnostic_client_data_hooksm_client_data_hooks
 
struct { 
 
   text_art::theme *   m_theme 
 
m_diagrams 
 

Friends

diagnostic_starter_fndiagnostic_starter (diagnostic_context *context)
 
diagnostic_start_span_fndiagnostic_start_span (diagnostic_context *context)
 
diagnostic_finalizer_fndiagnostic_finalizer (diagnostic_context *context)
 

Detailed Description

This data structure bundles altogether any information relevant to
the context of a diagnostic message.   

Member Typedef Documentation

◆ ice_handler_callback_t

typedef void(* diagnostic_context::ice_handler_callback_t) (diagnostic_context *)

◆ set_locations_callback_t

typedef void(* diagnostic_context::set_locations_callback_t) (diagnostic_context *, diagnostic_info *)

Member Function Documentation

◆ action_after_output()

void diagnostic_context::action_after_output ( diagnostic_t diag_kind)
Take any action which is expected to happen after the diagnostic
is written out.  This function does not always return.   

References bt_callback(), bt_err_callback(), count, FATAL_EXIT_CODE, finish(), fnotice(), gcc_unreachable, ggc_alloc(), ICE_EXIT_CODE, m_abort_on_error, m_fatal_errors, m_ice_handler_cb, m_report_bug, NULL, and real_abort().

Referenced by diagnostic_action_after_output().

◆ begin_group()

void diagnostic_context::begin_group ( )
class diagnostic_context.   

Referenced by auto_diagnostic_group::auto_diagnostic_group().

◆ check_max_errors()

void diagnostic_context::check_max_errors ( bool flush)
Check if we've met the maximum error limit, and if so fatally exit
with a message.
FLUSH indicates whether a diagnostic_context::finish call is needed.   

References count, FATAL_EXIT_CODE, finish(), fnotice(), ggc_alloc(), m_diagnostic_count, and m_max_errors.

Referenced by diagnostic_check_max_errors().

◆ classify_diagnostic()

diagnostic_t diagnostic_context::classify_diagnostic ( int option_index,
diagnostic_t new_kind,
location_t where )
inline

◆ color_init()

void diagnostic_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, ggc_alloc(), pp_show_color, and printer.

Referenced by diagnostic_color_init().

◆ converted_column()

int diagnostic_context::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(), get_file_cache(), ggc_alloc(), m_column_origin, m_column_unit, and m_tabstop.

Referenced by get_location_text(), json_from_expanded_location(), and report_current_module().

◆ create_edit_context()

void diagnostic_context::create_edit_context ( )

References gcc_assert, m_edit_context_ptr, and m_file_cache.

Referenced by process_options().

◆ diagnostic_count()

int & diagnostic_context::diagnostic_count ( diagnostic_t kind)
inline

References m_diagnostic_count.

◆ diagnostic_enabled()

bool diagnostic_context::diagnostic_enabled ( diagnostic_info * diagnostic)
private
Returns whether a DIAGNOSTIC should be printed, and adjusts diagnostic->kind
as appropriate for #pragma GCC diagnostic and -Werror=foo.   

References DK_ANY, ggc_alloc(), option_unspecified_p(), and permissive_error_option.

◆ emit_diagram()

void diagnostic_context::emit_diagram ( const diagnostic_diagram & diagram)
Emit DIAGRAM to this context, respecting the output format.   

References gcc_assert, and ggc_alloc().

◆ end_group()

void diagnostic_context::end_group ( )

◆ error_recursion()

void diagnostic_context::error_recursion ( )
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 diagnostic_action_after_output(), fnotice(), ggc_alloc(), pp_newline_and_flush(), and real_abort().

◆ finish()

◆ get_any_inlining_info()

void diagnostic_context::get_any_inlining_info ( diagnostic_info * diagnostic)
private
Update the inlining info in this context for a DIAGNOSTIC.   

References diagnostic_location(), ggc_alloc(), and in_system_header_at().

◆ get_client_data_hooks()

◆ get_diagram_theme()

text_art::theme * diagnostic_context::get_diagram_theme ( ) const
inline

References m_diagrams.

◆ get_edit_context()

edit_context * diagnostic_context::get_edit_context ( ) const
inline

References m_edit_context_ptr.

Referenced by toplev::main().

◆ get_escape_format()

enum diagnostics_escape_format diagnostic_context::get_escape_format ( ) const
inline

References m_escape_format.

◆ get_file_cache()

◆ get_lang_mask()

unsigned diagnostic_context::get_lang_mask ( ) const
inline

References m_option_callbacks.

Referenced by init_asm_output(), and make_option_url().

◆ get_location_text()

◆ get_output_format()

const diagnostic_output_format * diagnostic_context::get_output_format ( ) const
inline

References m_output_format.

Referenced by fnotice().

◆ get_path_format()

enum diagnostic_path_format diagnostic_context::get_path_format ( ) const
inline

◆ includes_seen_p()

bool diagnostic_context::includes_seen_p ( const line_map_ordinary * map)
private
Only dump the "In file included from..." stack once for each file.   

References hash_set< KeyId, Lazy, Traits >::add(), ggc_alloc(), line_table, m_includes_seen, and map.

Referenced by report_current_module().

◆ initialize()

void diagnostic_context::initialize ( int n_opts)
Initialize the diagnostic message outputting machinery.   

References diagnostic_source_printing_options::caret_chars, diagnostic_source_printing_options::colorize_source_p, default_diagnostic_finalizer(), default_diagnostic_start_span_fn(), default_diagnostic_starter(), diagnostic_set_caret_max_width(), DIAGNOSTICS_COLUMN_UNIT_DISPLAY, DIAGNOSTICS_ESCAPE_FORMAT_UNICODE, DIAGNOSTICS_TEXT_ART_CHARSET_ASCII, DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI, DPF_NONE, diagnostic_source_printing_options::enabled, EXTRA_DIAGNOSTIC_OUTPUT_fixits_v1, EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2, EXTRA_DIAGNOSTIC_OUTPUT_none, ggc_alloc(), i, diagnostic_option_classifier::init(), m_abort_on_error, m_client_aux_data, m_client_data_hooks, m_column_origin, m_column_unit, m_diagnostic_count, m_diagnostic_groups, m_diagrams, m_edit_context_ptr, m_escape_format, m_extra_output_kind, m_fatal_errors, m_file_cache, m_ice_handler_cb, m_includes_seen, m_inhibit_notes_p, m_inhibit_warnings, m_internal_error, m_last_location, m_last_module, m_lock, m_max_errors, m_n_opts, m_opt_permissive, m_option_callbacks, m_option_classifier, m_output_format, m_path_format, m_pedantic_errors, m_permissive, 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_source_printing, m_tabstop, m_text_callbacks, m_urlifier, m_warn_system_headers, m_warning_as_error_requested, diagnostic_source_printing_options::min_margin_width, pp_line_cutoff, printer, set_text_art_charset(), diagnostic_source_printing_options::show_event_links_p, diagnostic_source_printing_options::show_labels_p, diagnostic_source_printing_options::show_line_numbers_p, diagnostic_source_printing_options::show_ruler_p, and UNKNOWN_LOCATION.

Referenced by diagnostic_initialize().

◆ initialize_input_context()

void diagnostic_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 file_cache::initialize_input_context(), and m_file_cache.

Referenced by diagnostic_initialize_input_context().

◆ make_option_name()

char * diagnostic_context::make_option_name ( int option_index,
diagnostic_t orig_diag_kind,
diagnostic_t diag_kind ) const
inline

◆ make_option_url()

char * diagnostic_context::make_option_url ( int option_index) const
inline

◆ maybe_show_locus()

void diagnostic_context::maybe_show_locus ( const rich_location & richloc,
diagnostic_t diagnostic_kind,
pretty_printer * pp,
diagnostic_source_effect_info * effects )
As per diagnostic_context::show_locus, but don't print anything
if source printing is disabled, or if the location hasn't changed.   

References BUILTINS_LOCATION, ggc_alloc(), and NULL.

Referenced by diagnostic_show_locus().

◆ option_enabled_p()

bool diagnostic_context::option_enabled_p ( int option_index) const
inline

◆ option_unspecified_p()

bool diagnostic_context::option_unspecified_p ( int opt) const
inline

◆ pop_diagnostics()

void diagnostic_context::pop_diagnostics ( location_t where)
inline

◆ print_any_cwe()

void diagnostic_context::print_any_cwe ( const diagnostic_info & diagnostic)
private
If DIAGNOSTIC has a CWE identifier, print it.

For example, if the diagnostic metadata associates it with CWE-119,
" [CWE-119]" will be printed, suitably colorized, and with a URL of a
description of the security issue.   

References colorize_start(), colorize_stop(), diagnostic_kind_color, free(), get_cwe_url(), ggc_alloc(), NULL, pp_begin_url(), pp_character(), pp_end_url(), pp_printf(), pp_set_prefix(), pp_show_color, pp_string(), pp_take_prefix(), pretty_printer::url_format, and URL_FORMAT_NONE.

◆ print_any_rules()

void diagnostic_context::print_any_rules ( const diagnostic_info & diagnostic)
private
If DIAGNOSTIC has any rules associated with it, print them.

For example, if the diagnostic metadata associates it with a rule
named "STR34-C", then " [STR34-C]" will be printed, suitably colorized,
with any URL provided by the rule.   

References colorize_start(), colorize_stop(), diagnostic_kind_color, free(), ggc_alloc(), diagnostic_metadata::rule::make_description(), diagnostic_metadata::rule::make_url(), NULL, pp_begin_url(), pp_character(), pp_end_url(), pp_set_prefix(), pp_show_color, pp_string(), pp_take_prefix(), pretty_printer::url_format, and URL_FORMAT_NONE.

◆ print_option_information()

void diagnostic_context::print_option_information ( const diagnostic_info & diagnostic,
diagnostic_t orig_diag_kind )
private
Print any metadata about the option used to control DIAGNOSTIC to CONTEXT's
printer, e.g. " [-Werror=uninitialized]".
Subroutine of diagnostic_context::report_diagnostic.   

References colorize_start(), colorize_stop(), diagnostic_kind_color, free(), ggc_alloc(), pp_begin_url(), pp_character(), pp_end_url(), pp_show_color, pp_string(), and URL_FORMAT_NONE.

◆ push_diagnostics()

void diagnostic_context::push_diagnostics ( location_t where)
inline

◆ report_current_module()

◆ report_diagnostic()

bool diagnostic_context::report_diagnostic ( diagnostic_info * diagnostic)
Report a diagnostic message (an error or a warning) as specified by
this diagnostic_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 diagnostic_action_after_output(), diagnostic_check_max_errors(), diagnostic_location(), DIAGNOSTICS_COLUMN_UNIT_BYTE, DIAGNOSTICS_COLUMN_UNIT_DISPLAY, expand_location(), EXTRA_DIAGNOSTIC_OUTPUT_fixits_v1, EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2, fnotice(), gcc_assert, ggc_alloc(), ICE_EXIT_CODE, NULL, pedantic_warning_kind, pp_flush(), pp_format(), pp_newline_and_flush(), pp_output_formatted_text(), and print_parseable_fixits().

Referenced by diagnostic_impl(), diagnostic_n_impl(), and diagnostic_report_diagnostic().

◆ set_client_data_hooks()

void diagnostic_context::set_client_data_hooks ( diagnostic_client_data_hooks * hooks)

◆ set_escape_format()

void diagnostic_context::set_escape_format ( enum diagnostics_escape_format val)
inline

References m_escape_format.

Referenced by common_handle_option().

◆ set_extra_output_kind()

void diagnostic_context::set_extra_output_kind ( enum diagnostics_extra_output_kind kind)
inline

References m_extra_output_kind.

Referenced by common_handle_option().

◆ set_ice_handler_callback()

void diagnostic_context::set_ice_handler_callback ( ice_handler_callback_t cb)
inline

◆ set_max_errors()

void diagnostic_context::set_max_errors ( int val)
inline

References m_max_errors.

Referenced by common_handle_option().

◆ set_option_hooks()

void diagnostic_context::set_option_hooks ( diagnostic_option_enabled_cb option_enabled_cb,
void * option_state,
diagnostic_make_option_name_cb make_option_name_cb,
diagnostic_make_option_url_cb make_option_url_cb,
unsigned lang_mask )

References ggc_alloc(), and m_option_callbacks.

Referenced by general_init(), and main().

◆ set_output_format()

◆ set_path_format()

void diagnostic_context::set_path_format ( enum diagnostic_path_format val)
inline

References m_path_format.

Referenced by common_handle_option(), and general_init().

◆ set_report_bug()

void diagnostic_context::set_report_bug ( bool val)
inline

References m_report_bug.

Referenced by common_handle_option().

◆ set_set_locations_callback()

void diagnostic_context::set_set_locations_callback ( set_locations_callback_t cb)
inline

References m_set_locations_cb.

Referenced by tree_diagnostics_defaults().

◆ set_show_cwe()

void diagnostic_context::set_show_cwe ( bool val)
inline

◆ set_show_option_requested()

void diagnostic_context::set_show_option_requested ( bool val)
inline

◆ set_show_path_depths()

void diagnostic_context::set_show_path_depths ( bool val)
inline

References m_show_path_depths.

Referenced by common_handle_option(), and general_init().

◆ set_show_rules()

void diagnostic_context::set_show_rules ( bool val)
inline

◆ set_text_art_charset()

void diagnostic_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 NULL 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 ggc_alloc().

Referenced by common_handle_option(), driver_handle_option(), and initialize().

◆ set_urlifier()

void diagnostic_context::set_urlifier ( urlifier * urlifier)

◆ set_warning_as_error_requested()

void diagnostic_context::set_warning_as_error_requested ( bool val)
inline

◆ show_any_path()

void diagnostic_context::show_any_path ( const diagnostic_info & diagnostic)
private
If DIAGNOSTIC has a diagnostic_path and this context supports
printing paths, print the path.   

References ggc_alloc(), and m_print_path.

◆ show_locus()

void diagnostic_context::show_locus ( const rich_location & richloc,
diagnostic_t diagnostic_kind,
pretty_printer * pp,
diagnostic_source_effect_info * effects )
private
Print the physical source code corresponding to the location of
this diagnostic, with additional annotations.
If PP is non-null, then use it rather than this context's printer.
If EFFECTS is non-null, then use and update it.   

References ggc_alloc().

◆ show_path_depths_p()

bool diagnostic_context::show_path_depths_p ( ) const
inline

◆ urls_init()

void diagnostic_context::urls_init ( int value)
Initialize URL support within this context based on VALUE,
handling "auto".   

References determine_url_format(), DIAGNOSTICS_URL_AUTO, ggc_alloc(), printer, and pretty_printer::url_format.

Referenced by diagnostic_urls_init().

◆ warning_as_error_requested_p()

bool diagnostic_context::warning_as_error_requested_p ( ) const
inline

References m_warning_as_error_requested.

Referenced by option_name().

◆ warning_enabled_at()

bool diagnostic_context::warning_enabled_at ( location_t loc,
int opt )
Returns whether warning OPT is enabled at LOC.   

References diagnostic_report_warnings_p, ggc_alloc(), and line_table.

Referenced by warning_enabled_at().

Friends And Related Symbol Documentation

◆ diagnostic_finalizer

diagnostic_finalizer_fn & diagnostic_finalizer ( diagnostic_context * context)
friend
Client supplied function called after a diagnostic message is
displayed (for text-based diagnostic output).   

◆ diagnostic_start_span

diagnostic_start_span_fn & diagnostic_start_span ( diagnostic_context * context)
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.   

◆ diagnostic_starter

diagnostic_starter_fn & diagnostic_starter ( diagnostic_context * context)
friend
Client supplied function to announce a diagnostic
(for text-based diagnostic output).   

Field Documentation

◆ m_abort_on_error

bool diagnostic_context::m_abort_on_error

◆ m_begin_diagnostic

diagnostic_starter_fn diagnostic_context::m_begin_diagnostic

◆ m_client_aux_data

void* diagnostic_context::m_client_aux_data

Referenced by initialize().

◆ m_client_data_hooks

diagnostic_client_data_hooks* diagnostic_context::m_client_data_hooks
private

◆ m_column_origin

int diagnostic_context::m_column_origin

◆ m_column_unit

◆ m_diagnostic_count

int diagnostic_context::m_diagnostic_count[DK_LAST_DIAGNOSTIC_KIND]
private

◆ [struct]

struct { ... } diagnostic_context::m_diagnostic_groups

Referenced by initialize().

◆ [struct]

struct { ... } diagnostic_context::m_diagrams

◆ m_edit_context_ptr

edit_context* diagnostic_context::m_edit_context_ptr
private

◆ m_emission_count

int diagnostic_context::m_emission_count

◆ m_end_diagnostic

diagnostic_finalizer_fn diagnostic_context::m_end_diagnostic

◆ m_escape_format

enum diagnostics_escape_format diagnostic_context::m_escape_format
private

◆ m_extra_output_kind

enum diagnostics_extra_output_kind diagnostic_context::m_extra_output_kind
private

◆ m_fatal_errors

bool diagnostic_context::m_fatal_errors

◆ m_file_cache

file_cache* diagnostic_context::m_file_cache
private

◆ m_ice_handler_cb

ice_handler_callback_t diagnostic_context::m_ice_handler_cb
private

◆ m_includes_seen

hash_set<location_t, false, location_hash>* diagnostic_context::m_includes_seen
private

Referenced by finish(), includes_seen_p(), and initialize().

◆ m_inhibit_notes_p

bool diagnostic_context::m_inhibit_notes_p

◆ m_inhibit_warnings

bool diagnostic_context::m_inhibit_warnings

Referenced by common_handle_option(), and initialize().

◆ m_internal_error

void(* diagnostic_context::m_internal_error) (diagnostic_context *, const char *, va_list *)

◆ m_lang_mask

unsigned diagnostic_context::m_lang_mask

◆ m_last_location

location_t diagnostic_context::m_last_location

Referenced by initialize().

◆ m_last_module

const line_map_ordinary* diagnostic_context::m_last_module
private

◆ m_lock

int diagnostic_context::m_lock
private

Referenced by initialize().

◆ m_make_json_for_path

json::value *(* diagnostic_context::m_make_json_for_path) (diagnostic_context *, const diagnostic_path *)

◆ m_make_option_name_cb

diagnostic_make_option_name_cb diagnostic_context::m_make_option_name_cb

◆ m_make_option_url_cb

diagnostic_make_option_url_cb diagnostic_context::m_make_option_url_cb

◆ m_max_errors

int diagnostic_context::m_max_errors
private

◆ m_n_opts

int diagnostic_context::m_n_opts
private

Referenced by initialize().

◆ m_nesting_depth

int diagnostic_context::m_nesting_depth

◆ m_opt_permissive

int diagnostic_context::m_opt_permissive

Referenced by initialize().

◆ [struct]

struct { ... } diagnostic_context::m_option_callbacks

◆ m_option_classifier

◆ m_option_enabled_cb

diagnostic_option_enabled_cb diagnostic_context::m_option_enabled_cb

◆ m_option_state

void* diagnostic_context::m_option_state

◆ m_output_format

diagnostic_output_format* diagnostic_context::m_output_format
private

◆ m_path_format

enum diagnostic_path_format diagnostic_context::m_path_format
private

◆ m_pedantic_errors

bool diagnostic_context::m_pedantic_errors

Referenced by common_handle_option(), and initialize().

◆ m_permissive

bool diagnostic_context::m_permissive

Referenced by initialize().

◆ m_print_path

◆ m_report_bug

bool diagnostic_context::m_report_bug
private

◆ m_set_locations_cb

set_locations_callback_t diagnostic_context::m_set_locations_cb
private

◆ m_show_column

◆ m_show_cwe

bool diagnostic_context::m_show_cwe
private

Referenced by initialize(), and set_show_cwe().

◆ m_show_option_requested

bool diagnostic_context::m_show_option_requested
private

◆ m_show_path_depths

bool diagnostic_context::m_show_path_depths
private

◆ m_show_rules

bool diagnostic_context::m_show_rules
private

Referenced by initialize(), and set_show_rules().

◆ m_source_printing

◆ m_start_span

diagnostic_start_span_fn diagnostic_context::m_start_span

◆ m_tabstop

int diagnostic_context::m_tabstop

◆ [struct]

struct { ... } diagnostic_context::m_text_callbacks

Referenced by initialize().

◆ m_theme

text_art::theme* diagnostic_context::m_theme

◆ m_urlifier

urlifier* diagnostic_context::m_urlifier
private

Referenced by finish(), initialize(), and set_urlifier().

◆ m_warn_system_headers

bool diagnostic_context::m_warn_system_headers

Referenced by common_handle_option(), and initialize().

◆ m_warning_as_error_requested

bool diagnostic_context::m_warning_as_error_requested
private

◆ printer


The documentation for this class was generated from the following files: