diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-12-11 10:24:26 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-12-11 10:24:26 -0500 |
commit | d3dd24acd74605488ebdb93c8b95da958053d43f (patch) | |
tree | 27763c1c7acbbb1812a2f196a6f635749d5637cf /gcc/testsuite/g++.dg/cpp23 | |
parent | 331226fd87c2010928329ef35b6d4f680d9234d1 (diff) | |
download | gcc-d3dd24acd74605488ebdb93c8b95da958053d43f.zip gcc-d3dd24acd74605488ebdb93c8b95da958053d43f.tar.gz gcc-d3dd24acd74605488ebdb93c8b95da958053d43f.tar.bz2 |
c++: print z candidate count and number them (v2)
Changed in v2: changed wording to "there is"/"there are" rather
than "we found".
This patch is a followup to:
"c++: use diagnostic nesting [PR116253]"
Following Sy Brand's UX suggestions in P2429R0 for example 1, this patch
tweaks print_z_candidates to add a note about the number of candidates,
and adds a candidate number to each one.
Various examples of output can be seen in the testsuite part of the
patch.
gcc/cp/ChangeLog:
* call.cc (print_z_candidates): Count the number of
candidates and issue a note stating the count at an
intermediate nesting level. Number the individual
candidates.
gcc/testsuite/ChangeLog:
* g++.dg/concepts/diagnostic9.C: Update expected
results for candidate count and numbering.
* g++.dg/concepts/nested-diagnostics-1-truncated.C:
* g++.dg/concepts/nested-diagnostics-1.C: Likewise.
* g++.dg/concepts/nested-diagnostics-2.C: Likewise.
* g++.dg/cpp23/explicit-obj-lambda11.C: Likewise.
* g++.dg/cpp2a/desig4.C: Likewise.
* g++.dg/cpp2a/desig6.C: Likewise.
* g++.dg/cpp2a/spaceship-eq15.C: Likewise.
* g++.dg/diagnostic/function-color1.C: Likewise.
* g++.dg/diagnostic/param-type-mismatch-2.C: Likewise.
* g++.dg/diagnostic/pr100716-1.C: Likewise.
* g++.dg/diagnostic/pr100716.C: Likewise.
* g++.dg/lookup/operator-2.C: Likewise.
* g++.dg/lookup/pr80891-5.C: Likewise.
* g++.dg/modules/adhoc-1_b.C: Likewise.
* g++.dg/modules/err-1_c.C: Likewise.
* g++.dg/modules/err-1_d.C: Likewise.
* g++.dg/other/return2.C: Likewise.
* g++.dg/overload/error6.C: Likewise.
* g++.dg/template/local6.C: Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp23')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda11.C | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda11.C b/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda11.C index 7f2bdb8..7957ad3 100644 --- a/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda11.C +++ b/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda11.C @@ -26,8 +26,9 @@ void test1() auto s1 = S1{[x = 0](this auto&& self) { return self; }}; // { dg-line t1_s1 } s1.operator()<int>(); // { dg-error {no matching function for call to} } + // { dg-note {there is 1 candidate} {} { target *-*-* } .-1 } } -// { dg-note {candidate:} {} { target *-*-* } t1_s1 } +// { dg-note {candidate 1:} {} { target *-*-* } t1_s1 } // { dg-note {template argument deduction/substitution failed} {} { target *-*-* } t1_s1 } // { dg-error {a lambda with captures may not have an explicit object parameter of an unrelated type} {} { target *-*-* } t1_s1 } |