From: Dominic Chen Date: Mon, 5 Dec 2016 20:30:11 +0000 (+0000) Subject: [analyzer] Print type for SymbolRegionValues when dumping to stream X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd6b03c8adbac57bdcdfcc9bbf4f6cf29679969c;p=clang [analyzer] Print type for SymbolRegionValues when dumping to stream Reviewers: NoQ, dcoughlin, zaks.anna Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27365 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288696 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/SymbolManager.cpp b/lib/StaticAnalyzer/Core/SymbolManager.cpp index 6b99ca510b..4be85661b6 100644 --- a/lib/StaticAnalyzer/Core/SymbolManager.cpp +++ b/lib/StaticAnalyzer/Core/SymbolManager.cpp @@ -85,7 +85,8 @@ void SymbolMetadata::dumpToStream(raw_ostream &os) const { void SymbolData::anchor() { } void SymbolRegionValue::dumpToStream(raw_ostream &os) const { - os << "reg_$" << getSymbolID() << "<" << R << ">"; + os << "reg_$" << getSymbolID() + << '<' << getType().getAsString() << ' ' << R << '>'; } bool SymExpr::symbol_iterator::operator==(const symbol_iterator &X) const { diff --git a/test/Analysis/expr-inspection.c b/test/Analysis/expr-inspection.c index 14e12eca19..69e18cb1e6 100644 --- a/test/Analysis/expr-inspection.c +++ b/test/Analysis/expr-inspection.c @@ -7,7 +7,7 @@ void clang_analyzer_printState(); void clang_analyzer_numTimesReached(); void foo(int x) { - clang_analyzer_dump(x); // expected-warning{{reg_$0}} + clang_analyzer_dump(x); // expected-warning{{reg_$0}} int y = 1; clang_analyzer_printState(); for (; y < 3; ++y)