]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: show saved diagnostics as nodes in .eg.dot dumps
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 15 Jun 2022 21:40:33 +0000 (17:40 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 15 Jun 2022 21:40:33 +0000 (17:40 -0400)
commitc540077a3bf60013333a175674558f6eefa08180
treea6ed20b21fe13132900311ff3da30b3bca8a3469
parent44681d454738837ec04752f2d1189a9a47ddf22d
analyzer: show saved diagnostics as nodes in .eg.dot dumps

I've been using this tweak to the output of
-fdump-analyzer-exploded-graph in my working copies for a while;
the extra red nodes make it *much* easier to find the places where
diagnostics are being emitted (or rejected by the diagnostic_manager).

gcc/analyzer/ChangeLog:
* diagnostic-manager.cc (saved_diagnostic::dump_dot_id): New.
(saved_diagnostic::dump_as_dot_node): New.
* diagnostic-manager.h (saved_diagnostic::dump_dot_id): New decl.
(saved_diagnostic::dump_as_dot_node): New decl.
* engine.cc (exploded_node::dump_dot): Add nodes for saved
diagnostics.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/diagnostic-manager.cc
gcc/analyzer/diagnostic-manager.h
gcc/analyzer/engine.cc