summaryrefslogtreecommitdiffstats
path: root/clang
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
commit7328fa6ec83203e379b2cbf8534168ee335c2588 (patch)
tree6df54bd138f4a3251201ee10fd070fc77dbfc68a /clang
parent31160f5b98f6975f759a6ba65b8e29f086536fe0 (diff)
downloadbcm5719-llvm-7328fa6ec83203e379b2cbf8534168ee335c2588.tar.gz
bcm5719-llvm-7328fa6ec83203e379b2cbf8534168ee335c2588.zip
Regression fix: Handle pointer arithmetic in unary ++/--.
llvm-svn: 47449
Diffstat (limited to 'clang')
-rw-r--r--clang/Analysis/GRExprEngine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Analysis/GRExprEngine.cpp b/clang/Analysis/GRExprEngine.cpp
index 16361c6d86a..66f5cae6547 100644
--- a/clang/Analysis/GRExprEngine.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud