diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-08-22 14:52:14 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-08-22 14:52:14 +0000 |
commit | 4bda1d8cfe7d42b2798a06d16a5b776d980aad5f (patch) | |
tree | 4304afff4b1b6b85171388701003e667e7409951 /lib/Sema/SemaTemplate.cpp | |
parent | 54c2f88540994726032bfbf1d087bb67767432af (diff) |
Merge existing attributes before processing pragmas in friend template
declarations.
Fixes pr13662.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 4dbf3e45b3..98497cb64d 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1104,6 +1104,9 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, if (Attr) ProcessDeclAttributeList(S, NewClass, Attr); + if (PrevClassTemplate) + mergeDeclAttributes(NewClass, PrevClassTemplate->getTemplatedDecl()); + AddPushedVisibilityAttribute(NewClass); if (TUK != TUK_Friend) @@ -1138,8 +1141,6 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, NewTemplate->setInvalidDecl(); NewClass->setInvalidDecl(); } - if (PrevClassTemplate) - mergeDeclAttributes(NewClass, PrevClassTemplate->getTemplatedDecl()); ActOnDocumentableDecl(NewTemplate); |