]> granicus.if.org Git - clang/commitdiff
Fix Objective-C crashes
authorDouglas Gregor <dgregor@apple.com>
Fri, 24 Apr 2009 02:15:36 +0000 (02:15 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 24 Apr 2009 02:15:36 +0000 (02:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69945 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp

index 029770d3a923b1f95ead6f9f211ebb4ac13cea8d..c30a7b26e1438950ebed1a7463c239b2d433cd00 100644 (file)
@@ -659,9 +659,6 @@ Sema::DeclPtrTy Sema::ActOnStartClassImplementation(
     IDecl->setLocEnd(ClassLoc);
 
     PushOnScopeChains(IDecl, TUScope);
-    CurContext->addDecl(Context, IDecl);
-    // Remember that this needs to be removed when the scope is popped.
-    TUScope->AddDecl(DeclPtrTy::make(IDecl));
   } else {
     // Mark the interface as being completed, even if it was just as
     //   @class ....;