================
@@ -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()) {
----------------
mizvekov wrote:
This bit about the highlight is in line with our best practices, to point
things using source locations instead of printing them out. Printing the
template name in addition to that is redundant and discouraged.
Pointing them out with source locations now works even better in that it
handles anonymous template parameters gracefully, so you could go beyond and
remove the current fallback for that case.
If it's even possible to not have a source location here, you could have a
different fallback where now you print the name, or failing that, print the
parameter index.
https://github.com/llvm/llvm-project/pull/122754
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits