diff options
author | David Malcolm <dmalcolm@redhat.com> | 2025-08-08 16:55:46 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2025-08-08 16:55:46 -0400 |
commit | d3fe5a560f0bcca8e11ec0f9bb916f59615f51d8 (patch) | |
tree | 1d8df96298495658fef0425f0f2039e418860488 /libjava/testsuite/libjava.jni/bytebuffer.h | |
parent | ac4e7455a3323750d7f07a3f652b090a1bc2b498 (diff) | |
download | gcc-d3fe5a560f0bcca8e11ec0f9bb916f59615f51d8.zip gcc-d3fe5a560f0bcca8e11ec0f9bb916f59615f51d8.tar.gz gcc-d3fe5a560f0bcca8e11ec0f9bb916f59615f51d8.tar.bz2 |
diagnostics: enable nested diagnostics by default [PR116253]
In GCC 15 I added an experimental nesting view in text sinks
for hierarchical diagnostics, such as C++ template problems.
This patch enables it for text sinks by default. The old
behavior can be restored via -fno-diagnostics-show-nesting,
which the patch also adds to -fdiagnostics-plain-output.
The patch does not yet enable it for text sinks in sarif-replay.
gcc/ChangeLog:
PR diagnostics/116253
* common.opt (fdiagnostics-show-nesting): New option.
(fdiagnostics-show-nesting-locations): New option.
(fdiagnostics-show-nesting-levels): New option.
* common.opt.urls: Regenerate.
* diagnostics/context.cc (context::set_show_nesting): New.
(context::set_show_nesting_locations): New.
(context::set_show_nesting_levels): New.
* diagnostics/context.h (context::set_show_nesting): New decl.
(context::set_show_nesting_locations): New decl.
(context::set_show_nesting_levels): New decl.
* diagnostics/html-sink.cc: Tweak comment.
* diagnostics/output-spec.cc (text_scheme_handler::make_sink):
Rename "experimental-nesting" to "show-nesting" and enable by
default. Rename "experimental-nesting-show-locations" to
"show-nesting-locations". Rename
"experimental-nesting-show-levels" to "show-nesting-levels".
* diagnostics/sink.h (sink::dyn_cast_text_sink): New.
* diagnostics/text-sink.h (text_sink::dyn_cast_text_sink): New.
* doc/invoke.texi: Add -fdiagnostics-show-nesting,
-fdiagnostics-show-nesting-locations, and
-fdiagnostics-show-nesting-levels. Update for changes to
output-spec.cc above.
* lto-wrapper.cc (merge_and_complain): Ignore
OPT_fdiagnostics_show_nesting,
OPT_fdiagnostics_show_nesting_locations, and
OPT_fdiagnostics_show_nesting_levels.
(append_compiler_options): Likewise.
(append_diag_options): Likewise.
* opts-common.cc (decode_cmdline_options_to_array): Add
"-fno-diagnostics-show-nesting" to -fdiagnostics-plain-output.
* opts.cc (common_handle_option): Handle the new options.
(gen_command_line_string): Ignore the new options.
* toplev.cc (general_init): Call set_show_nesting,
set_show_nesting_locations, and set_show_nesting_levels on
global_dc.
gcc/testsuite/ChangeLog:
PR diagnostics/116253
* g++.dg/concepts/nested-diagnostics-1-truncated.C: Update for
renamed keys to -fdiagnostics-set-output=text
* g++.dg/concepts/nested-diagnostics-1.C: Likewise.
* g++.dg/concepts/nested-diagnostics-2.C: Likewise.
* gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c: New
test.
* gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c: New test.
* gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c:
Update for renamed keys to -fdiagnostics-set-output=text.
* gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c:
Likewise.
* gcc.dg/plugin/diagnostic-test-nesting-text-indented.c: Likewise.
* gcc.dg/plugin/plugin.exp: Add the new tests.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libjava/testsuite/libjava.jni/bytebuffer.h')
0 files changed, 0 insertions, 0 deletions