зеркало из https://github.com/microsoft/clang-1.git
Recreate the DeclContext before adding the implicit friend forward declaration. This should fix the asserting buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
8adc227de9
Коммит
fa6e63a06b
|
@ -6657,6 +6657,8 @@ void Sema::InjectMicrosoftFriendForwardDeclaration(unsigned TagSpec,
|
|||
TagTypeKind Kind = TypeWithKeyword::getTagTypeKindForTypeSpec(TagSpec);
|
||||
TagDecl *New = CXXRecordDecl::Create(Context, Kind, ContextToAdd, KWLoc,
|
||||
NameLoc, Name, 0);
|
||||
// Recreate the DeclContext.
|
||||
ContextRAII SavedContext(*this, ContextToAdd);
|
||||
if (getCurScope()->getFnParent())
|
||||
PushOnScopeChains(New, getScopeForContext(ContextToAdd), true);
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче