aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 67dd79a193..e843f5d9e1 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -2178,10 +2178,13 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
assert (B->isCompoundAssignmentOp());
- if (Op >= BinaryOperator::AndAssign)
- ((int&) Op) -= (BinaryOperator::AndAssign - BinaryOperator::And);
- else
- ((int&) Op) -= BinaryOperator::MulAssign;
+ if (Op >= BinaryOperator::AndAssign) {
+ Op = (BinaryOperator::Opcode) (Op - (BinaryOperator::AndAssign -
+ BinaryOperator::And));
+ }
+ else {
+ Op = (BinaryOperator::Opcode) (Op - BinaryOperator::MulAssign);
+ }
// Perform a load (the LHS). This performs the checks for
// null dereferences, and so on.