diff options
author | dim <dim@FreeBSD.org> | 2012-08-23 18:14:59 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-23 18:14:59 +0000 |
commit | ba4876bedf0fe5642509d673ed733b6bba39e55a (patch) | |
tree | 5a509497938a4bb20e2014b330ee249cc3b63915 /contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp | |
parent | deea31babed5f7337bee9cc9028bc4fc671f10a1 (diff) | |
download | FreeBSD-src-ba4876bedf0fe5642509d673ed733b6bba39e55a.zip FreeBSD-src-ba4876bedf0fe5642509d673ed733b6bba39e55a.tar.gz |
Pull in r162360 from upstream clang trunk:
Merge existing attributes before processing pragmas in friend template
declarations.
Fixes pr13662.
This should help when building Firefox with libc++.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp index 4dbf3e4..98497cb 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp +++ b/contrib/llvm/tools/clang/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); |