diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-12-02 16:30:52 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-12-02 16:30:52 -0500 |
commit | e24fe1283ca1c4d22dc3cf29c26d7b705fb0a568 (patch) | |
tree | 4203e14037ebd059e5033a0f5eaf1592eea4ddc5 /gcc/analyzer/bounds-checking.cc | |
parent | f5758fe5b430ef3447fbab947fcea32a1d995f36 (diff) | |
download | gcc-e24fe1283ca1c4d22dc3cf29c26d7b705fb0a568.zip gcc-e24fe1283ca1c4d22dc3cf29c26d7b705fb0a568.tar.gz gcc-e24fe1283ca1c4d22dc3cf29c26d7b705fb0a568.tar.bz2 |
analyzer: introduce struct event_loc_info
gcc/analyzer/ChangeLog:
* analyzer.h (struct event_loc_info): New forward decl.
* bounds-checking.cc: Use event_loc_info throughout to bundle the
loc, fndecl, depth triples.
* call-info.cc: Likewise.
* checker-event.cc: Likewise.
* checker-event.h (struct event_loc_info): New decl. Use it
throughout to bundle the loc, fndecl, depth triples.
* checker-path.cc: Likewise.
* checker-path.h: Likewise.
* diagnostic-manager.cc: Likewise.
* engine.cc: Likewise.
* infinite-recursion.cc: Likewise.
* pending-diagnostic.cc: Likewise.
* pending-diagnostic.h: Likewise.
* region-model.cc: Likewise.
* sm-signal.cc: Likewise.
* varargs.cc: Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/bounds-checking.cc')
-rw-r--r-- | gcc/analyzer/bounds-checking.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/analyzer/bounds-checking.cc b/gcc/analyzer/bounds-checking.cc index 17f183f..4b43c43 100644 --- a/gcc/analyzer/bounds-checking.cc +++ b/gcc/analyzer/bounds-checking.cc @@ -68,16 +68,14 @@ public: void add_region_creation_events (const region *, tree capacity, - location_t loc, - tree fndecl, int depth, + const event_loc_info &loc_info, checker_path &emission_path) override { /* The memory space is described in the diagnostic message itself, so we don't need an event for that. */ if (capacity) emission_path.add_event - (make_unique<region_creation_event_capacity> (capacity, - loc, fndecl, depth)); + (make_unique<region_creation_event_capacity> (capacity, loc_info)); } protected: @@ -165,14 +163,12 @@ public: void add_region_creation_events (const region *, tree, - location_t loc, - tree fndecl, int depth, + const event_loc_info &loc_info, checker_path &emission_path) final override { if (m_byte_bound && TREE_CODE (m_byte_bound) == INTEGER_CST) emission_path.add_event - (make_unique<region_creation_event_capacity> (m_byte_bound, - loc, fndecl, depth)); + (make_unique<region_creation_event_capacity> (m_byte_bound, loc_info)); } protected: |