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

#include <checker-path.h>

Inheritance diagram for ana::checker_path:
Collaboration diagram for ana::checker_path:

Public Member Functions

 checker_path (logger *logger)
 
unsigned num_events () const final override
 
const diagnostic_eventget_event (int idx) const final override
 
unsigned num_threads () const final override
 
const diagnostic_threadget_thread (diagnostic_thread_id_t) const final override
 
checker_eventget_checker_event (int idx)
 
bool same_function_p (int event_idx_a, int event_idx_b) const final override
 
void dump (pretty_printer *pp) const
 
void debug () const
 
loggerget_logger () const
 
void maybe_log (logger *logger, const char *desc) const
 
void add_event (std::unique_ptr< checker_event > event)
 
void delete_event (int idx)
 
void delete_events (unsigned start_idx, unsigned len)
 
void replace_event (unsigned idx, checker_event *new_event)
 
void add_region_creation_events (pending_diagnostic *pd, const region *reg, const region_model *model, const event_loc_info &loc_info, bool debug)
 
void prepare_for_emission (pending_diagnostic *pd)
 
void fixup_locations (pending_diagnostic *pd)
 
void record_setjmp_event (const exploded_node *enode, diagnostic_event_id_t setjmp_emission_id)
 
bool get_setjmp_event (const exploded_node *enode, diagnostic_event_id_t *out_emission_id)
 
bool cfg_edge_pair_at_p (unsigned idx) const
 
void inject_any_inlined_call_events (logger *logger)
 
bool interprocedural_p () const
 
bool multithreaded_p () const
 

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (checker_path)
 
bool get_first_event_in_a_function (unsigned *out_idx) const
 

Private Attributes

simple_diagnostic_thread m_thread
 
auto_delete_vec< checker_eventm_events
 
hash_map< const exploded_node *, diagnostic_event_id_tm_setjmp_event_ids
 
loggerm_logger
 

Detailed Description

Subclass of diagnostic_path for analyzer diagnostics.   

Constructor & Destructor Documentation

◆ checker_path()

ana::checker_path::checker_path ( logger * logger)
inline

Member Function Documentation

◆ add_event()

void ana::checker_path::add_event ( std::unique_ptr< checker_event > event)

◆ add_region_creation_events()

void ana::checker_path::add_region_creation_events ( pending_diagnostic * pd,
const region * reg,
const region_model * model,
const event_loc_info & loc_info,
bool debug )

◆ cfg_edge_pair_at_p()

bool ana::checker_path::cfg_edge_pair_at_p ( unsigned idx) const

◆ debug()

void ana::checker_path::debug ( ) const

◆ delete_event()

void ana::checker_path::delete_event ( int idx)
inline

References m_events.

◆ delete_events()

void ana::checker_path::delete_events ( unsigned start_idx,
unsigned len )
inline

References i, and m_events.

◆ DISABLE_COPY_AND_ASSIGN()

ana::checker_path::DISABLE_COPY_AND_ASSIGN ( checker_path )
private

◆ dump()

void ana::checker_path::dump ( pretty_printer * pp) const

◆ fixup_locations()

void ana::checker_path::fixup_locations ( pending_diagnostic * pd)

◆ get_checker_event()

checker_event * ana::checker_path::get_checker_event ( int idx)
inline

References m_events.

◆ get_event()

const diagnostic_event & ana::checker_path::get_event ( int idx) const
inlinefinaloverridevirtual

Implements diagnostic_path.

References m_events.

◆ get_first_event_in_a_function()

bool diagnostic_path::get_first_event_in_a_function ( unsigned * out_idx) const
privateinherited
class diagnostic_path.   
Subroutine of diagnostic_path::interprocedural_p.
Look for the first event in this path that is within a function
i.e. has a non-null logical location for which function_p is true.
If found, write its index to *OUT_IDX and return true.
Otherwise return false.   

References i.

◆ get_logger()

logger * ana::checker_path::get_logger ( ) const
inline

References m_logger.

◆ get_setjmp_event()

bool ana::checker_path::get_setjmp_event ( const exploded_node * enode,
diagnostic_event_id_t * out_emission_id )
inline

References m_setjmp_event_ids.

◆ get_thread()

const diagnostic_thread & ana::checker_path::get_thread ( diagnostic_thread_id_t ) const
inlinefinaloverridevirtual

Implements diagnostic_path.

References m_thread.

◆ inject_any_inlined_call_events()

void ana::checker_path::inject_any_inlined_call_events ( logger * logger)

◆ interprocedural_p()

bool diagnostic_path::interprocedural_p ( ) const
inherited
Return true if the events in this path involve more than one
function, or false if it is purely intraprocedural.   

References diagnostic_event::get_stack_depth(), and i.

◆ maybe_log()

void ana::checker_path::maybe_log ( logger * logger,
const char * desc ) const

◆ multithreaded_p()

bool diagnostic_path::multithreaded_p ( ) const
inherited

◆ num_events()

unsigned ana::checker_path::num_events ( ) const
inlinefinaloverridevirtual

Implements diagnostic_path.

References m_events.

◆ num_threads()

unsigned ana::checker_path::num_threads ( ) const
inlinefinaloverridevirtual

Implements diagnostic_path.

◆ prepare_for_emission()

void ana::checker_path::prepare_for_emission ( pending_diagnostic * pd)
inline

◆ record_setjmp_event()

void ana::checker_path::record_setjmp_event ( const exploded_node * enode,
diagnostic_event_id_t setjmp_emission_id )
inline

References m_setjmp_event_ids.

◆ replace_event()

void ana::checker_path::replace_event ( unsigned idx,
checker_event * new_event )
inline

References m_events.

◆ same_function_p()

bool ana::checker_path::same_function_p ( int event_idx_a,
int event_idx_b ) const
finaloverridevirtual

Implements diagnostic_path.

Field Documentation

◆ m_events

◆ m_logger

logger* ana::checker_path::m_logger
private

Referenced by get_logger().

◆ m_setjmp_event_ids

hash_map<const exploded_node *, diagnostic_event_id_t> ana::checker_path::m_setjmp_event_ids
private

◆ m_thread

simple_diagnostic_thread ana::checker_path::m_thread
private

Referenced by get_thread().


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