diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2014-11-12 23:15:38 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2014-11-12 23:15:38 +0000 |
commit | 50a3cbd7c0258e4887ef6b33532c107095f667e3 (patch) | |
tree | ada5590bb258e2487114adf83bd2b7e793f32da0 /clang/lib/Sema/SemaExpr.cpp | |
parent | 5de3d9c031bb4b1405f32168524dbc34f21bb897 (diff) | |
download | bcm5719-llvm-50a3cbd7c0258e4887ef6b33532c107095f667e3.tar.gz bcm5719-llvm-50a3cbd7c0258e4887ef6b33532c107095f667e3.zip |
Temporary revert r221818 until all the problems
with objc stuff will be resolved.
llvm-svn: 221829
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 45056f49ea1..dda9d88abac 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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. |