[cfe-commits] r78780 - in /cfe/trunk: include/clang/AST/Expr.h lib/Sema/SemaChecking.cpp
Nate Begeman
natebegeman at mac.com
Tue Aug 11 19:10:27 PDT 2009
Author: sampo
Date: Tue Aug 11 21:10:25 2009
New Revision: 78780
URL: http://llvm.org/viewvc/llvm-project?rev=78780&view=rev
Log:
Fix a fixme by allocating ShuffleVectorExprs in the Context
Modified:
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/lib/Sema/SemaChecking.cpp
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=78780&r1=78779&r2=78780&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Tue Aug 11 21:10:25 2009
@@ -1727,13 +1727,13 @@
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];
}
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=78780&r1=78779&r2=78780&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Tue Aug 11 21:10:25 2009
@@ -626,8 +626,8 @@
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()));
}
More information about the cfe-commits
mailing list