[clang] [clang][Sema][ThreadSafety] Instantiate template attributes naming a pointee's parameter (PR #243191)
Aaron Puchert via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 29 16:25:56 PST 2026
================
@@ -1794,6 +1825,9 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D,
bool InstantiatingVarTemplate,
ArrayRef<BindingDecl*> *Bindings) {
+ // Keep the parameters of a prototype in the type mapped for the attributes.
+ std::optional<LocalInstantiationScope> ProtoScope;
+ SemaRef.enterPrototypeParamScope(D, TemplateArgs, ProtoScope);
----------------
aaronpuchert wrote:
This is in a weird place because we're still treating the attributes as declaration attributes instead of type attributes.
https://github.com/llvm/llvm-project/pull/243191
More information about the cfe-commits
mailing list