]> gcc.gnu.org Git - gcc.git/commit
analyzer: refactor custom_event, introducing precanned_custom_event class
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 18 Jun 2021 15:18:10 +0000 (11:18 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 18 Jun 2021 15:18:10 +0000 (11:18 -0400)
commit86606d2ab731a4b8dbbe1e5318a1920210abd65d
tree4911fc2b1822b68f72df6a68245438ad3e0adbe2
parent0532452dcd17910dfd3d2b0df50dfe3ef1194bf7
analyzer: refactor custom_event, introducing precanned_custom_event class

I have followup work where a custom event's description would be better
handled via a vfunc rather that a precanned string, hence this
refactoring to make it easy to add custom_event subclasses.

gcc/analyzer/ChangeLog:
* checker-path.cc (class custom_event): Make abstract to allow for
custom vfuncs, splitting existing implementation into...
(class precanned_custom_event): New subclass.
(custom_event::get_desc): Move to...
(precanned_custom_event::get_desc): ...subclass.
* checker-path.h (class custom_event): Make abstract to allow for
custom vfuncs, splitting existing implementation into...
(class precanned_custom_event): New subclass.
* diagnostic-manager.cc (diagnostic_manager::add_events_for_eedge):
Use precanned_custom_event.
* engine.cc
(stale_jmp_buf::maybe_add_custom_events_for_superedge): Likewise.
* sm-signal.cc (signal_delivery_edge_info_t::add_events_to_path):
Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/checker-path.cc
gcc/analyzer/checker-path.h
gcc/analyzer/diagnostic-manager.cc
gcc/analyzer/engine.cc
gcc/analyzer/sm-signal.cc
This page took 0.064841 seconds and 5 git commands to generate.