GCC Middle and Back End API Reference
|
Public Member Functions | |
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 |
virtual bool | machine_readable_stderr_p () const =0 |
Protected Member Functions | |
json_output_format (diagnostic_context &context, bool formatted) | |
void | flush_to_file (FILE *outf) |
Protected Attributes | |
diagnostic_context & | m_context |
Private Attributes | |
std::unique_ptr< json::array > | m_toplevel_array |
json::object * | m_cur_group |
json::array * | m_cur_children_array |
bool | m_formatted |
Subclass of diagnostic_output_format for JSON output.
|
inlineprotected |
|
inlineprotected |
References m_formatted, and m_toplevel_array.
Referenced by json_file_output_format::~json_file_output_format(), and json_stderr_output_format::~json_stderr_output_format().
|
pure virtualinherited |
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
|
inlinefinaloverridevirtual |
Implements diagnostic_output_format.
References m_cur_children_array, and m_cur_group.
|
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 json::array::append(), free(), gcc_assert, get_diagnostic_kind_text(), diagnostic_context::get_urlifier(), i, json_from_fixit_hint(), json_from_location_range(), json_from_metadata(), diagnostic_info::kind, diagnostic_context::m_column_origin, diagnostic_output_format::m_context, m_cur_children_array, m_cur_group, m_toplevel_array, make_json_for_path(), diagnostic_context::make_option_name(), diagnostic_context::make_option_url(), make_unique(), diagnostic_info::metadata, diagnostic_info::option_index, pp_clear_output_area(), pp_formatted_text(), pp_output_formatted_text(), diagnostic_context::printer, diagnostic_info::richloc, json::object::set(), json::object::set_bool(), json::object::set_integer(), and json::object::set_string().
|
protectedinherited |
Referenced by diagnostic_text_output_format::on_diagram(), sarif_output_format::on_diagram(), diagnostic_text_output_format::on_report_diagnostic(), on_report_diagnostic(), sarif_output_format::on_report_diagnostic(), diagnostic_text_output_format::print_any_cwe(), diagnostic_text_output_format::print_any_rules(), diagnostic_text_output_format::print_option_information(), and diagnostic_text_output_format::~diagnostic_text_output_format().
|
private |
Referenced by on_end_group(), and on_report_diagnostic().
|
private |
Referenced by on_end_group(), and on_report_diagnostic().
|
private |
Referenced by flush_to_file().
|
private |
Referenced by flush_to_file(), and on_report_diagnostic().