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

#include <pending-diagnostic.h>

Inheritance diagram for ana::pending_diagnostic:

Public Member Functions

virtual ~pending_diagnostic ()
 
virtual int get_controlling_option () const =0
 
virtual bool terminate_path_p () const
 
virtual bool emit (diagnostic_emission_context &)=0
 
virtual const char * get_kind () const =0
 
virtual bool use_of_uninit_p () const
 
bool equal_p (const pending_diagnostic &other) const
 
virtual bool subclass_equal_p (const pending_diagnostic &other) const =0
 
virtual location_t fixup_location (location_t loc, bool primary) const
 
virtual bool describe_state_change (pretty_printer &, const evdesc::state_change &)
 
virtual diagnostic_event::meaning get_meaning_for_state_change (const evdesc::state_change &) const
 
virtual bool describe_call_with_state (pretty_printer &, const evdesc::call_with_state &)
 
virtual bool describe_return_of_state (pretty_printer &, const evdesc::return_of_state &)
 
virtual bool describe_final_event (pretty_printer &, const evdesc::final_event &)
 
virtual void add_function_entry_event (const exploded_edge &eedge, checker_path *emission_path)
 
virtual bool maybe_add_custom_events_for_superedge (const exploded_edge &, checker_path *)
 
virtual void add_call_event (const exploded_edge &, checker_path *)
 
virtual void add_region_creation_events (const region *reg, tree capacity, const event_loc_info &loc_info, checker_path &emission_path)
 
virtual void add_final_event (const state_machine *sm, const exploded_node *enode, const event_loc_info &loc_info, tree var, state_machine::state_t state, checker_path *emission_path)
 
virtual bool supercedes_p (const pending_diagnostic &other) const
 
virtual void mark_interesting_stuff (interesting_t *)
 
virtual bool check_valid_fpath_p (const feasible_node &, const gimple *) const
 
virtual void maybe_add_sarif_properties (sarif_object &) const
 

Static Public Member Functions

static bool same_tree_p (tree t1, tree t2)
 

Detailed Description

An abstract base class for capturing information about a diagnostic in
a form that is ready to emit at a later point (or be rejected).
Each kind of diagnostic will have a concrete subclass of
pending_diagnostic.

Normally, gcc diagnostics are emitted using va_list, which can't be
portably stored for later use, so we have to use an "emit" virtual
function.

This class also supports comparison, so that multiple pending_diagnostic
instances can be de-duplicated.

As well as emitting a diagnostic, the class has various "precision of
wording" virtual functions, for generating descriptions for events
within a diagnostic_path.  These are optional, but implementing these
allows for more precise wordings than the more generic
implementation.   

Constructor & Destructor Documentation

◆ ~pending_diagnostic()

virtual ana::pending_diagnostic::~pending_diagnostic ( )
inlinevirtual

Member Function Documentation

◆ add_call_event()

virtual void ana::pending_diagnostic::add_call_event ( const exploded_edge & ,
checker_path *  )
virtual

◆ add_final_event()

virtual void ana::pending_diagnostic::add_final_event ( const state_machine * sm,
const exploded_node * enode,
const event_loc_info & loc_info,
tree var,
state_machine::state_t state,
checker_path * emission_path )
virtual

◆ add_function_entry_event()

virtual void ana::pending_diagnostic::add_function_entry_event ( const exploded_edge & eedge,
checker_path * emission_path )
virtual

◆ add_region_creation_events()

virtual void ana::pending_diagnostic::add_region_creation_events ( const region * reg,
tree capacity,
const event_loc_info & loc_info,
checker_path & emission_path )
virtual

◆ check_valid_fpath_p()

virtual bool ana::pending_diagnostic::check_valid_fpath_p ( const feasible_node & ,
const gimple *  ) const
inlinevirtual

Reimplemented in infinite_recursion_diagnostic.

◆ describe_call_with_state()

virtual bool ana::pending_diagnostic::describe_call_with_state ( pretty_printer & ,
const evdesc::call_with_state &  )
inlinevirtual

◆ describe_final_event()

virtual bool ana::pending_diagnostic::describe_final_event ( pretty_printer & ,
const evdesc::final_event &  )
inlinevirtual

◆ describe_return_of_state()

virtual bool ana::pending_diagnostic::describe_return_of_state ( pretty_printer & ,
const evdesc::return_of_state &  )
inlinevirtual

◆ describe_state_change()

virtual bool ana::pending_diagnostic::describe_state_change ( pretty_printer & ,
const evdesc::state_change &  )
inlinevirtual

◆ emit()

virtual bool ana::pending_diagnostic::emit ( diagnostic_emission_context & )
pure virtual

◆ equal_p()

bool ana::pending_diagnostic::equal_p ( const pending_diagnostic & other) const
inline

References get_kind(), and subclass_equal_p().

◆ fixup_location()

virtual location_t ana::pending_diagnostic::fixup_location ( location_t loc,
bool primary ) const
virtual

◆ get_controlling_option()

virtual int ana::pending_diagnostic::get_controlling_option ( ) const
pure virtual

◆ get_kind()

virtual const char * ana::pending_diagnostic::get_kind ( ) const
pure virtual

◆ get_meaning_for_state_change()

virtual diagnostic_event::meaning ana::pending_diagnostic::get_meaning_for_state_change ( const evdesc::state_change & ) const
inlinevirtual

◆ mark_interesting_stuff()

virtual void ana::pending_diagnostic::mark_interesting_stuff ( interesting_t * )
inlinevirtual

◆ maybe_add_custom_events_for_superedge()

virtual bool ana::pending_diagnostic::maybe_add_custom_events_for_superedge ( const exploded_edge & ,
checker_path *  )
inlinevirtual

Reimplemented in infinite_loop_diagnostic.

◆ maybe_add_sarif_properties()

virtual void ana::pending_diagnostic::maybe_add_sarif_properties ( sarif_object & ) const
inlinevirtual

◆ same_tree_p()

static bool ana::pending_diagnostic::same_tree_p ( tree t1,
tree t2 )
static

◆ subclass_equal_p()

◆ supercedes_p()

virtual bool ana::pending_diagnostic::supercedes_p ( const pending_diagnostic & other) const
inlinevirtual

◆ terminate_path_p()

virtual bool ana::pending_diagnostic::terminate_path_p ( ) const
inlinevirtual

◆ use_of_uninit_p()

virtual bool ana::pending_diagnostic::use_of_uninit_p ( ) const
inlinevirtual

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