Index: cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp =================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp +++ cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp @@ -31,14 +31,20 @@ os << '('; getLHS()->dumpToStream(os); os << ") " - << BinaryOperator::getOpcodeStr(getOpcode()) << ' ' - << getRHS().getZExtValue(); + << BinaryOperator::getOpcodeStr(getOpcode()) << ' '; + if (getRHS().isUnsigned()) + os << getRHS().getZExtValue(); + else + os << getRHS().getSExtValue(); if (getRHS().isUnsigned()) os << 'U'; } void IntSymExpr::dumpToStream(raw_ostream &os) const { - os << getLHS().getZExtValue(); + if (getLHS().isUnsigned()) + os << getLHS().getZExtValue(); + else + os << getLHS().getSExtValue(); if (getLHS().isUnsigned()) os << 'U'; os << ' ' Index: cfe/trunk/test/Analysis/expr-inspection.c =================================================================== --- cfe/trunk/test/Analysis/expr-inspection.c +++ cfe/trunk/test/Analysis/expr-inspection.c @@ -8,6 +8,7 @@ void foo(int x) { clang_analyzer_dump(x); // expected-warning{{reg_$0}} + clang_analyzer_dump(x + (-1)); // expected-warning{{(reg_$0) + -1}} int y = 1; clang_analyzer_printState(); for (; y < 3; ++y)