]> git.ipfire.org Git - people/ms/gcc.git/commit
analyzer: show saved diagnostics as nodes in .eg.dot dumps
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 27 Jul 2022 21:38:54 +0000 (17:38 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 27 Jul 2022 21:54:31 +0000 (17:54 -0400)
commit9fa11419ef59fde9d00ea8458235baa2bc83cd7a
tree80c2b1d6f88309ba9970e88c076221918cc0cf43
parent4eac9fa087f4efd0748c9ff51bec1155a9b6b41e
analyzer: show saved diagnostics as nodes in .eg.dot dumps

(cherry picked from r13-1117-gc540077a3bf600)

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