Skip to content

Commit bd6b03c

Browse files
committed
[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
1 parent 964bf8a commit bd6b03c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/StaticAnalyzer/Core/SymbolManager.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ void SymbolMetadata::dumpToStream(raw_ostream &os) const {
8585
void SymbolData::anchor() { }
8686

8787
void SymbolRegionValue::dumpToStream(raw_ostream &os) const {
88-
os << "reg_$" << getSymbolID() << "<" << R << ">";
88+
os << "reg_$" << getSymbolID()
89+
<< '<' << getType().getAsString() << ' ' << R << '>';
8990
}
9091

9192
bool SymExpr::symbol_iterator::operator==(const symbol_iterator &X) const {

test/Analysis/expr-inspection.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void clang_analyzer_printState();
77
void clang_analyzer_numTimesReached();
88

99
void foo(int x) {
10-
clang_analyzer_dump(x); // expected-warning{{reg_$0<x>}}
10+
clang_analyzer_dump(x); // expected-warning{{reg_$0<int x>}}
1111
int y = 1;
1212
clang_analyzer_printState();
1313
for (; y < 3; ++y)

0 commit comments

Comments
 (0)