]> granicus.if.org Git - clang/commitdiff
Fix incorrect release of Decl* array referenced by DeclGroup.
authorTed Kremenek <kremenek@apple.com>
Sat, 18 Oct 2008 19:20:54 +0000 (19:20 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 18 Oct 2008 19:20:54 +0000 (19:20 +0000)
Patch by Timo Sirainen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57772 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclGroup.cpp

index 5ddcd5954db06ed649f426f8f6143adcab057bd5..62b4077a3fc26b6b089575f9c2b4e24e55983fb9 100644 (file)
@@ -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);