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 | 6602bb1115b84d1b2d7731adc60acd9832a2f8e2 (patch) | |
tree | 5699c4576c4b0a71fec96977bdf29f6a1a8cd005 /clang/lib/Sema/SemaTemplateInstantiate.cpp | |
parent | d9900542a6d730a44d8f9551f270b43378104f34 (diff) | |
download | bcm5719-llvm-6602bb1115b84d1b2d7731adc60acd9832a2f8e2.tar.gz bcm5719-llvm-6602bb1115b84d1b2d7731adc60acd9832a2f8e2.zip |
Instantiate attributes from the pattern record when instantiating
a class template. Fixes rdar://problem/8243419.
llvm-svn: 109967
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index 60b8e927fd2..1a22abb2a1c 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/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(); |