aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CodeGen/CGExprScalar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp
index c10e5106d8..889842e1c8 100644
--- a/CodeGen/CGExprScalar.cpp
+++ b/CodeGen/CGExprScalar.cpp
@@ -430,8 +430,8 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const BinaryOperator *E,
ComputeType).getVal();
// Do not merge types for -= where the LHS is a pointer.
- if (E->getOpcode() != BinaryOperator::SubAssign &&
- E->getLHS()->getType()->isPointerType()) {
+ if (E->getOpcode() != BinaryOperator::SubAssign ||
+ !E->getLHS()->getType()->isPointerType()) {
OpInfo.RHS = CGF.EmitConversion(RValue::get(OpInfo.RHS), RHSTy,
ComputeType).getVal();
}