diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-12-23 08:56:00 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-12-23 08:56:00 +0000 |
commit | 00d19ee130200b063c001723b7c5d074b925a175 (patch) | |
tree | c4261bbbea09d088906f647c91a25511309ec0c7 /clang/lib/AST/DeclGroup.cpp | |
parent | d2ab38e3f4244e6af87ce16cfc7aff71bc022647 (diff) | |
download | bcm5719-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.cpp | 1 |
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); } |