GCC Middle and Back End API Reference
|
Public Member Functions | |
sarif_thread_flow (sarif_code_flow &parent, const diagnostic_thread &thread, unsigned idx_within_parent) | |
sarif_code_flow & | get_parent () const |
unsigned | get_index_within_parent () const |
sarif_thread_flow_location & | add_location () |
sarif_property_bag & | get_or_create_properties () |
enum kind | get_kind () const final override |
void | print (pretty_printer *pp, bool formatted) const final override |
bool | is_empty () const |
void | set (const char *key, value *v) |
template<typename JsonType > | |
void | set (const char *key, std::unique_ptr< JsonType > v) |
value * | get (const char *key) const |
void | set_string (const char *key, const char *utf8_value) |
void | set_integer (const char *key, long v) |
void | set_float (const char *key, double v) |
void | set_bool (const char *key, bool v) |
void | dump (FILE *, bool formatted) const |
void DEBUG_FUNCTION | dump () const |
Private Types | |
typedef hash_map< char *, value *, simple_hashmap_traits< nofree_string_hash, value * > > | map_t |
Private Attributes | |
sarif_code_flow & | m_parent |
json::array * | m_locations_arr |
const unsigned | m_idx_within_parent |
map_t | m_map |
auto_vec< const char * > | m_keys |
Subclass of sarif_object for SARIF "threadFlow" objects (SARIF v2.1.0 section 3.37).
|
privateinherited |
sarif_thread_flow::sarif_thread_flow | ( | sarif_code_flow & | parent, |
const diagnostic_thread & | thread, | ||
unsigned | idx_within_parent ) |
class sarif_thread_flow : public sarif_object.
References diagnostic_thread::get_name(), m_locations_arr, json::object::set(), and json::object::set_string().
sarif_thread_flow_location & sarif_thread_flow::add_location | ( | ) |
Add a sarif_thread_flow_location to this threadFlow object, but don't populate it yet.
References sarif_code_flow::add_location(), json::array::append(), m_locations_arr, m_parent, and json::array::size().
Referenced by sarif_builder::make_code_flow_object().
|
inherited |
A convenience function for debugging. Dump to stderr with formatting, and a trailing newline.
References json::value::dump().
Referenced by json::value::dump().
|
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 output_buffer::m_stream, pp_buffer(), pp_flush(), and json::value::print().
Referenced by generate_results().
|
inherited |
Get the json::value * for KEY. The object retains ownership of the value.
References gcc_assert, json::object::get(), json::object::m_map, and NULL.
Referenced by json::object::get(), sarif_location::get_id(), sarif_code_flow::get_or_append_thread_flow(), sarif_object::get_or_create_properties(), sarif_location_relationship::get_target_id(), sarif_location_relationship::lazily_add_kind(), sarif_location::lazily_add_relationship_object(), sarif_location::lazily_add_relationships_array(), sarif_builder::make_code_flow_object(), sarif_builder::make_location_object(), sarif_builder::make_location_object(), sarif_builder::make_location_object(), and sarif_location_manager::process_worklist_item().
|
inline |
References m_idx_within_parent.
Referenced by make_sarif_url_for_event().
|
inlinefinaloverridevirtualinherited |
Implements json::value.
References json::JSON_OBJECT.
|
inherited |
class sarif_object : public json::object.
References json::object::get(), json::value::get_kind(), json::JSON_OBJECT, and json::object::set().
Referenced by sarif_ice_notification::sarif_ice_notification().
|
inline |
References m_parent.
Referenced by make_sarif_url_for_event().
|
inlineinherited |
References hash_map< KeyId, Value, Traits >::is_empty(), and json::object::m_map.
|
finaloverridevirtualinherited |
Implementation of json::value::print for json::object.
Implements json::value.
References FOR_EACH_VEC_ELT, hash_map< KeyId, Value, Traits >::get(), i, json::object::m_keys, json::object::m_map, pp_character(), pp_indent(), pp_indentation(), pp_newline(), pp_space, pp_string(), json::value::print(), and print_escaped_json_string().
Referenced by generate_results().
|
inlineinherited |
References json::object::set().
|
inherited |
Set the json::value * for KEY, taking ownership of V (and taking a copy of KEY if necessary).
References gcc_assert, hash_map< KeyId, Value, Traits >::get(), json::object::m_keys, json::object::m_map, and hash_map< KeyId, Value, Traits >::put().
Referenced by optrecord_json_writer::add_pass_list(), optrecord_json_writer::add_record(), sarif_location_manager::add_related_location(), compiler_data_hooks::add_sarif_invocation_properties(), generate_results(), sarif_builder::get_or_create_artifact(), sarif_object::get_or_create_properties(), optrecord_json_writer::inlining_chain_to_json(), sarif_location_relationship::lazily_add_kind(), sarif_location::lazily_add_relationships_array(), sarif_builder::make_fix_object(), sarif_builder::make_replacement_object(), sarif_builder::make_result_object(), sarif_builder::make_run_object(), sarif_builder::make_tool_object(), sarif_builder::make_top_level_object(), infinite_loop_diagnostic::maybe_add_sarif_properties(), sarif_builder::maybe_make_cwe_taxonomy_object(), sarif_builder::maybe_make_physical_location_object(), json_output_format::on_report_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_contents(), sarif_artifact::populate_roles(), sarif_builder::populate_thread_flow_location_object(), sarif_invocation::prepare_to_flush(), sarif_code_flow::sarif_code_flow(), sarif_ice_notification::sarif_ice_notification(), sarif_invocation::sarif_invocation(), sarif_thread_flow(), json::object::set(), sarif_builder::set_any_logical_locs_arr(), json::object::set_bool(), json::object::set_float(), json::object::set_integer(), and json::object::set_string().
|
inherited |
Set value of KEY within this object to the JSON literal true or false, based on V.
References json::object::set().
Referenced by sarif_builder::make_location_object(), json_output_format::on_report_diagnostic(), output_intermediate_json_line(), and sarif_invocation::prepare_to_flush().
|
inherited |
Set value of KEY within this object to a JSON floating point value based on V.
References json::object::set().
|
inherited |
Set value of KEY within this object to a JSON integer value based on V.
References json::object::set().
Referenced by optrecord_json_writer::impl_location_to_json(), sarif_location::lazily_add_id(), optrecord_json_writer::location_to_json(), infinite_recursion_diagnostic::maybe_add_sarif_properties(), sarif_result::on_nested_diagnostic(), json_output_format::on_report_diagnostic(), output_intermediate_json_line(), optrecord_json_writer::pass_to_json(), sarif_builder::populate_thread_flow_location_object(), optrecord_json_writer::profile_count_to_json(), and sarif_location_relationship::sarif_location_relationship().
|
inherited |
Set value of KEY within this object to a JSON string value based on UTF8_VALUE.
References json::object::set().
Referenced by generate_results(), sarif_builder::get_or_create_artifact(), optrecord_json_writer::impl_location_to_json(), optrecord_json_writer::inlining_chain_to_json(), optrecord_json_writer::location_to_json(), json_output_format::on_report_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(), optrecord_json_writer::profile_count_to_json(), sarif_ice_notification::sarif_ice_notification(), and sarif_thread_flow().
|
private |
Referenced by get_index_within_parent().
|
privateinherited |
Referenced by json::object::print(), and json::object::set().
|
private |
Referenced by add_location(), and sarif_thread_flow().
|
privateinherited |
Referenced by json::object::get(), json::object::is_empty(), json::object::print(), json::object::set(), and json::object::~object().
|
private |
Referenced by add_location(), and get_parent().