GCC Middle and Back End API Reference
ana::checker_event Class Referenceabstract

#include <checker-event.h>

Inheritance diagram for ana::checker_event:
Collaboration diagram for ana::checker_event:

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
 
tree get_fndecl () const final override
 
int get_stack_depth () const final override
 
const logical_locationget_logical_location () const final override
 
meaning get_meaning () 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
 
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_tget_id_ptr () const
 
void dump (pretty_printer *pp) const
 
void debug () const
 
void set_location (location_t loc)
 
virtual label_text get_desc (bool can_colorize) const =0
 

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_diagnosticm_pending_diagnostic
 
diagnostic_event_id_t m_emission_id
 
tree_logical_location m_logical_loc
 

Detailed Description

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).   

Member Enumeration Documentation

◆ noun

Enumerator
NOUN_unknown 
NOUN_taint 
NOUN_sensitive 
NOUN_function 
NOUN_lock 
NOUN_memory 
NOUN_resource 

◆ property

Enumerator
PROPERTY_unknown 
PROPERTY_true 
PROPERTY_false 

◆ verb

Enumerator
VERB_unknown 
VERB_acquire 
VERB_release 
VERB_enter 
VERB_exit 
VERB_call 
VERB_return 
VERB_branch 
VERB_danger 

Constructor & Destructor Documentation

◆ checker_event()

ana::checker_event::checker_event ( enum event_kind kind,
const event_loc_info & loc_info )
protected

Member Function Documentation

◆ debug()

void ana::checker_event::debug ( ) const

◆ dump()

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

◆ get_desc()

◆ get_fndecl()

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

Implements diagnostic_event.

References m_effective_fndecl.

◆ get_id_ptr()

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

References m_emission_id.

◆ get_location()

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

Implements diagnostic_event.

References m_loc.

◆ get_logical_location()

const logical_location * ana::checker_event::get_logical_location ( ) const
inlinefinaloverridevirtual

Implements diagnostic_event.

References m_effective_fndecl, m_logical_loc, and NULL.

◆ get_meaning()

◆ get_original_stack_depth()

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

References m_original_depth.

◆ get_stack_depth()

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

Implements diagnostic_event.

References m_effective_depth.

◆ get_thread_id()

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

Implements diagnostic_event.

◆ is_call_p()

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

Reimplemented in ana::call_event.

◆ is_function_entry_p()

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

Reimplemented in ana::function_entry_event.

◆ is_return_p()

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

Reimplemented in ana::return_event.

◆ maybe_add_sarif_properties()

void ana::checker_event::maybe_add_sarif_properties ( sarif_object & thread_flow_loc_obj) const
overridevirtual

Reimplemented from diagnostic_event.

Reimplemented in ana::superedge_event.

◆ prepare_for_emission()

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

◆ set_location()

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

References m_loc.

Field Documentation

◆ m_effective_depth

int ana::checker_event::m_effective_depth
protected

Referenced by get_stack_depth().

◆ m_effective_fndecl

tree ana::checker_event::m_effective_fndecl
protected

Referenced by get_fndecl(), and get_logical_location().

◆ m_emission_id

diagnostic_event_id_t ana::checker_event::m_emission_id
protected

Referenced by get_id_ptr().

◆ m_kind

enum event_kind ana::checker_event::m_kind

◆ m_loc

location_t ana::checker_event::m_loc
protected

Referenced by get_location(), and set_location().

◆ m_logical_loc

tree_logical_location ana::checker_event::m_logical_loc
protected

Referenced by get_logical_location().

◆ m_original_depth

int ana::checker_event::m_original_depth
protected

◆ m_original_fndecl

tree ana::checker_event::m_original_fndecl
protected

◆ m_pending_diagnostic

pending_diagnostic* ana::checker_event::m_pending_diagnostic
protected

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