]> granicus.if.org Git - clang/commitdiff
Turn off some Destroy calls that are currenly causing double-destruction of ScopedDec...
authorDouglas Gregor <dgregor@apple.com>
Tue, 13 Jan 2009 19:47:12 +0000 (19:47 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 13 Jan 2009 19:47:12 +0000 (19:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62175 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclBase.cpp

index 8eb52b722d4e96191a78c68db3c24b7caa27eff5..7363bd02478809be48882177e551a70f84b9b931 100644 (file)
@@ -332,6 +332,9 @@ void Decl::swapAttrs(Decl *RHS) {
 
 
 void Decl::Destroy(ASTContext& C) {
+#if 0
+  // FIXME: This causes double-destroys in some cases, so it is
+  // disabled at the moment.
   if (ScopedDecl* SD = dyn_cast<ScopedDecl>(this)) {    
 
     // Observe the unrolled recursion.  By setting N->NextDeclarator = 0x0
@@ -347,7 +350,8 @@ void Decl::Destroy(ASTContext& C) {
       N = Tmp;
     }
   }  
-  
+#endif
+
   this->~Decl();
   C.getAllocator().Deallocate((void *)this);
 }