aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-19 01:50:18 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-19 01:50:18 +0000
commitba7bc5584b8d46f4e8deb3a9d363256908fa86ea (patch)
treea856a516b4c63ffddf365713ea6e6316a02b056e /lib/Sema/SemaExpr.cpp
parent170e41d856f0bf39799fac9cc1e666bb857afa0c (diff)
Revert: "Change InitListExpr to allocate the array for holding references"
This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 0d54a16412..e950be0485 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3763,8 +3763,8 @@ Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg initlist,
// Semantic analysis for initializers is done by ActOnDeclarator() and
// CheckInitializer() - it requires knowledge of the object being intialized.
- InitListExpr *E = new (Context) InitListExpr(Context, LBraceLoc, InitList,
- NumInit, RBraceLoc);
+ InitListExpr *E = new (Context) InitListExpr(LBraceLoc, InitList, NumInit,
+ RBraceLoc);
E->setType(Context.VoidTy); // FIXME: just a place holder for now.
return Owned(E);
}
@@ -4038,8 +4038,7 @@ Sema::ActOnCastOfParenListExpr(Scope *S, SourceLocation LParenLoc,
// FIXME: This means that pretty-printing the final AST will produce curly
// braces instead of the original commas.
Op.release();
- InitListExpr *E = new (Context) InitListExpr(Context, LParenLoc,
- &initExprs[0],
+ InitListExpr *E = new (Context) InitListExpr(LParenLoc, &initExprs[0],
initExprs.size(), RParenLoc);
E->setType(Ty);
return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, Owned(E));
@@ -4753,7 +4752,8 @@ static void ConstructTransparentUnion(ASTContext &C, Expr *&E,
QualType UnionType, FieldDecl *Field) {
// Build an initializer list that designates the appropriate member
// of the transparent union.
- InitListExpr *Initializer = new (C) InitListExpr(C, SourceLocation(), &E, 1,
+ InitListExpr *Initializer = new (C) InitListExpr(SourceLocation(),
+ &E, 1,
SourceLocation());
Initializer->setType(UnionType);
Initializer->setInitializedFieldInUnion(Field);