forked from OSchip/llvm-project
Regression fix: Handle pointer arithmetic in unary ++/--.
llvm-svn: 47449
This commit is contained in:
parent
31160f5b98
commit
7328fa6ec8
|
@ -696,12 +696,12 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle all NonLVals.
|
// Handle all other values.
|
||||||
|
|
||||||
BinaryOperator::Opcode Op = U->isIncrementOp() ? BinaryOperator::Add
|
BinaryOperator::Opcode Op = U->isIncrementOp() ? BinaryOperator::Add
|
||||||
: BinaryOperator::Sub;
|
: BinaryOperator::Sub;
|
||||||
|
|
||||||
RVal Result = EvalBinOp(Op, cast<NonLVal>(V), MakeConstantVal(1U, U));
|
RVal Result = EvalBinOp(Op, V, MakeConstantVal(1U, U));
|
||||||
|
|
||||||
if (U->isPostfix())
|
if (U->isPostfix())
|
||||||
St = SetRVal(SetRVal(St, U, V), SubLV, Result);
|
St = SetRVal(SetRVal(St, U, V), SubLV, Result);
|
||||||
|
|
Loading…
Reference in New Issue