diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 878c21776d..7c8d1cfbf3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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 |