aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2011-06-22 20:02:16 +0000
committerManuel Klimek <klimek@google.com>2011-06-22 20:02:16 +0000
commit0d9106fc97cde979a995e26b18bcd2643f8afb55 (patch)
tree016f76ad40c436bedd157bcad1d6b5550c835ee5 /lib/Sema/SemaExpr.cpp
parentc09ce1224dedc470fce9747e5936ff83cc6762eb (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/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 521f19c8cb..e4eb95379d 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -5846,7 +5846,8 @@ ExprResult Sema::ActOnParenOrParenListExpr(SourceLocation L,
if (nexprs == 1 && TypeOfCast && !TypeIsVectorType(TypeOfCast))
expr = new (Context) ParenExpr(L, R, exprs[0]);
else
- expr = new (Context) ParenListExpr(Context, L, exprs, nexprs, R);
+ expr = new (Context) ParenListExpr(Context, L, exprs, nexprs, R,
+ exprs[nexprs-1]->getType());
return Owned(expr);
}