From: Daniel Dunbar <daniel@zuster.org> Date: Tue, 28 Jul 2009 06:29:46 +0000 (+0000) Subject: CallExpr's SubExprs sometimes were allocated in the wrong place. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68a049cab6015a7437bec5661601b7d37d23c70c;p=clang CallExpr's SubExprs sometimes were allocated in the wrong place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77302 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index b7b0a041e3..2c473ebc42 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -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];