]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: avoid using global_dc in path-printing
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 13 Nov 2024 13:26:58 +0000 (08:26 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 13 Nov 2024 13:26:58 +0000 (08:26 -0500)
commit5ace2b23199f4216b0cdb0a41a68617bcdee9b3e
treee57010b45c79427d8d67631825cf6ef31faa38c9
parent5a674367c6da870184f3bdb7ec110b96aa91bb2b
diagnostics: avoid using global_dc in path-printing

gcc/analyzer/ChangeLog:
* checker-path.cc (checker_path::debug): Explicitly use
global_dc's reference printer.
* diagnostic-manager.cc
(diagnostic_manager::prune_interproc_events): Likewise.
(diagnostic_manager::prune_system_headers): Likewise.

gcc/ChangeLog:
* diagnostic-path.cc (diagnostic_event::get_desc): Add param
"ref_pp" and use instead of global_dc.
(class path_label): Likewise, adding field m_ref_pp.
(event_range::event_range): Add param "ref_pp" and pass to
m_path_label.
(path_summary::path_summary): Add param "ref_pp" and pass to
event_range ctor.
(diagnostic_text_output_format::print_path): Pass *pp to
path_summary ctor.
(selftest::test_empty_path): Pass *event_pp to pass_summary ctor.
(selftest::test_intraprocedural_path): Likewise.
(selftest::test_interprocedural_path_1): Likewise.
(selftest::test_interprocedural_path_2): Likewise.
(selftest::test_recursion): Likewise.
(selftest::test_control_flow_1): Likewise.
(selftest::test_control_flow_2): Likewise.
(selftest::test_control_flow_3): Likewise.
(selftest::assert_cfg_edge_path_streq): Likewise.
(selftest::test_control_flow_5): Likewise.
(selftest::test_control_flow_6): Likewise.
* diagnostic-path.h (diagnostic_event::get_desc): Add param
"ref_pp".
* lazy-diagnostic-path.cc (selftest::test_intraprocedural_path):
Pass *event_pp to get_desc.
* simple-diagnostic-path.cc (selftest::test_intraprocedural_path):
Likewise.

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