RValue R1 = cast<RValue>(GetValue(St, L1));
QualType T = U->getType();
- llvm::APInt One(getContext()->getTypeSize(T,U->getLocStart()), 1);
- RValue R2 = RValue::GetRValue(ValMgr, One);
-
+ unsigned bits = getContext()->getTypeSize(T, U->getLocStart());
+ llvm::APSInt One(llvm::APInt(bits, 1), T->isUnsignedIntegerType());
+ RValue R2 = RValue::GetRValue(ValMgr, One);
+
RValue Result = R1.EvalAdd(ValMgr, R2);
Nodify(Dst, U, N1, SetValue(SetValue(St, U, R1), L1, Result));
break;
RValue R1 = cast<RValue>(GetValue(St, L1));
QualType T = U->getType();
- llvm::APInt One(getContext()->getTypeSize(T,U->getLocStart()), 1);
- RValue R2 = RValue::GetRValue(ValMgr, One);
+ unsigned bits = getContext()->getTypeSize(T, U->getLocStart());
+ llvm::APSInt One(llvm::APInt(bits, 1), T->isUnsignedIntegerType());
+ RValue R2 = RValue::GetRValue(ValMgr, One);
RValue Result = R1.EvalSub(ValMgr, R2);
Nodify(Dst, U, N1, SetValue(SetValue(St, U, R1), L1, Result));
RValue R1 = cast<RValue>(GetValue(St, L1));
QualType T = U->getType();
- llvm::APInt One(getContext()->getTypeSize(T,U->getLocStart()), 1);
+ unsigned bits = getContext()->getTypeSize(T, U->getLocStart());
+ llvm::APSInt One(llvm::APInt(bits, 1), T->isUnsignedIntegerType());
RValue R2 = RValue::GetRValue(ValMgr, One);
RValue Result = R1.EvalAdd(ValMgr, R2);
RValue R1 = cast<RValue>(GetValue(St, L1));
QualType T = U->getType();
- llvm::APInt One(getContext()->getTypeSize(T,U->getLocStart()), 1);
- RValue R2 = RValue::GetRValue(ValMgr, One);
+ unsigned bits = getContext()->getTypeSize(T, U->getLocStart());
+ llvm::APSInt One(llvm::APInt(bits, 1), T->isUnsignedIntegerType());
+ RValue R2 = RValue::GetRValue(ValMgr, One);
RValue Result = R1.EvalSub(ValMgr, R2);
Nodify(Dst, U, N1, SetValue(SetValue(St, U, Result), L1, Result));