[clang] [APINotes] Avoid duplicate attributes when fields instantiate class templates (PR #173386)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 23 08:48:46 PST 2025
================
@@ -20161,7 +20161,8 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl,
CDecl->setIvarRBraceLoc(RBrac);
}
}
- ProcessAPINotes(Record);
+ if (Record && !isa<ClassTemplateSpecializationDecl>(Record))
----------------
Xazax-hun wrote:
Nit: I think you can use something like `isa_and_nonnull`.
https://github.com/llvm/llvm-project/pull/173386
More information about the cfe-commits
mailing list