summaryrefslogtreecommitdiffstats
path: root/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
commite7809d49413febf078d0503753987fe9f6061a68 (patch)
tree28ebdcbf3715ffd914287c0466061364b6e1289c /lib/AST/DeclGroup.cpp
parentcb74d720b89b68bb2ecf2827d0e2eb66d236ab85 (diff)
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclGroup.cpp')
-rw-r--r--lib/AST/DeclGroup.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/AST/DeclGroup.cpp b/lib/AST/DeclGroup.cpp
index 5bdc881734..434bf00d35 100644
--- a/lib/AST/DeclGroup.cpp
+++ b/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);
}