GCC Middle and Back End API Reference
|
#include <json.h>
Public Member Functions | |
~array () | |
enum kind | get_kind () const final override |
void | print (pretty_printer *pp, bool formatted) const final override |
void | append (value *v) |
void | dump (FILE *, bool formatted) const |
Private Attributes | |
auto_vec< value * > | m_elements |
Subclass of value for arrays.
array::~array | ( | ) |
class json::array, a subclass of json::value, representing an ordered collection of values.
json::array's dtor.
References FOR_EACH_VEC_ELT, i, and m_elements.
void array::append | ( | value * | v | ) |
Append non-NULL value V to a json::array, taking ownership of V.
References gcc_assert, and m_elements.
Referenced by sarif_thread_flow::add_location(), sarif_invocation::add_notification_for_ice(), optrecord_json_writer::add_pass_list(), sarif_result::add_related_location(), sarif_builder::end_diagnostic(), optrecord_json_writer::inlining_chain_to_json(), sarif_builder::make_artifact_change_object(), sarif_builder::make_code_flow_object(), sarif_builder::make_fix_object(), timer::make_json(), timer::named_items::make_json(), timer::timevar_def::make_json(), make_json_for_path(), sarif_builder::make_locations_arr(), sarif_builder::make_result_object(), sarif_builder::make_run_object(), sarif_builder::make_tool_object(), sarif_builder::make_top_level_object(), sarif_builder::maybe_make_cwe_taxonomy_object(), sarif_builder::maybe_make_kinds_array(), sarif_builder::maybe_make_taxonomies_array(), json_output_format::on_end_diagnostic(), optrecord_json_writer::optinfo_to_json(), optrecord_json_writer::optrecord_json_writer(), output_intermediate_json_line(), output_json_intermediate_file(), optrecord_json_writer::pass_to_json(), sarif_artifact::populate_roles(), sarif_builder::set_any_logical_locs_arr(), and infinite_loop::to_json().
|
inherited |
class json::value.
Dump this json::value tree to OUTF. The key/value pairs of json::objects are printed in the order in which the keys were originally inserted.
References pp_buffer(), pp_flush(), json::value::print(), and output_buffer::stream.
Referenced by json_output_format::flush_to_file(), sarif_builder::flush_to_file(), and generate_results().
|
inlinefinaloverridevirtual |
Implements json::value.
References json::JSON_ARRAY.
|
finaloverridevirtual |
Implementation of json::value::print for json::array.
Implements json::value.
References FOR_EACH_VEC_ELT, i, m_elements, pp_character(), pp_indent(), pp_indentation(), pp_newline(), pp_space, pp_string(), and json::value::print().
Referenced by optrecord_json_writer::write().