From: Ted Kremenek Date: Sat, 18 Oct 2008 19:20:54 +0000 (+0000) Subject: Fix incorrect release of Decl* array referenced by DeclGroup. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=990601b6e90c96630eb26d8b683f26b06105c322;p=clang Fix incorrect release of Decl* array referenced by DeclGroup. Patch by Timo Sirainen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57772 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclGroup.cpp b/lib/AST/DeclGroup.cpp index 5ddcd5954d..62b4077a3f 100644 --- a/lib/AST/DeclGroup.cpp +++ b/lib/AST/DeclGroup.cpp @@ -54,7 +54,7 @@ DeclGroup::DeclGroup(unsigned numdecls, Decl** decls) : NumDecls(numdecls) { } void DeclGroup::Destroy(ASTContext& C) { - Decl** Decls = (Decl**) this + 1; + Decl** Decls = (Decl**) (this + 1); for (unsigned i = 0; i < NumDecls; ++i) Decls[i]->Destroy(C);