[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Thu May 8 09:03:47 PDT 2025
================
@@ -12166,6 +12174,15 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated,
diag::note_ovl_candidate_explicit_arg_mismatch_unnamed)
<< (index + 1);
}
+
+ if (PartialDiagnosticAt *PDiag = DeductionFailure.getSFINAEDiagnostic()) {
+ unsigned DiagID =
----------------
mizvekov wrote:
This is obviously a step in the right direction, but bear in mind that this is still limited to a single error, and in some cases it can be hard to understand that error without the notes which follow it.
An alternative here, instead of degrading the level of diagnostic, would be to come up with a way to establish a nesting of diagnostics, beyond what we do implicitly, with notes always attached to the previous non-note diagnostic.
https://github.com/llvm/llvm-project/pull/139066
More information about the cfe-commits
mailing list