Delete AST nodes, not just Decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 993dda7..6ed9966 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -49,7 +49,10 @@
void Stmt::Destroy(ASTContext& C) {
DestroyChildren(C);
- this->~Stmt();
+ // FIXME: Eventually all Stmts should be allocated with the allocator
+ // in ASTContext, just like with Decls.
+ // this->~Stmt();
+ delete this;
}
void Stmt::PrintStats() {