aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-12-23 02:42:46 +0000
committerTed Kremenek <kremenek@apple.com>2010-12-23 02:42:46 +0000
commit35df9c70f5dc04a2ed74129bcf31b1938238e4c2 (patch)
tree191b48060c882b51e8f8e5a7254d5fd75fca3dc5
parentc478a1425c055e517169220ea1c1efd857e65f52 (diff)
Further tweak nonloc::ConcreteInt pretty printing
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
-rw-r--r--lib/GR/SVals.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/GR/SVals.cpp b/lib/GR/SVals.cpp
index 1e583128ff..0484b62f8a 100644
--- a/lib/GR/SVals.cpp
+++ b/lib/GR/SVals.cpp
@@ -292,8 +292,11 @@ void NonLoc::dumpToStream(llvm::raw_ostream& os) const {
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;
}