GCC Middle and Back End API Reference
|
#include <checker-event.h>
Public Types | |
enum | verb { VERB_unknown , VERB_acquire , VERB_release , VERB_enter , VERB_exit , VERB_call , VERB_return , VERB_branch , VERB_danger } |
enum | noun { NOUN_unknown , NOUN_taint , NOUN_sensitive , NOUN_function , NOUN_lock , NOUN_memory , NOUN_resource } |
enum | property { PROPERTY_unknown , PROPERTY_true , PROPERTY_false } |
Public Member Functions | |
location_t | get_location () const final override |
int | get_stack_depth () const final override |
const logical_location * | get_logical_location () const final override |
meaning | get_meaning () const override |
bool | connect_to_next_event_p () const override |
diagnostic_thread_id_t | get_thread_id () const final override |
void | maybe_add_sarif_properties (sarif_object &thread_flow_loc_obj) const override |
tree | get_fndecl () const |
int | get_original_stack_depth () const |
virtual void | prepare_for_emission (checker_path *, pending_diagnostic *pd, diagnostic_event_id_t emission_id) |
virtual bool | is_call_p () const |
virtual bool | is_function_entry_p () const |
virtual bool | is_return_p () const |
const diagnostic_event_id_t * | get_id_ptr () const |
void | dump (pretty_printer *pp) const |
void | debug () const |
void | set_location (location_t loc) |
virtual void | print_desc (pretty_printer &pp) const =0 |
label_text | get_desc () const |
Data Fields | |
enum event_kind | m_kind |
Protected Member Functions | |
checker_event (enum event_kind kind, const event_loc_info &loc_info) | |
Protected Attributes | |
location_t | m_loc |
tree | m_original_fndecl |
tree | m_effective_fndecl |
int | m_original_depth |
int | m_effective_depth |
pending_diagnostic * | m_pending_diagnostic |
diagnostic_event_id_t | m_emission_id |
tree_logical_location | m_logical_loc |
Event subclasses. The class hierarchy looks like this (using indentation to show inheritance, and with event_kinds shown for the concrete subclasses): diagnostic_event checker_event debug_event (EK_DEBUG) custom_event (EK_CUSTOM) precanned_custom_event statement_event (EK_STMT) region_creation_event (EK_REGION_CREATION) function_entry_event (EK_FUNCTION_ENTRY) state_change_event (EK_STATE_CHANGE) superedge_event cfg_edge_event start_cfg_edge_event (EK_START_CFG_EDGE) end_cfg_edge_event (EK_END_CFG_EDGE) call_event (EK_CALL_EDGE) return_edge (EK_RETURN_EDGE) start_consolidated_cfg_edges_event (EK_START_CONSOLIDATED_CFG_EDGES) end_consolidated_cfg_edges_event (EK_END_CONSOLIDATED_CFG_EDGES) inlined_call_event (EK_INLINED_CALL) setjmp_event (EK_SETJMP) rewind_event rewind_from_longjmp_event (EK_REWIND_FROM_LONGJMP) rewind_to_setjmp_event (EK_REWIND_TO_SETJMP) warning_event (EK_WARNING).
Abstract subclass of diagnostic_event; the base class for use in checker_path (the analyzer's diagnostic_path subclass).
|
inherited |
|
inherited |
|
inherited |
|
protected |
|
inlineoverridevirtual |
Implements diagnostic_event.
Reimplemented in ana::start_cfg_edge_event, and ana::start_consolidated_cfg_edges_event.
void ana::checker_event::debug | ( | ) | const |
void ana::checker_event::dump | ( | pretty_printer * | pp | ) | const |
|
inherited |
Generate a label_text containing the description of this event (for debugging/logging purposes).
References diagnostic_context::clone_printer(), global_dc, pp_formatted_text(), pp_show_color(), and diagnostic_event::print_desc().
|
inline |
References m_effective_fndecl.
|
inline |
References m_emission_id.
|
inlinefinaloverridevirtual |
Implements diagnostic_event.
References m_loc.
|
inlinefinaloverridevirtual |
Implements diagnostic_event.
References m_effective_fndecl, m_logical_loc, and NULL.
|
overridevirtual |
Implements diagnostic_event.
Reimplemented in ana::function_entry_event, ana::inlined_call_event, ana::return_event, ana::start_consolidated_cfg_edges_event, ana::state_change_event, and ana::warning_event.
|
inline |
References m_original_depth.
|
inlinefinaloverridevirtual |
Implements diagnostic_event.
References m_effective_depth.
|
inlinefinaloverridevirtual |
Implements diagnostic_event.
|
inlinevirtual |
Reimplemented in ana::call_event.
|
inlinevirtual |
Reimplemented in ana::function_entry_event.
|
inlinevirtual |
Reimplemented in ana::return_event.
|
overridevirtual |
Reimplemented from diagnostic_event.
Reimplemented in ana::superedge_event.
|
virtual |
Reimplemented in ana::rewind_to_setjmp_event, and ana::setjmp_event.
Referenced by ana::checker_path::prepare_for_emission().
|
pure virtualinherited |
Implemented in ana::call_event, ana::debug_event, ana::end_cfg_edge_event, ana::end_consolidated_cfg_edges_event, ana::function_entry_event, ana::inlined_call_event, ana::precanned_custom_event, ana::region_creation_event_allocation_size, ana::region_creation_event_capacity, ana::region_creation_event_debug, ana::region_creation_event_memory_space, ana::return_event, ana::rewind_from_longjmp_event, ana::rewind_to_setjmp_event, ana::setjmp_event, ana::start_cfg_edge_event, ana::start_consolidated_cfg_edges_event, ana::state_change_event, ana::statement_event, ana::warning_event, looping_back_event, perpetual_start_cfg_edge_event, and simple_diagnostic_event.
Referenced by diagnostic_event::get_desc().
|
inline |
References m_loc.
|
protected |
Referenced by get_stack_depth().
|
protected |
Referenced by get_fndecl(), and get_logical_location().
|
protected |
Referenced by get_id_ptr().
enum event_kind ana::checker_event::m_kind |
|
protected |
Referenced by get_location(), and set_location().
|
protected |
Referenced by get_logical_location().
|
protected |
Referenced by get_original_stack_depth().
|
protected |
|
protected |