[cfe-commits] r122470 - /cfe/trunk/lib/GR/SVals.cpp
Ted Kremenek
kremenek at apple.com
Wed Dec 22 18:42:46 PST 2010
Author: kremenek
Date: Wed Dec 22 20:42:46 2010
New Revision: 122470
URL: http://llvm.org/viewvc/llvm-project?rev=122470&view=rev
Log:
Further tweak nonloc::ConcreteInt pretty printing
to correctly print out negative values for
signed integers.
Modified:
cfe/trunk/lib/GR/SVals.cpp
Modified: cfe/trunk/lib/GR/SVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/GR/SVals.cpp?rev=122470&r1=122469&r2=122470&view=diff
==============================================================================
--- cfe/trunk/lib/GR/SVals.cpp (original)
+++ cfe/trunk/lib/GR/SVals.cpp Wed Dec 22 20:42:46 2010
@@ -292,8 +292,11 @@
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;
}
More information about the cfe-commits
mailing list