[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)
Antonio Frighetto via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 10:29:39 PST 2025
================
@@ -11610,9 +11610,10 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated,
bool TakingCandidateAddress) {
TemplateParameter Param = DeductionFailure.getTemplateParameter();
NamedDecl *ParamD;
- (ParamD = Param.dyn_cast<TemplateTypeParmDecl*>()) ||
- (ParamD = Param.dyn_cast<NonTypeTemplateParmDecl*>()) ||
- (ParamD = Param.dyn_cast<TemplateTemplateParmDecl*>());
+ (ParamD = Param.dyn_cast<TemplateTypeParmDecl *>()) ||
+ (ParamD = Param.dyn_cast<NonTypeTemplateParmDecl *>()) ||
+ (ParamD = Param.dyn_cast<TemplateTemplateParmDecl *>());
+
----------------
antoniofrighetto wrote:
No strong concerns. However, since this change surrounds the code that's being added and only fixes a minor styling issue, I think it may be acceptable to address it in this commit—unless we have documentation that explicitly discourages doing so (I couldn’t find any mention of that). Should `@AidanGoldfarb` be willing to fix all related old-style issues in this file, it would make sense to have a dedicate commit.
https://github.com/llvm/llvm-project/pull/122754
More information about the cfe-commits
mailing list