Author: fpichet
Date: Tue May 31 07:44:46 2011
New Revision: 132333

URL: http://llvm.org/viewvc/llvm-project?rev=132333&view=rev
Log:
Recreate the DeclContext before adding the implicit friend forward declaration. 
This should fix the asserting buildbot.

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=132333&r1=132332&r2=132333&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue May 31 07:44:46 2011
@@ -6657,6 +6657,8 @@
     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


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to