GCC Middle and Back End API Reference
|
Public Member Functions | |
void | dump (FILE *out, int indent) const override |
std::unique_ptr< diagnostic_per_format_buffer > | make_per_format_buffer () final override |
void | set_buffer (diagnostic_per_format_buffer *base_buffer) final override |
void | on_begin_group () final override |
void | on_end_group () final override |
void | on_report_diagnostic (const diagnostic_info &diagnostic, diagnostic_t orig_diag_kind) final override |
void | on_diagram (const diagnostic_diagram &) final override |
void | after_diagnostic (const diagnostic_info &) final override |
void | update_printer () final override |
bool | follows_reference_printer_p () const final override |
void DEBUG_FUNCTION | dump () const |
virtual void | on_report_verbatim (text_info &) |
virtual bool | machine_readable_stderr_p () const =0 |
diagnostic_context & | get_context () const |
pretty_printer * | get_printer () const |
text_art::theme * | get_diagram_theme () const |
Protected Member Functions | |
json_output_format (diagnostic_context &context, bool formatted) | |
void | flush_to_file (FILE *outf) |
Protected Attributes | |
diagnostic_context & | m_context |
std::unique_ptr< pretty_printer > | m_printer |
Private Attributes | |
diagnostic_json_format_buffer * | m_buffer |
std::unique_ptr< json::array > | m_toplevel_array |
json::object * | m_cur_group |
json::array * | m_cur_children_array |
bool | m_formatted |
Friends | |
class | diagnostic_json_format_buffer |
Subclass of diagnostic_output_format for JSON output.
|
inlineprotected |
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlineinherited |
|
inlineoverridevirtual |
Reimplemented from diagnostic_output_format.
References diagnostic_output_format::dump().
|
inlineprotected |
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
References diagnostic_output_format::m_printer.
Referenced by diagnostic_text_format_buffer::clear(), default_diagnostic_text_finalizer(), default_diagnostic_text_starter(), default_tree_diagnostic_text_starter(), diagnostic_text_format_buffer::flush(), lhd_print_error_function(), sarif_builder::make_location_object(), diagnostic_text_sink::on_begin_text_diagnostic(), and sarif_output_format::update_printer().
|
pure virtualinherited |
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
finaloverridevirtual |
Implementation of "on_report_diagnostic" vfunc for JSON output. Generate a JSON object for DIAGNOSTIC, and store for output within current diagnostic group.
Implements diagnostic_output_format.
References free(), gcc_assert, get_diagnostic_kind_text(), i, json_from_fixit_hint(), json_from_location_range(), json_from_metadata(), make_json_for_path(), make_unique(), pp_clear_output_area(), pp_formatted_text(), pp_output_formatted_text(), json::object::set(), json::object::set_bool(), json::object::set_integer(), and json::object::set_string().
|
virtualinherited |
Reimplemented in diagnostic_text_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
References pp_show_color().
|
friend |
|
private |
|
protectedinherited |
|
private |
|
private |
|
private |
|
protectedinherited |
|
private |
Referenced by diagnostic_json_format_buffer::flush().