From cb18f4937451bdddca3e6b30edb2bf27383b1144 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 25 Jul 2025 15:43:36 -0400 Subject: [PATCH 76/98] FIXME: eliminate a use of global_dc from lazy-paths.cc --- gcc/diagnostics/lazy-paths.cc | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/gcc/diagnostics/lazy-paths.cc b/gcc/diagnostics/lazy-paths.cc index 64152a41a9fd..637dae09b696 100644 --- a/gcc/diagnostics/lazy-paths.cc +++ b/gcc/diagnostics/lazy-paths.cc @@ -217,20 +217,10 @@ test_emission (pretty_printer *event_pp) void lazy_paths_cc_tests () { - /* In a few places we use the global dc's printer to determine - colorization so ensure this off during the tests. */ - pretty_printer *global_pp = global_dc->get_reference_printer (); - const bool saved_show_color = pp_show_color (global_pp); - pp_show_color (global_pp) = false; - auto_fix_quotes fix_quotes; - std::unique_ptr event_pp - = std::unique_ptr (global_pp->clone ()); - - test_intraprocedural_path (event_pp.get ()); - test_emission (event_pp.get ()); - - pp_show_color (global_pp) = saved_show_color; + pretty_printer event_pp; + test_intraprocedural_path (&event_pp); + test_emission (&event_pp); } } // namespace diagnostics::selftest -- 2.49.0