]> granicus.if.org Git - clang/commitdiff
CallExpr's SubExprs sometimes were allocated in the wrong place.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 28 Jul 2009 06:29:46 +0000 (06:29 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 28 Jul 2009 06:29:46 +0000 (06:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77302 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Expr.cpp

index b7b0a041e3365baec2f55cf9e54c737beb7fcdcf..2c473ebc428e33f7504c26c37ebd158248dcfd69 100644 (file)
@@ -249,7 +249,7 @@ void CallExpr::setNumArgs(ASTContext& C, unsigned NumArgs) {
   }
 
   // Otherwise, we are growing the # arguments.  New an bigger argument array.
-  Stmt **NewSubExprs = new Stmt*[NumArgs+1];
+  Stmt **NewSubExprs = new (C) Stmt*[NumArgs+1];
   // Copy over args.
   for (unsigned i = 0; i != getNumArgs()+ARGS_START; ++i)
     NewSubExprs[i] = SubExprs[i];