diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/analyzer/checker-path.h | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/analyzer/checker-path.h')
-rw-r--r-- | gcc/analyzer/checker-path.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/gcc/analyzer/checker-path.h b/gcc/analyzer/checker-path.h index f76bb94..27634c2 100644 --- a/gcc/analyzer/checker-path.h +++ b/gcc/analyzer/checker-path.h @@ -56,6 +56,7 @@ extern const char *event_kind_to_string (enum event_kind ek); checker_event debug_event (EK_DEBUG) custom_event (EK_CUSTOM) + precanned_custom_event statement_event (EK_STMT) function_entry_event (EK_FUNCTION_ENTRY) state_change_event (EK_STATE_CHANGE) @@ -144,19 +145,30 @@ private: char *m_desc; }; -/* A concrete event subclass for custom events. These are not filtered, +/* An abstract event subclass for custom events. These are not filtered, as they are likely to be pertinent to the diagnostic. */ class custom_event : public checker_event { +protected: + custom_event (location_t loc, tree fndecl, int depth) + : checker_event (EK_CUSTOM, loc, fndecl, depth) + { + } +}; + +/* A concrete custom_event subclass with a precanned message. */ + +class precanned_custom_event : public custom_event +{ public: - custom_event (location_t loc, tree fndecl, int depth, - const char *desc) - : checker_event (EK_CUSTOM, loc, fndecl, depth), + precanned_custom_event (location_t loc, tree fndecl, int depth, + const char *desc) + : custom_event (loc, fndecl, depth), m_desc (xstrdup (desc)) { } - ~custom_event () + ~precanned_custom_event () { free (m_desc); } @@ -326,6 +338,9 @@ public: label_text get_desc (bool can_colorize) const FINAL OVERRIDE; bool is_call_p () const FINAL OVERRIDE; + + const supernode *m_src_snode; + const supernode *m_dest_snode; }; /* A concrete event subclass for an interprocedural return. */ @@ -339,6 +354,9 @@ public: label_text get_desc (bool can_colorize) const FINAL OVERRIDE; bool is_return_p () const FINAL OVERRIDE; + + const supernode *m_src_snode; + const supernode *m_dest_snode; }; /* A concrete event subclass for the start of a consolidated run of CFG |