[cfe-commits] r132333 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Francois Pichet pichet2000 at gmail.com
Tue May 31 05:44:46 PDT 2011


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





More information about the cfe-commits mailing list