summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclGroup.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-12-23 08:56:00 +0000
committerTed Kremenek <kremenek@apple.com>2009-12-23 08:56:00 +0000
commit00d19ee130200b063c001723b7c5d074b925a175 (patch)
treec4261bbbea09d088906f647c91a25511309ec0c7 /clang/lib/AST/DeclGroup.cpp
parentd2ab38e3f4244e6af87ce16cfc7aff71bc022647 (diff)
downloadbcm5719-llvm-00d19ee130200b063c001723b7c5d074b925a175.tar.gz
bcm5719-llvm-00d19ee130200b063c001723b7c5d074b925a175.zip
Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>.
llvm-svn: 91990
Diffstat (limited to 'clang/lib/AST/DeclGroup.cpp')
-rw-r--r--clang/lib/AST/DeclGroup.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclGroup.cpp b/clang/lib/AST/DeclGroup.cpp
index 5bdc8817346..434bf00d354 100644
--- a/clang/lib/AST/DeclGroup.cpp
+++ b/clang/lib/AST/DeclGroup.cpp
@@ -32,6 +32,7 @@ DeclGroup::DeclGroup(unsigned numdecls, Decl** decls) : NumDecls(numdecls) {
}
void DeclGroup::Destroy(ASTContext& C) {
+ // Decls are destroyed by the DeclContext.
this->~DeclGroup();
C.Deallocate((void*) this);
}
OpenPOWER on IntegriCloud