diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-28 06:29:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-28 06:29:46 +0000 |
commit | 68a049cab6015a7437bec5661601b7d37d23c70c (patch) | |
tree | 02b0f5b38a1b5373c3e8b5fe61b79758657e6f4d | |
parent | 7a1bcdf26d48c2c40e900a973f7ffca45f451526 (diff) |
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
-rw-r--r-- | lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |