Regression fix: Handle pointer arithmetic in unary ++/--.

llvm-svn: 47449
This commit is contained in:
Ted Kremenek 2008-02-21 19:29:23 +00:00
parent 31160f5b98
commit 7328fa6ec8
1 changed files with 2 additions and 2 deletions

View File

@ -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);