================ @@ -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:
Do we want to point the parameter out with a caret, instead or at least in addition to printing the decl name? You can keep the main diagnostic pointing to the template location as currently, but you could also forward the source range of the parameter to the diagnostic, and this should make it so the parameter gets highlighted. If the parameter is anonymous, as often happens, the diagnostic does not get degraded. https://github.com/llvm/llvm-project/pull/122754 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits