summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2014-11-12 23:15:38 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2014-11-12 23:15:38 +0000
commit82a3c12f9d53738de96835878edda5a6cc789afa (patch)
treee581ca410c26432611d6341e5c5371241a96daec /lib/Sema/SemaExpr.cpp
parent2e0947a97b10a5165a7548c03afc928fe52a984c (diff)
Temporary revert r221818 until all the problems
with objc stuff will be resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 45056f49ea..dda9d88aba 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -5709,7 +5709,7 @@ QualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS,
RHS.get()->getType()->isVectorType())
return CheckVectorOperands(LHS, RHS, QuestionLoc, /*isCompAssign*/false);
- QualType ResTy = UsualArithmeticConversions(LHS, RHS);
+ UsualArithmeticConversions(LHS, RHS);
if (LHS.isInvalid() || RHS.isInvalid())
return QualType();
@@ -5726,12 +5726,8 @@ QualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS,
// If both operands have arithmetic type, do the usual arithmetic conversions
// to find a common type: C99 6.5.15p3,5.
- if (LHSTy->isArithmeticType() && RHSTy->isArithmeticType()) {
- LHS = ImpCastExprToType(LHS.get(), ResTy, PrepareScalarCast(LHS, ResTy));
- RHS = ImpCastExprToType(RHS.get(), ResTy, PrepareScalarCast(RHS, ResTy));
-
- return ResTy;
- }
+ if (LHSTy->isArithmeticType() && RHSTy->isArithmeticType())
+ return LHS.get()->getType();
// If both operands are the same structure or union type, the result is that
// type.