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/Sema/SemaInit.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/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 15007ef7c6..9891500efa 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3915,19 +3915,9 @@ InitializationSequence::Perform(Sema &S, } } - - if (Kind.getKind() == InitializationKind::IK_Copy || Kind.isExplicitCast()) - return ExprResult(Args.release()[0]); - - if (Args.size() == 0) - return S.Owned((Expr *)0); - - unsigned NumArgs = Args.size(); - return S.Owned(new (S.Context) ParenListExpr(S.Context, - SourceLocation(), - (Expr **)Args.release(), - NumArgs, - SourceLocation())); + assert(Kind.getKind() == InitializationKind::IK_Copy || + Kind.isExplicitCast()); + return ExprResult(Args.release()[0]); } // No steps means no initialization. |