GCC Middle and Back End API Reference
ana::warning_event Class Reference

#include <checker-event.h>

Inheritance diagram for ana::warning_event:
Collaboration diagram for ana::warning_event:

Public Types

enum class  verb {
  unknown , acquire , release , enter ,
  exit , call , return_ , branch ,
  danger
}
enum class  noun {
  unknown , taint , sensitive , function ,
  lock , memory , resource
}
enum class  property { unknown , true_ , false_ }

Public Member Functions

 warning_event (const event_loc_info &loc_info, const exploded_node *enode, const state_machine *sm, tree var, state_machine::state_t state, const program_state *program_state_=nullptr)
void print_desc (pretty_printer &pp) const final override
meaning get_meaning () const override
const program_stateget_program_state () const final override
const exploded_nodeget_exploded_node () const
location_t get_location () const final override
int get_stack_depth () const final override
logical_location get_logical_location () const final 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_builder &, sarif_object &thread_flow_loc_obj) const override
enum event_kind get_kind () const
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
std::unique_ptr< diagnostics::digraphs::digraphmaybe_make_diagnostic_state_graph (bool debug) const final override
const diagnostic_event_id_tget_id_ptr () const
void dump (pretty_printer *pp) const
void debug () const
void set_location (location_t loc)
label_text get_desc (pretty_printer &ref_pp) const

Protected Attributes

location_t m_loc
tree m_original_fndecl
tree m_effective_fndecl
int m_original_depth
int m_effective_depth
pending_diagnosticm_pending_diagnostic
diagnostic_event_id_t m_emission_id
logical_location m_logical_loc

Private Attributes

const exploded_nodem_enode
const state_machinem_sm
tree m_var
state_machine::state_t m_state
std::unique_ptr< program_statem_program_state
const checker_pathm_path
enum event_kind m_kind

Detailed Description

Concrete subclass of checker_event for use at the end of a path: a repeat of the warning message at the end of the path (perhaps with references to pertinent events that occurred on the way), at the point where the problem occurs.

Member Enumeration Documentation

◆ noun

enum class diagnostic_event::noun
stronginherited
Enumerator
unknown 
taint 
sensitive 
function 
lock 
memory 
resource 

◆ property

enum class diagnostic_event::property
stronginherited
Enumerator
unknown 
true_ 
false_ 

◆ verb

enum class diagnostic_event::verb
stronginherited
Enumerator
unknown 
acquire 
release 
enter 
exit 
call 
return_ 
branch 
danger 

Constructor & Destructor Documentation

◆ warning_event()

ana::warning_event::warning_event ( const event_loc_info & loc_info,
const exploded_node * enode,
const state_machine * sm,
tree var,
state_machine::state_t state,
const program_state * program_state_ = nullptr )
inline

Member Function Documentation

◆ connect_to_next_event_p()

bool ana::checker_event::connect_to_next_event_p ( ) const
inlineoverridevirtualinherited

◆ debug()

void ana::checker_event::debug ( ) const
inherited

◆ dump()

void ana::checker_event::dump ( pretty_printer * pp) const
inherited

◆ get_desc()

label_text diagnostic_event::get_desc ( pretty_printer & ref_pp) const
inherited
Generate a label_text containing the description of this event (for debugging/logging purposes).

References pretty_printer::clone(), pp_formatted_text(), pp_show_color(), and print_desc().

◆ get_exploded_node()

const exploded_node * ana::warning_event::get_exploded_node ( ) const
inline

References get_exploded_node(), and m_enode.

Referenced by get_exploded_node().

◆ get_fndecl()

tree ana::checker_event::get_fndecl ( ) const
inlineinherited

References m_effective_fndecl.

◆ get_id_ptr()

const diagnostic_event_id_t * ana::checker_event::get_id_ptr ( ) const
inlineinherited

References m_emission_id.

◆ get_kind()

enum event_kind ana::checker_event::get_kind ( ) const
inlineinherited

References m_kind.

◆ get_location()

location_t ana::checker_event::get_location ( ) const
inlinefinaloverridevirtualinherited

Implements diagnostic_event.

References final(), and m_loc.

◆ get_logical_location()

