21#ifndef GCC_ANALYZER_PENDING_DIAGNOSTIC_H
22#define GCC_ANALYZER_PENDING_DIAGNOSTIC_H
75 m_expr (
expr), m_origin (origin),
76 m_old_state (old_state), m_new_state (new_state),
77 m_event_id (event_id), m_event (event)
95 tree caller_fndecl,
tree callee_fndecl,
98 m_caller_fndecl (caller_fndecl),
99 m_callee_fndecl (callee_fndecl),
116 tree caller_fndecl,
tree callee_fndecl,
119 m_caller_fndecl (caller_fndecl),
120 m_callee_fndecl (callee_fndecl),
138 m_expr (
expr), m_state (
state), m_event (event)
158 rich_location &rich_loc,
162 m_rich_loc (rich_loc),
163 m_metadata (metadata),
176 void add_cwe (
int cwe) { m_metadata.add_cwe (cwe); }
179 m_metadata.add_rule (
r);
238 if (get_kind () != other.
get_kind ())
241 return subclass_equal_p (other);
274 return label_text ();
297 return label_text ();
312 return label_text ();
326 return label_text ();
425template <
class Sub
class>
432 const Subclass &other = (
const Subclass &)base_other;
433 return *(
const Subclass*)
this == other;
449 virtual void emit ()
const = 0;
454 if (get_kind () != other.
get_kind ())
457 return subclass_equal_p (other);
468template <
class Sub
class>
475 const Subclass &other = (
const Subclass &)base_other;
476 return *(
const Subclass*)
this == other;
Definition checker-path.h:32
Definition pending-diagnostic.h:155
const saved_diagnostic & m_sd
Definition pending-diagnostic.h:183
bool warn(const char *,...) ATTRIBUTE_GCC_DIAG(2
rich_location & m_rich_loc
Definition pending-diagnostic.h:184
diagnostic_metadata & m_metadata
Definition pending-diagnostic.h:185
void add_cwe(int cwe)
Definition pending-diagnostic.h:176
logger * m_logger
Definition pending-diagnostic.h:186
logger * get_logger() const
Definition pending-diagnostic.h:174
diagnostic_emission_context(const saved_diagnostic &sd, rich_location &rich_loc, diagnostic_metadata &metadata, logger *logger)
Definition pending-diagnostic.h:157
const pending_diagnostic & get_pending_diagnostic() const
void add_rule(const diagnostic_metadata::rule &r)
Definition pending-diagnostic.h:177
Definition exploded-graph.h:381
Definition exploded-graph.h:203
Definition feasible-graph.h:84
Definition analyzer-logging.h:34
Definition pending-diagnostic.h:427
bool subclass_equal_p(const pending_diagnostic &base_other) const final override
Definition pending-diagnostic.h:429
Definition pending-diagnostic.h:208
virtual ~pending_diagnostic()
Definition pending-diagnostic.h:210
virtual bool use_of_uninit_p() const
Definition pending-diagnostic.h:230
virtual bool subclass_equal_p(const pending_diagnostic &other) const =0
virtual void mark_interesting_stuff(interesting_t *)
Definition pending-diagnostic.h:391
virtual void maybe_add_sarif_properties(sarif_object &) const
Definition pending-diagnostic.h:410
virtual bool maybe_add_custom_events_for_superedge(const exploded_edge &, checker_path *)
Definition pending-diagnostic.h:348
virtual void add_region_creation_events(const region *reg, tree capacity, const event_loc_info &loc_info, checker_path &emission_path)
virtual const char * get_kind() const =0
virtual label_text describe_call_with_state(const evdesc::call_with_state &)
Definition pending-diagnostic.h:294
virtual bool terminate_path_p() const
Definition pending-diagnostic.h:220
virtual bool supercedes_p(const pending_diagnostic &other) const
Definition pending-diagnostic.h:383
bool equal_p(const pending_diagnostic &other) const
Definition pending-diagnostic.h:235
virtual label_text describe_return_of_state(const evdesc::return_of_state &)
Definition pending-diagnostic.h:309
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 void add_function_entry_event(const exploded_edge &eedge, checker_path *emission_path)
virtual void add_call_event(const exploded_edge &, checker_path *)
virtual int get_controlling_option() const =0
virtual diagnostic_event::meaning get_meaning_for_state_change(const evdesc::state_change &) const
Definition pending-diagnostic.h:280
virtual bool check_valid_fpath_p(const feasible_node &, const gimple *) const
Definition pending-diagnostic.h:399
static bool same_tree_p(tree t1, tree t2)
virtual label_text describe_final_event(const evdesc::final_event &)
Definition pending-diagnostic.h:323
virtual bool emit(diagnostic_emission_context &)=0
virtual label_text describe_state_change(const evdesc::state_change &)
Definition pending-diagnostic.h:271
virtual location_t fixup_location(location_t loc, bool primary) const
Definition pending-diagnostic.h:470
bool subclass_equal_p(const pending_note &base_other) const final override
Definition pending-diagnostic.h:472
Definition pending-diagnostic.h:441
virtual ~pending_note()
Definition pending-diagnostic.h:443
virtual bool subclass_equal_p(const pending_note &other) const =0
virtual void emit() const =0
virtual const char * get_kind() const =0
bool equal_p(const pending_note &other) const
Definition pending-diagnostic.h:451
Definition diagnostic-manager.h:31
Definition checker-event.h:347
Definition checker-event.h:674
Definition diagnostic-event-id.h:37
Definition genmatch.cc:845
Definition pretty-print.h:238
Definition diagnostic-format-sarif.h:42
union tree_node * tree
Definition coretypes.h:97
#define ATTRIBUTE_GCC_DIAG(m, n)
Definition diagnostic-core.h:88
bool bool bool bool bool bool void void void inform(location_t, const char *,...) ATTRIBUTE_GCC_DIAG(2
static location_t get_location(const gimple *stmt)
Definition gimple-ssa-warn-access.cc:76
Definition access-diagram.h:30
poly_int< N, C > r
Definition poly-int.h:774
Definition pending-diagnostic.h:93
tree m_caller_fndecl
Definition pending-diagnostic.h:105
tree m_callee_fndecl
Definition pending-diagnostic.h:106
state_machine::state_t m_state
Definition pending-diagnostic.h:108
call_with_state(bool colorize, tree caller_fndecl, tree callee_fndecl, tree expr, state_machine::state_t state)
Definition pending-diagnostic.h:94
tree m_expr
Definition pending-diagnostic.h:107
Definition pending-diagnostic.h:54
event_desc(bool colorize)
Definition pending-diagnostic.h:55
label_text formatted_print(const char *fmt,...) const ATTRIBUTE_GCC_DIAG(2
label_text bool m_colorize
Definition pending-diagnostic.h:60
Definition pending-diagnostic.h:133
state_machine::state_t m_state
Definition pending-diagnostic.h:142
final_event(bool colorize, tree expr, state_machine::state_t state, const warning_event &event)
Definition pending-diagnostic.h:134
const warning_event & m_event
Definition pending-diagnostic.h:143
tree m_expr
Definition pending-diagnostic.h:141
Definition pending-diagnostic.h:114
tree m_callee_fndecl
Definition pending-diagnostic.h:126
state_machine::state_t m_state
Definition pending-diagnostic.h:127
return_of_state(bool colorize, tree caller_fndecl, tree callee_fndecl, state_machine::state_t state)
Definition pending-diagnostic.h:115
tree m_caller_fndecl
Definition pending-diagnostic.h:125
Definition pending-diagnostic.h:66
tree m_expr
Definition pending-diagnostic.h:82
state_machine::state_t m_old_state
Definition pending-diagnostic.h:84
state_change(bool colorize, tree expr, tree origin, state_machine::state_t old_state, state_machine::state_t new_state, diagnostic_event_id_t event_id, const state_change_event &event)
Definition pending-diagnostic.h:67
const state_change_event & m_event
Definition pending-diagnostic.h:87
diagnostic_event_id_t m_event_id
Definition pending-diagnostic.h:86
bool is_global_p() const
Definition pending-diagnostic.h:80
state_machine::state_t m_new_state
Definition pending-diagnostic.h:85
tree m_origin
Definition pending-diagnostic.h:83
Definition event-loc-info.h:29
Definition pending-diagnostic.h:38
void dump_to_pp(pretty_printer *pp, bool simple) const
void add_region_creation(const region *reg)
auto_vec< const region * > m_region_creation
Definition pending-diagnostic.h:43
Definition diagnostic-path.h:114
Definition genautomata.cc:669
#define NULL_TREE
Definition tree.h:317