to correctly print out negative values for
signed integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122470
91177308-0d34-0410-b5e6-
96231b3b80d8
switch (getSubKind()) {
case nonloc::ConcreteIntKind: {
const nonloc::ConcreteInt& C = *cast<nonloc::ConcreteInt>(this);
- os << C.getValue().getZExtValue()
- << ' ' << ((C.getValue().isUnsigned()) ? 'U' : 'S')
+ if (C.getValue().isUnsigned())
+ os << C.getValue().getZExtValue();
+ else
+ os << C.getValue().getSExtValue();
+ os << ' ' << (C.getValue().isUnsigned() ? 'U' : 'S')
<< C.getValue().getBitWidth() << 'b';
break;
}