logical_location ana::checker_event::get_logical_location ( ) const
inlinefinaloverridevirtualinherited

Implements diagnostic_event.

References final(), and m_logical_loc.

◆ get_meaning()

meaning ana::warning_event::get_meaning ( ) const
overridevirtual

Reimplemented from ana::checker_event.

◆ get_original_stack_depth()

int ana::checker_event::get_original_stack_depth ( ) const
inlineinherited

References m_original_depth.

◆ get_program_state()

const program_state * ana::warning_event::get_program_state ( ) const
finaloverridevirtual

Reimplemented from ana::checker_event.

References final().

◆ get_stack_depth()

int ana::checker_event::get_stack_depth ( ) const
inlinefinaloverridevirtualinherited

Implements diagnostic_event.

References final(), and m_effective_depth.

◆ get_thread_id()

diagnostic_thread_id_t ana::checker_event::get_thread_id ( ) const
inlinefinaloverridevirtualinherited

Implements diagnostic_event.

References final().

◆ is_call_p()

virtual bool ana::checker_event::is_call_p ( ) const
inlinevirtualinherited

Reimplemented in ana::call_event.

◆ is_function_entry_p()

virtual bool ana::checker_event::is_function_entry_p ( ) const
inlinevirtualinherited

Reimplemented in ana::function_entry_event.

◆ is_return_p()

virtual bool ana::checker_event::is_return_p ( ) const
inlinevirtualinherited

Reimplemented in ana::return_event.

◆ maybe_add_sarif_properties()

void ana::checker_event::maybe_add_sarif_properties ( sarif_builder & ,
sarif_object & thread_flow_loc_obj ) const
overridevirtualinherited

Reimplemented from diagnostic_event.

Reimplemented in ana::superedge_event.

◆ maybe_make_diagnostic_state_graph()

std::unique_ptr< diagnostics::digraphs::digraph > ana::checker_event::maybe_make_diagnostic_state_graph ( bool debug) const
finaloverridevirtualinherited

Reimplemented from diagnostic_event.

References debug().

◆ prepare_for_emission()

virtual void ana::checker_event::prepare_for_emission ( checker_path * ,
pending_diagnostic * pd,
diagnostic_event_id_t emission_id )
virtualinherited

◆ print_desc()

void ana::warning_event::print_desc ( pretty_printer & pp) const
finaloverridevirtual

Implements diagnostic_event.

◆ set_location()

void ana::checker_event::set_location ( location_t loc)
inlineinherited

References m_loc.

Field Documentation

◆ m_effective_depth

int ana::checker_event::m_effective_depth
protectedinherited

Referenced by get_stack_depth().

◆ m_effective_fndecl

tree ana::checker_event::m_effective_fndecl
protectedinherited

Referenced by get_fndecl().

◆ m_emission_id

diagnostic_event_id_t ana::checker_event::m_emission_id
protectedinherited

Referenced by get_id_ptr().

◆ m_enode

const exploded_node* ana::warning_event::m_enode
private

Referenced by get_exploded_node(), and warning_event().

◆ m_kind

enum event_kind ana::checker_event::m_kind
privateinherited

Referenced by get_kind().

◆ m_loc

location_t ana::checker_event::m_loc
protectedinherited

Referenced by get_location(), and set_location().

◆ m_logical_loc

logical_location ana::checker_event::m_logical_loc
protectedinherited

Referenced by get_logical_location().

◆ m_original_depth

int ana::checker_event::m_original_depth
protectedinherited

◆ m_original_fndecl

tree ana::checker_event::m_original_fndecl
protectedinherited

◆ m_path

const checker_path* ana::checker_event::m_path
privateinherited

◆ m_pending_diagnostic

pending_diagnostic* ana::checker_event::m_pending_diagnostic
protectedinherited

◆ m_program_state

std::unique_ptr<program_state> ana::warning_event::m_program_state
private

Referenced by warning_event().

◆ m_sm

const state_machine* ana::warning_event::m_sm
private

Referenced by warning_event().

◆ m_state

state_machine::state_t ana::warning_event::m_state
private

Referenced by warning_event().

◆ m_var

tree ana::warning_event::m_var
private

Referenced by warning_event().


The documentation for this class was generated from the following file: