From 89100920d63faf9e6d73dba0116721c4ac20e825 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 13 Jan 2009 19:47:12 +0000 Subject: [PATCH] Turn off some Destroy calls that are currenly causing double-destruction of ScopedDecls. We will re-enable this later, when we have time to fully solve the ownership issue. llvm-svn: 62175 --- clang/lib/AST/DeclBase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 8eb52b722d4e..7363bd024788 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -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(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); }