Skip to content

Commit

Permalink
[analyzer] Print type for SymbolRegionValues when dumping to stream
Browse files Browse the repository at this point in the history
Reviewers: NoQ, dcoughlin, zaks.anna

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D27365

llvm-svn: 288696
  • Loading branch information
ddcc committed Dec 5, 2016
1 parent 7bee6ac commit 0dd2306
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Analysis/expr-inspection.c
Expand Up @@ -7,7 +7,7 @@ void clang_analyzer_printState();
void clang_analyzer_numTimesReached();

void foo(int x) {
clang_analyzer_dump(x); // expected-warning{{reg_$0<x>}}
clang_analyzer_dump(x); // expected-warning{{reg_$0<int x>}}
int y = 1;
clang_analyzer_printState();
for (; y < 3; ++y)
Expand Down

0 comments on commit 0dd2306

Please sign in to comment.