aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-26 00:26:18 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-26 00:26:18 +0000
commitceccab908bd7824751b1def127272ec04dd4732b (patch)
treec52b2ef8b9090370dedfe59fd55a72db72afcb17 /lib/Sema/SemaStmt.cpp
parent26f0e4e7ab534fb42485c930f20a424ecc8c9830 (diff)
Slight refactoring; catch yet another case where we were missing an lvalue-to-rvalue conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 0eb8d2863c..fdcad08b5e 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -495,12 +495,8 @@ Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, Expr *Cond,
if (!Cond)
return StmtError();
- CondResult = DefaultFunctionArrayLvalueConversion(Cond);
- if (CondResult.isInvalid())
- return StmtError();
-
CondResult
- = ConvertToIntegralOrEnumerationType(SwitchLoc, CondResult.take(),
+ = ConvertToIntegralOrEnumerationType(SwitchLoc, Cond,
PDiag(diag::err_typecheck_statement_requires_integer),
PDiag(diag::err_switch_incomplete_class_type)
<< Cond->getSourceRange(),