diff options
author | Manuel Klimek <klimek@google.com> | 2011-06-22 20:02:16 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2011-06-22 20:02:16 +0000 |
commit | 0d9106fc97cde979a995e26b18bcd2643f8afb55 (patch) | |
tree | 016f76ad40c436bedd157bcad1d6b5550c835ee5 /lib/AST/Expr.cpp | |
parent | c09ce1224dedc470fce9747e5936ff83cc6762eb (diff) |
Changes ParenListExpr to always require a type.
Removes dead code found in the process.
Adds a test to verify that ParenListExprs do not have NULL types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 2adaba11a0..fdcb77f324 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -3033,11 +3033,11 @@ void DesignatedInitExpr::ExpandDesignator(ASTContext &C, unsigned Idx, ParenListExpr::ParenListExpr(ASTContext& C, SourceLocation lparenloc, Expr **exprs, unsigned nexprs, - SourceLocation rparenloc) - : Expr(ParenListExprClass, QualType(), VK_RValue, OK_Ordinary, + SourceLocation rparenloc, QualType T) + : Expr(ParenListExprClass, T, VK_RValue, OK_Ordinary, false, false, false), NumExprs(nexprs), LParenLoc(lparenloc), RParenLoc(rparenloc) { - + assert(!T.isNull() && "ParenListExpr must have a valid type"); Exprs = new (C) Stmt*[nexprs]; for (unsigned i = 0; i != nexprs; ++i) { if (exprs[i]->isTypeDependent()) |