]>
git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: suppress "note: " prefix in nested diagnostics [PR116253]
This patch is a followup to:
"c++: use diagnostic nesting [PR116253]"
This patch tweaks how text output with experimental-nesting=yes
prints nested diagnostics, by omitting the leading "note: " from
nested notes.
This reduces the amount of visual cruft the user has to ignore when
reading C++ template errors; see the examples in the testsuite.
This doesn't affect the output for users who have not opted-in
to nested diagnostic-printing.
gcc/ChangeLog:
PR other/116253
* diagnostic-format-text.cc (build_prefix): Don't add the
"note: " prefix when showing nested diagnostics.
gcc/testsuite/ChangeLog:
PR other/116253
* g++.dg/concepts/nested-diagnostics-1-truncated.C: Update
expected output.
* g++.dg/concepts/nested-diagnostics-1.C: Likewise.
* g++.dg/concepts/nested-diagnostics-2.C: Likewise.
* gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c:
Likewise.
* gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c:
Likewise.
* gcc.dg/plugin/diagnostic-test-nesting-text-indented.c: Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>