summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2014-11-14 21:54:46 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2014-11-14 21:54:46 +0000
commitd0babbfe56b84df88b8e0a29c04b05d565c2dce2 (patch)
treed260b1e6a96f4ad103e4781c0edbd5d1a223a2af /lib/Sema/SemaExprCXX.cpp
parent1651a71ff2b564407bf2a02819b5efcdf87382a3 (diff)
Again revert r222044 to resolve darwin objc test fails.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 26ffbfb58e..88eb41ac44 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -4561,14 +4561,10 @@ QualType Sema::CXXCheckConditionalOperands(ExprResult &Cond, ExprResult &LHS,
// the usual arithmetic conversions are performed to bring them to a
// common type, and the result is of that type.
if (LTy->isArithmeticType() && RTy->isArithmeticType()) {
- QualType ResTy = UsualArithmeticConversions(LHS, RHS);
+ UsualArithmeticConversions(LHS, RHS);
if (LHS.isInvalid() || RHS.isInvalid())
return QualType();
-
- LHS = ImpCastExprToType(LHS.get(), ResTy, PrepareScalarCast(LHS, ResTy));
- RHS = ImpCastExprToType(RHS.get(), ResTy, PrepareScalarCast(RHS, ResTy));
-
- return ResTy;
+ return LHS.get()->getType();
}
// -- The second and third operands have pointer type, or one has pointer