[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)
Aidan Goldfarb via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 30 09:15:50 PST 2025
================
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated,
return;
}
- case TemplateDeductionResult::InvalidExplicitArguments:
+ case TemplateDeductionResult::InvalidExplicitArguments: {
assert(ParamD && "no parameter found for invalid explicit arguments");
- if (ParamD->getDeclName())
- S.Diag(Templated->getLocation(),
- diag::note_ovl_candidate_explicit_arg_mismatch_named)
- << ParamD->getDeclName();
- else {
+ if (ParamD->getDeclName()) {
----------------
AidanGoldfarb wrote:
My most recent change split up the information into two diags, much like GCC and what I think you were suggesting. Please let me know if this was what you had in mind
https://github.com/llvm/llvm-project/pull/122754
More information about the cfe-commits
mailing list