unsigned NumExprs;
public:
- ShuffleVectorExpr(Expr **args, unsigned nexpr,
+ ShuffleVectorExpr(ASTContext &C, Expr **args, unsigned nexpr,
QualType Type, SourceLocation BLoc,
SourceLocation RP) :
Expr(ShuffleVectorExprClass, Type), BuiltinLoc(BLoc),
RParenLoc(RP), NumExprs(nexpr) {
- // FIXME: Allocate in ASTContext!
- SubExprs = new Stmt*[nexpr];
+
+ SubExprs = new (C) Stmt*[nexpr];
for (unsigned i = 0; i < nexpr; i++)
SubExprs[i] = args[i];
}
TheCall->setArg(i, 0);
}
- return Owned(new (Context) ShuffleVectorExpr(exprs.begin(), exprs.size(),
- exprs[0]->getType(),
+ return Owned(new (Context) ShuffleVectorExpr(Context, exprs.begin(),
+ exprs.size(), exprs[0]->getType(),
TheCall->getCallee()->getLocStart(),
TheCall->getRParenLoc()));
}