[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 24 04:36:08 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 =
----------------
cor3ntin wrote:

No, I think this patch should emit the diagnostic as-is and add a `//fixme: attach this diagnostic to the parent error`

(alternatively we can wait for @Sirraide's patch to go in first, and rebase this one on top of it)

https://github.com/llvm/llvm-project/pull/139066


More information about the cfe-commits mailing list