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:
parent
5948d40700
commit
3ed7dc5f46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239619
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user