diff options
author | John McCall <rjmccall@apple.com> | 2010-08-01 02:01:53 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-01 02:01:53 +0000 |
commit | 1d8d1ccd36888f1120b3a1df9e76f35dc2edb81d (patch) | |
tree | 681a591782b70968a914a83c716235993c641dd7 /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | b567a8b94c1067e2518e50eb58d13421550a2e02 (diff) |
Instantiate attributes from the pattern record when instantiating
a class template. Fixes rdar://problem/8243419.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 60b8e927fd..1a22abb2a1 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -1206,6 +1206,9 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, bool MergeWithParentScope = !Instantiation->isDefinedOutsideFunctionOrMethod(); Sema::LocalInstantiationScope Scope(*this, MergeWithParentScope); + // Pull attributes from the pattern onto the instantiation. + InstantiateAttrs(TemplateArgs, Pattern, Instantiation); + // Start the definition of this instantiation. Instantiation->startDefinition(); |