aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-21 19:29:23 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-21 19:29:23 +0000
commit443003ba3819c06ecf40e6376f92226630831f3d (patch)
treeac09efd64bb817d453790e194f654b7ca81325dc
parent89063af27f1268ca1a5c69eb96baa8f7948193db (diff)
Regression fix: Handle pointer arithmetic in unary ++/--.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47449 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Analysis/GRExprEngine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp
index 16361c6d86..66f5cae654 100644
--- a/Analysis/GRExprEngine.cpp
+++ b/Analysis/GRExprEngine.cpp
@@ -696,12 +696,12 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
continue;
}
- // Handle all NonLVals.
+ // Handle all other values.
BinaryOperator::Opcode Op = U->isIncrementOp() ? BinaryOperator::Add
: BinaryOperator::Sub;
- RVal Result = EvalBinOp(Op, cast<NonLVal>(V), MakeConstantVal(1U, U));
+ RVal Result = EvalBinOp(Op, V, MakeConstantVal(1U, U));
if (U->isPostfix())
St = SetRVal(SetRVal(St, U, V), SubLV, Result);