GCC Middle and Back End API Reference
checker-event.h
Go to the documentation of this file.
1/* Subclasses of diagnostic_event for analyzer diagnostics.
2 Copyright (C) 2019-2025 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_ANALYZER_CHECKER_EVENT_H
22#define GCC_ANALYZER_CHECKER_EVENT_H
23
27
28namespace ana {
29
30/* An enum for discriminating between the concrete subclasses of
31 checker_event. */
32
56
57extern const char *event_kind_to_string (enum event_kind ek);
58
59/* Event subclasses.
60
61 The class hierarchy looks like this (using indentation to show
62 inheritance, and with event_kinds shown for the concrete subclasses):
63
64 diagnostic_event
65 checker_event
66 debug_event (event_kind::debug)
67 custom_event (event_kind::custom)
68 precanned_custom_event
69 statement_event (event_kind::stmt)
70 region_creation_event (event_kind::region_creation)
71 function_entry_event (event_kind::function_entry)
72 state_change_event (event_kind::state_change)
73 superedge_event
74 cfg_edge_event
75 start_cfg_edge_event (event_kind::start_cfg_edge)
76 end_cfg_edge_event (event_kind::end_cfg_edge)
77 catch_cfg_edge_event (event_kind::catch_cfg_edge)
78 call_event (event_kind::call_edge)
79 return_edge (event_kind::return_edge)
80 start_consolidated_cfg_edges_event (event_kind::start_consolidated_cfg_edges)
81 end_consolidated_cfg_edges_event (event_kind::end_consolidated_cfg_edges)
82 inlined_call_event (event_kind::inlined_call)
83 setjmp_event (event_kind::setjmp_)
84 rewind_event
85 rewind_from_longjmp_event (event_kind::rewind_from_longjmp)
86 rewind_to_setjmp_event (event_kind::rewind_to_setjmp)
87 throw_event (event_kind:throw_)
88 explicit_throw_event
89 throw_from_call_to_external_fn_event
90 unwind_event (event_kind::unwind)
91 warning_event (event_kind::warning). */
92
93/* Abstract subclass of diagnostic_event; the base class for use in
94 checker_path (the analyzer's diagnostic_path subclass). */
95
97{
98public:
99 /* Implementation of diagnostic_event. */
100
101 location_t get_location () const final override { return m_loc; }
102 int get_stack_depth () const final override { return m_effective_depth; }
104 {
105 return m_logical_loc;
106 }
107 meaning get_meaning () const override;
108 bool connect_to_next_event_p () const override { return false; }
110 {
111 return 0;
112 }
113
114 void
116 sarif_object &thread_flow_loc_obj) const override;
117
118 /* Additional functionality. */
119 tree get_fndecl () const { return m_effective_fndecl; }
120
122
125 diagnostic_event_id_t emission_id);
126 virtual bool is_call_p () const { return false; }
127 virtual bool is_function_entry_p () const { return false; }
128 virtual bool is_return_p () const { return false; }
129
130 /* For use with %@. */
132 {
133 return &m_emission_id;
134 }
135
136 void dump (pretty_printer *pp) const;
137 void debug () const;
138
139 void set_location (location_t loc) { m_loc = loc; }
140
141protected:
143 const event_loc_info &loc_info);
144
145 public:
146 const enum event_kind m_kind;
147 protected:
148 location_t m_loc;
154 diagnostic_event_id_t m_emission_id; // only set once all pruning has occurred
156};
157
158/* A concrete event subclass for a purely textual event, for use in
159 debugging path creation and filtering. */
160
162{
163public:
164
165 debug_event (const event_loc_info &loc_info,
166 const char *desc)
167 : checker_event (event_kind::debug, loc_info),
168 m_desc (xstrdup (desc))
169 {
170 }
172 {
173 free (m_desc);
174 }
175
176 void print_desc (pretty_printer &) const final override;
177
178private:
179 char *m_desc;
180};
181
182/* An abstract event subclass for custom events. These are not filtered,
183 as they are likely to be pertinent to the diagnostic. */
184
186{
187protected:
188 custom_event (const event_loc_info &loc_info)
189 : checker_event (event_kind::custom, loc_info)
190 {
191 }
192};
193
194/* A concrete custom_event subclass with a precanned message. */
195
197{
198public:
200 const char *desc)
201 : custom_event (loc_info),
202 m_desc (xstrdup (desc))
203 {
204 }
206 {
207 free (m_desc);
208 }
209
210 void print_desc (pretty_printer &) const final override;
211
212private:
213 char *m_desc;
214};
215
216/* A concrete event subclass describing the execution of a gimple statement,
217 for use at high verbosity levels when debugging paths. */
218
220{
221public:
222 statement_event (const gimple *stmt, tree fndecl, int depth,
223 const program_state &dst_state);
224
225 void print_desc (pretty_printer &) const final override;
226
227 const gimple * const m_stmt;
229};
230
231/* An abstract event subclass describing the creation of a region that
232 is significant for a diagnostic.
233
234 There are too many combinations to express region creation in one message,
235 so we emit multiple region_creation_event instances when each pertinent
236 region is created.
237
238 The events are created by pending_diagnostic's add_region_creation_events
239 vfunc, which by default creates a region_creation_event_memory_space, and
240 if a capacity is known, a region_creation_event_capacity, giving e.g.:
241 (1) region created on stack here
242 (2) capacity: 100 bytes
243 but this vfunc can be overridden to create other events if other wordings
244 are more appropriate foa a given pending_diagnostic. */
245
247{
248protected:
250};
251
252/* Concrete subclass of region_creation_event.
253 Generates a message based on the memory space of the region
254 e.g. "region created on stack here". */
255
257{
258public:
260 const event_loc_info &loc_info)
261 : region_creation_event (loc_info),
262 m_mem_space (mem_space)
263 {
264 }
265
266 void print_desc (pretty_printer &pp) const final override;
267
268private:
270};
271
272/* Concrete subclass of region_creation_event.
273 Generates a message based on the capacity of the region
274 e.g. "capacity: 100 bytes". */
275
277{
278public:
280 const event_loc_info &loc_info)
281 : region_creation_event (loc_info),
282 m_capacity (capacity)
283 {
285 }
286
287 void print_desc (pretty_printer &pp) const final override;
288
289private:
291};
292
293/* Concrete subclass of region_creation_event.
294 Generates a message based on the capacity of the region
295 e.g. "allocated 100 bytes here". */
296
298{
299public:
301 const event_loc_info &loc_info)
302 : region_creation_event (loc_info),
303 m_capacity (capacity)
304 {}
305
306 void print_desc (pretty_printer &pp) const final override;
307
308private:
310};
311
312/* Concrete subclass of region_creation_event.
313 Generates a debug message intended for analyzer developers. */
314
316{
317public:
319 const event_loc_info &loc_info)
320 : region_creation_event (loc_info),
321 m_reg (reg), m_capacity (capacity)
322 {
323 }
324
325 void print_desc (pretty_printer &pp) const final override;
326
327private:
328 const region *m_reg;
330};
331
332/* An event subclass describing the entry to a function. */
333
335{
336public:
339 {
340 }
341
343
344 void print_desc (pretty_printer &pp) const override;
345 meaning get_meaning () const override;
346
347 bool is_function_entry_p () const final override { return true; }
348};
349
350/* Subclass of checker_event describing a state change. */
351
353{
354public:
356 int stack_depth,
357 const state_machine &sm,
358 const svalue *sval,
361 const svalue *origin,
362 const program_state &dst_state,
363 const exploded_node *enode);
364
365 void print_desc (pretty_printer &pp) const final override;
366 meaning get_meaning () const override;
367
369 {
370 return m_dst_state.get_current_function ();
371 }
372
373 const exploded_node *get_exploded_node () const { return m_enode; }
374
384};
385
386/* Subclass of checker_event; parent class for subclasses that relate to
387 a superedge. */
388
390{
391public:
393 sarif_object &thread_flow_loc_obj)
394 const override;
395
396 /* Mark this edge event as being either an interprocedural call or
397 return in which VAR is in STATE, and that this is critical to the
398 diagnostic (so that print_desc can attempt to get a better description
399 from any pending_diagnostic). */
405
407
408 bool should_filter_p (int verbosity) const;
409
410 protected:
411 superedge_event (enum event_kind kind, const exploded_edge &eedge,
412 const event_loc_info &loc_info);
413
414 public:
419};
420
421/* An abstract event subclass for when a CFG edge is followed; it has two
422 subclasses, representing the start of the edge and the end of the
423 edge, which come in pairs. */
424
426{
427public:
428 meaning get_meaning () const override;
429
431
432 protected:
433 cfg_edge_event (enum event_kind kind, const exploded_edge &eedge,
434 const event_loc_info &loc_info);
435};
436
437/* A concrete event subclass for the start of a CFG edge
438 e.g. "following 'false' branch...'. */
439
441{
442public:
444 const event_loc_info &loc_info)
445 : cfg_edge_event (event_kind::start_cfg_edge, eedge, loc_info)
446 {
447 }
448
449 void print_desc (pretty_printer &pp) const override;
450 bool connect_to_next_event_p () const final override { return true; }
451
452protected:
453 label_text maybe_describe_condition (bool can_colorize) const;
454
455private:
456 static label_text maybe_describe_condition (bool can_colorize,
457 tree lhs,
458 enum tree_code op,
459 tree rhs);
461};
462
463/* A concrete event subclass for the end of a CFG edge
464 e.g. "...to here'. */
465
467{
468public:
470 const event_loc_info &loc_info)
471 : cfg_edge_event (event_kind::end_cfg_edge, eedge, loc_info)
472 {
473 }
474
475 void print_desc (pretty_printer &pp) const final override
476 {
477 pp_string (&pp, "...to here");
478 }
479};
480
481/* A concrete event subclass for catching an exception
482 e.g. "...catching 'struct io_error' here". */
483
485{
486public:
488 const event_loc_info &loc_info,
489 tree type)
490 : cfg_edge_event (event_kind::catch_, eedge, loc_info),
491 m_type (type)
492 {
493 }
494
495 void print_desc (pretty_printer &pp) const final override
496 {
497 if (m_type)
498 pp_printf (&pp, "...catching exception of type %qT here", m_type);
499 else
500 pp_string (&pp, "...catching exception here");
501 }
502
503private:
505};
506
507/* A concrete event subclass for an interprocedural call. */
508
510{
511public:
513 const event_loc_info &loc_info);
514
515 void print_desc (pretty_printer &pp) const override;
516 meaning get_meaning () const override;
517
518 bool is_call_p () const final override;
519
520protected:
523
526};
527
528/* A concrete event subclass for an interprocedural return. */
529
531{
532public:
534 const event_loc_info &loc_info);
535
536 void print_desc (pretty_printer &pp) const final override;
537 meaning get_meaning () const override;
538
539 bool is_return_p () const final override;
540
543};
544
545/* A concrete event subclass for the start of a consolidated run of CFG
546 edges all either TRUE or FALSE e.g. "following 'false' branch...'. */
547
549{
550public:
552 bool edge_sense)
554 m_edge_sense (edge_sense)
555 {
556 }
557
558 void print_desc (pretty_printer &pp) const final override;
559 meaning get_meaning () const override;
560 bool connect_to_next_event_p () const final override { return true; }
561
562 private:
564};
565
566/* A concrete event subclass for the end of a consolidated run of
567 CFG edges e.g. "...to here'. */
568
570{
571public:
576
577 void print_desc (pretty_printer &pp) const final override
578 {
579 pp_string (&pp, "...to here");
580 }
581};
582
583/* A concrete event subclass for describing an inlined call event
584 e.g. "inlined call to 'callee' from 'caller'". */
585
587{
588public:
589 inlined_call_event (location_t loc,
590 tree apparent_callee_fndecl,
591 tree apparent_caller_fndecl,
592 int actual_depth,
593 int stack_depth_adjustment)
595 event_loc_info (loc,
596 apparent_caller_fndecl,
597 actual_depth + stack_depth_adjustment)),
598 m_apparent_callee_fndecl (apparent_callee_fndecl),
599 m_apparent_caller_fndecl (apparent_caller_fndecl)
600 {
601 gcc_assert (LOCATION_BLOCK (loc) == NULL);
602 }
603
604 void print_desc (pretty_printer &) const final override;
605 meaning get_meaning () const override;
606
607private:
610};
611
612/* A concrete event subclass for a setjmp or sigsetjmp call. */
613
615{
616public:
617 setjmp_event (const event_loc_info &loc_info,
618 const exploded_node *enode,
619 const gcall &setjmp_call)
620 : checker_event (event_kind::setjmp_, loc_info),
621 m_enode (enode), m_setjmp_call (setjmp_call)
622 {
623 }
624
625 void print_desc (pretty_printer &pp) const final override;
626
629 diagnostic_event_id_t emission_id) final override;
630
631private:
634};
635
636/* An abstract event subclass for rewinding from a longjmp to a setjmp
637 (or siglongjmp to sigsetjmp).
638
639 Base class for two from/to subclasses, showing the two halves of the
640 rewind. */
641
643{
644public:
647 const exploded_edge *get_eedge () const { return m_eedge; }
648
649 protected:
651 enum event_kind kind,
652 const event_loc_info &loc_info,
653 const rewind_info_t *rewind_info);
655
656 private:
658};
659
660/* A concrete event subclass for rewinding from a longjmp to a setjmp,
661 showing the longjmp (or siglongjmp). */
662
664{
665public:
667 const event_loc_info &loc_info,
668 const rewind_info_t *rewind_info)
669 : rewind_event (eedge, event_kind::rewind_from_longjmp, loc_info,
670 rewind_info)
671 {
672 }
673
674 void print_desc (pretty_printer &pp) const final override;
675};
676
677/* A concrete event subclass for rewinding from a longjmp to a setjmp,
678 showing the setjmp (or sigsetjmp). */
679
681{
682public:
684 const event_loc_info &loc_info,
685 const rewind_info_t *rewind_info)
686 : rewind_event (eedge, event_kind::rewind_to_setjmp, loc_info,
687 rewind_info)
688 {
689 }
690
691 void print_desc (pretty_printer &pp) const final override;
692
695 diagnostic_event_id_t emission_id) final override;
696
697private:
699};
700
701/* An abstract subclass for throwing/rethrowing an exception. */
702
704{
705public:
706 throw_event (const event_loc_info &loc_info,
707 const exploded_node *enode,
708 const gcall &throw_call)
709 : checker_event (event_kind::throw_, loc_info),
710 m_enode (enode),
711 m_throw_call (throw_call)
712 {
713 }
714
715protected:
718};
719
720/* A concrete event subclass for an explicit "throw EXC;"
721 or "throw;" (actually, a call to __cxa_throw or __cxa_rethrow). */
722
724{
725public:
727 const exploded_node *enode,
728 const gcall &throw_call,
729 tree type,
730 bool is_rethrow)
731 : throw_event (loc_info, enode, throw_call),
732 m_type (type),
733 m_is_rethrow (is_rethrow)
734 {
735 }
736
737 void print_desc (pretty_printer &pp) const final override;
738
739private:
742};
743
744/* A concrete event subclass for an exception being thrown
745 from within a call to a function we don't have the body of,
746 or where we don't know what function was called. */
747
749{
750public:
752 const exploded_node *enode,
753 const gcall &throw_call,
754 tree fndecl)
755 : throw_event (loc_info, enode, throw_call),
756 m_fndecl (fndecl)
757 {
758 }
759
760 void print_desc (pretty_printer &pp) const final override;
761
762private:
764};
765
766/* A concrete event subclass for unwinding a stack frame when
767 processing an exception. */
768
770{
771public:
772 unwind_event (const event_loc_info &loc_info)
773 : checker_event (event_kind::unwind, loc_info),
774 m_num_frames (1)
775 {
776 }
777
778 void print_desc (pretty_printer &pp) const final override;
779
781};
782
783/* Concrete subclass of checker_event for use at the end of a path:
784 a repeat of the warning message at the end of the path (perhaps with
785 references to pertinent events that occurred on the way), at the point
786 where the problem occurs. */
787
789{
790public:
792 const exploded_node *enode,
793 const state_machine *sm,
795 : checker_event (event_kind::warning, loc_info),
796 m_enode (enode),
797 m_sm (sm), m_var (var), m_state (state)
798 {
799 }
800
801 void print_desc (pretty_printer &pp) const final override;
802 meaning get_meaning () const override;
803
804 const exploded_node *get_exploded_node () const { return m_enode; }
805
806private:
811};
812
813} // namespace ana
814
815#endif /* GCC_ANALYZER_CHECKER_EVENT_H */
void print_desc(pretty_printer &pp) const override
meaning get_meaning() const override
call_event(const exploded_edge &eedge, const event_loc_info &loc_info)
bool is_call_p() const final override
tree get_callee_fndecl() const
const supernode * m_dest_snode
Definition checker-event.h:525
tree get_caller_fndecl() const
const supernode * m_src_snode
Definition checker-event.h:524
Definition supergraph.h:400
tree m_type
Definition checker-event.h:504
catch_cfg_edge_event(const exploded_edge &eedge, const event_loc_info &loc_info, tree type)
Definition checker-event.h:487
void print_desc(pretty_printer &pp) const final override
Definition checker-event.h:495
meaning get_meaning() const override
cfg_edge_event(enum event_kind kind, const exploded_edge &eedge, const event_loc_info &loc_info)
const cfg_superedge & get_cfg_superedge() const
Definition supergraph.h:522
virtual void prepare_for_emission(checker_path *, pending_diagnostic *pd, diagnostic_event_id_t emission_id)
checker_event(enum event_kind kind, const event_loc_info &loc_info)
void debug() const
virtual bool is_return_p() const
Definition checker-event.h:128
tree m_effective_fndecl
Definition checker-event.h:150
diagnostic_event_id_t m_emission_id
Definition checker-event.h:154
int get_stack_depth() const final override
Definition checker-event.h:102
location_t m_loc
Definition checker-event.h:148
const diagnostic_event_id_t * get_id_ptr() const
Definition checker-event.h:131
enum event_kind m_kind
Definition checker-event.h:146
tree m_original_fndecl
Definition checker-event.h:149
virtual bool is_function_entry_p() const
Definition checker-event.h:127
logical_location m_logical_loc
Definition checker-event.h:155
void set_location(location_t loc)
Definition checker-event.h:139
pending_diagnostic * m_pending_diagnostic
Definition checker-event.h:153
bool connect_to_next_event_p() const override
Definition checker-event.h:108
int get_original_stack_depth() const
Definition checker-event.h:121
location_t get_location() const final override
Definition checker-event.h:101
virtual bool is_call_p() const
Definition checker-event.h:126
tree get_fndecl() const
Definition checker-event.h:119
void maybe_add_sarif_properties(sarif_builder &, sarif_object &thread_flow_loc_obj) const override
int m_effective_depth
Definition checker-event.h:152
int m_original_depth
Definition checker-event.h:151
diagnostic_thread_id_t get_thread_id() const final override
Definition checker-event.h:109
meaning get_meaning() const override
logical_location get_logical_location() const final override
Definition checker-event.h:103
void dump(pretty_printer *pp) const
Definition checker-path.h:32
custom_event(const event_loc_info &loc_info)
Definition checker-event.h:188
char * m_desc
Definition checker-event.h:179
~debug_event()
Definition checker-event.h:171
debug_event(const event_loc_info &loc_info, const char *desc)
Definition checker-event.h:165
void print_desc(pretty_printer &) const final override
end_cfg_edge_event(const exploded_edge &eedge, const event_loc_info &loc_info)
Definition checker-event.h:469
void print_desc(pretty_printer &pp) const final override
Definition checker-event.h:475
end_consolidated_cfg_edges_event(const event_loc_info &loc_info)
Definition checker-event.h:572
void print_desc(pretty_printer &pp) const final override
Definition checker-event.h:577
tree m_type
Definition checker-event.h:740
void print_desc(pretty_printer &pp) const final override
bool m_is_rethrow
Definition checker-event.h:741
explicit_throw_event(const event_loc_info &loc_info, const exploded_node *enode, const gcall &throw_call, tree type, bool is_rethrow)
Definition checker-event.h:726
Definition exploded-graph.h:394
Definition exploded-graph.h:203
function_entry_event(const program_point &dst_point)
meaning get_meaning() const override
bool is_function_entry_p() const final override
Definition checker-event.h:347
void print_desc(pretty_printer &pp) const override
function_entry_event(const event_loc_info &loc_info)
Definition checker-event.h:337
meaning get_meaning() const override
void print_desc(pretty_printer &) const final override
inlined_call_event(location_t loc, tree apparent_callee_fndecl, tree apparent_caller_fndecl, int actual_depth, int stack_depth_adjustment)
Definition checker-event.h:589
tree m_apparent_callee_fndecl
Definition checker-event.h:608
tree m_apparent_caller_fndecl
Definition checker-event.h:609
Definition pending-diagnostic.h:190
~precanned_custom_event()
Definition checker-event.h:205
char * m_desc
Definition checker-event.h:213
void print_desc(pretty_printer &) const final override
precanned_custom_event(const event_loc_info &loc_info, const char *desc)
Definition checker-event.h:199
Definition program-point.h:175
Definition program-state.h:221
tree m_capacity
Definition checker-event.h:309
void print_desc(pretty_printer &pp) const final override
region_creation_event_allocation_size(tree capacity, const event_loc_info &loc_info)
Definition checker-event.h:300
void print_desc(pretty_printer &pp) const final override
region_creation_event_capacity(tree capacity, const event_loc_info &loc_info)
Definition checker-event.h:279
tree m_capacity
Definition checker-event.h:290
region_creation_event_debug(const region *reg, tree capacity, const event_loc_info &loc_info)
Definition checker-event.h:318
tree m_capacity
Definition checker-event.h:329
const region * m_reg
Definition checker-event.h:328
void print_desc(pretty_printer &pp) const final override
enum memory_space m_mem_space
Definition checker-event.h:269
void print_desc(pretty_printer &pp) const final override
region_creation_event_memory_space(enum memory_space mem_space, const event_loc_info &loc_info)
Definition checker-event.h:259
region_creation_event(const event_loc_info &loc_info)
Definition region.h:126
const supernode * m_dest_snode
Definition checker-event.h:542
return_event(const exploded_edge &eedge, const event_loc_info &loc_info)
void print_desc(pretty_printer &pp) const final override
bool is_return_p() const final override
const supernode * m_src_snode
Definition checker-event.h:541
meaning get_meaning() const override
tree get_longjmp_caller() const
rewind_event(const exploded_edge *eedge, enum event_kind kind, const event_loc_info &loc_info, const rewind_info_t *rewind_info)
tree get_setjmp_caller() const
const exploded_edge * m_eedge
Definition checker-event.h:657
const rewind_info_t * m_rewind_info
Definition checker-event.h:654
const exploded_edge * get_eedge() const
Definition checker-event.h:647
rewind_from_longjmp_event(const exploded_edge *eedge, const event_loc_info &loc_info, const rewind_info_t *rewind_info)
Definition checker-event.h:666
void print_desc(pretty_printer &pp) const final override
Definition exploded-graph.h:470
void prepare_for_emission(checker_path *path, pending_diagnostic *pd, diagnostic_event_id_t emission_id) final override
rewind_to_setjmp_event(const exploded_edge *eedge, const event_loc_info &loc_info, const rewind_info_t *rewind_info)
Definition checker-event.h:683
void print_desc(pretty_printer &pp) const final override
diagnostic_event_id_t m_original_setjmp_event_id
Definition checker-event.h:698
const gcall & m_setjmp_call
Definition checker-event.h:633
void print_desc(pretty_printer &pp) const final override
void prepare_for_emission(checker_path *path, pending_diagnostic *pd, diagnostic_event_id_t emission_id) final override
const exploded_node * m_enode
Definition checker-event.h:632
setjmp_event(const event_loc_info &loc_info, const exploded_node *enode, const gcall &setjmp_call)
Definition checker-event.h:617
bool connect_to_next_event_p() const final override
Definition checker-event.h:450
void print_desc(pretty_printer &pp) const override
static label_text maybe_describe_condition(bool can_colorize, tree lhs, enum tree_code op, tree rhs)
start_cfg_edge_event(const exploded_edge &eedge, const event_loc_info &loc_info)
Definition checker-event.h:443
label_text maybe_describe_condition(bool can_colorize) const
static bool should_print_expr_p(tree)
bool connect_to_next_event_p() const final override
Definition checker-event.h:560
meaning get_meaning() const override
start_consolidated_cfg_edges_event(const event_loc_info &loc_info, bool edge_sense)
Definition checker-event.h:551
bool m_edge_sense
Definition checker-event.h:563
void print_desc(pretty_printer &pp) const final override
state_machine::state_t m_to
Definition checker-event.h:380
state_machine::state_t m_from
Definition checker-event.h:379
void print_desc(pretty_printer &pp) const final override
const svalue * m_origin
Definition checker-event.h:381
state_change_event(const supernode *node, const gimple *stmt, int stack_depth, const state_machine &sm, const svalue *sval, state_machine::state_t from, state_machine::state_t to, const svalue *origin, const program_state &dst_state, const exploded_node *enode)
const exploded_node * get_exploded_node() const
Definition checker-event.h:373
meaning get_meaning() const override
const supernode * m_node
Definition checker-event.h:375
program_state m_dst_state
Definition checker-event.h:382
const state_machine & m_sm
Definition checker-event.h:377
const svalue * m_sval
Definition checker-event.h:378
const exploded_node * m_enode
Definition checker-event.h:383
const gimple * m_stmt
Definition checker-event.h:376
const function * get_dest_function() const
Definition checker-event.h:368
Definition sm.h:40
const state_machine::state * state_t
Definition sm.h:60
statement_event(const gimple *stmt, tree fndecl, int depth, const program_state &dst_state)
void print_desc(pretty_printer &) const final override
const gimple *const m_stmt
Definition checker-event.h:227
const program_state m_dst_state
Definition checker-event.h:228
state_machine::state_t m_critical_state
Definition checker-event.h:418
superedge_event(enum event_kind kind, const exploded_edge &eedge, const event_loc_info &loc_info)
const callgraph_superedge & get_callgraph_superedge() const
void maybe_add_sarif_properties(sarif_builder &, sarif_object &thread_flow_loc_obj) const override
tree m_var
Definition checker-event.h:417
const exploded_edge & m_eedge
Definition checker-event.h:415
bool should_filter_p(int verbosity) const
void record_critical_state(tree var, state_machine::state_t state)
Definition checker-event.h:400
const superedge * m_sedge
Definition checker-event.h:416
Definition supergraph.h:318
Definition supergraph.h:239
Definition svalue.h:92
const gcall & m_throw_call
Definition checker-event.h:717
throw_event(const event_loc_info &loc_info, const exploded_node *enode, const gcall &throw_call)
Definition checker-event.h:706
const exploded_node * m_enode
Definition checker-event.h:716
void print_desc(pretty_printer &pp) const final override
throw_from_call_to_external_fn_event(const event_loc_info &loc_info, const exploded_node *enode, const gcall &throw_call, tree fndecl)
Definition checker-event.h:751
tree m_fndecl
Definition checker-event.h:763
unwind_event(const event_loc_info &loc_info)
Definition checker-event.h:772
void print_desc(pretty_printer &pp) const final override
int m_num_frames
Definition checker-event.h:780
tree m_var
Definition checker-event.h:809
const exploded_node * get_exploded_node() const
Definition checker-event.h:804
const state_machine * m_sm
Definition checker-event.h:808
meaning get_meaning() const override
const exploded_node * m_enode
Definition checker-event.h:807
void print_desc(pretty_printer &pp) const final override
state_machine::state_t m_state
Definition checker-event.h:810
warning_event(const event_loc_info &loc_info, const exploded_node *enode, const state_machine *sm, tree var, state_machine::state_t state)
Definition checker-event.h:791
Definition diagnostic-event-id.h:37
Definition diagnostic-path.h:72
Definition pretty-print.h:241
Definition diagnostic-format-sarif.cc:747
Definition diagnostic-format-sarif.h:137
static struct path_prefix cpath path
Definition collect2.cc:514
union tree_node * tree
Definition coretypes.h:97
int diagnostic_thread_id_t
Definition diagnostic-event-id.h:70
void final(rtx_insn *first, FILE *file, int optimize_p)
Definition final.cc:2008
free(str)
tree_code
Definition genmatch.cc:1002
#define LOCATION_BLOCK(LOC)
Definition input.h:196
logical_location_manager::key logical_location
Definition logical-location.h:173
Definition access-diagram.h:30
event_kind
Definition checker-event.h:34
@ function_entry
Definition checker-event.h:39
@ throw_
Definition checker-event.h:52
@ unwind
Definition checker-event.h:53
@ stmt
Definition checker-event.h:37
@ setjmp_
Definition checker-event.h:49
@ rewind_to_setjmp
Definition checker-event.h:51
@ start_consolidated_cfg_edges
Definition checker-event.h:46
@ start_cfg_edge
Definition checker-event.h:41
@ region_creation
Definition checker-event.h:38
@ inlined_call
Definition checker-event.h:48
@ warning
Definition checker-event.h:54
@ state_change
Definition checker-event.h:40
@ rewind_from_longjmp
Definition checker-event.h:50
@ catch_
Definition checker-event.h:43
@ custom
Definition checker-event.h:36
@ return_edge
Definition checker-event.h:45
@ end_cfg_edge
Definition checker-event.h:42
@ debug
Definition checker-event.h:35
@ call_edge
Definition checker-event.h:44
@ end_consolidated_cfg_edges
Definition checker-event.h:47
const char * event_kind_to_string(enum event_kind ek)
memory_space
Definition region.h:32
void pp_printf(pretty_printer *pp, const char *msg,...)
Definition pretty-print.cc:2571
void pp_string(pretty_printer *pp, const char *str)
Definition pretty-print.cc:2652
Definition event-loc-info.h:29
Definition diagnostic-path.h:116
Definition function.h:249
Definition gimple.h:352
Definition gimple.h:221
Definition genautomata.cc:669
Definition gengtype.h:252
#define NULL
Definition system.h:50
#define gcc_assert(EXPR)
Definition system.h:814