]> granicus.if.org Git - clang/commitdiff
Enhance pretty-printing for nonloc::ConcreteInt
authorTed Kremenek <kremenek@apple.com>
Thu, 23 Dec 2010 02:42:31 +0000 (02:42 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 23 Dec 2010 02:42:31 +0000 (02:42 +0000)
to also include signedness and bitwidth of
the underlying integer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122466 91177308-0d34-0410-b5e6-96231b3b80d8

lib/GR/SVals.cpp

index 6040d5e1d5de98fc2b252870731de6386395fa55..1e583128ffcc1f919811f571436eeda5a9ff9198 100644 (file)
@@ -290,11 +290,13 @@ void SVal::dumpToStream(llvm::raw_ostream& os) const {
 
 void NonLoc::dumpToStream(llvm::raw_ostream& os) const {
   switch (getSubKind()) {
-    case nonloc::ConcreteIntKind:
-      os << cast<nonloc::ConcreteInt>(this)->getValue().getZExtValue();
-      if (cast<nonloc::ConcreteInt>(this)->getValue().isUnsigned())
-        os << 'U';
+    case nonloc::ConcreteIntKind: {
+      const nonloc::ConcreteInt& C = *cast<nonloc::ConcreteInt>(this);
+      os << C.getValue().getZExtValue()
+         << ' ' << ((C.getValue().isUnsigned()) ? 'U' : 'S')
+         << C.getValue().getBitWidth() << 'b';
       break;
+    }
     case nonloc::SymbolValKind:
       os << '$' << cast<nonloc::SymbolVal>(this)->getSymbol();
       break;