1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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++.
This commit is contained in:
Dimitry Andric 2012-08-23 18:14:59 +00:00
parent 5948d40700
commit 3ed7dc5f46
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239619

View File

@ -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);