[PATCH] D27365: [analyzer] Print type for SymbolRegionValues when dumping to stream
Dominic Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 12:39:26 PST 2016
ddcc updated this revision to Diff 80310.
ddcc added a comment.
Fix rebase
https://reviews.llvm.org/D27365
Files:
lib/StaticAnalyzer/Core/SymbolManager.cpp
test/Analysis/expr-inspection.c
Index: test/Analysis/expr-inspection.c
===================================================================
--- test/Analysis/expr-inspection.c
+++ test/Analysis/expr-inspection.c
@@ -7,7 +7,7 @@
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)
Index: lib/StaticAnalyzer/Core/SymbolManager.cpp
===================================================================
--- lib/StaticAnalyzer/Core/SymbolManager.cpp
+++ lib/StaticAnalyzer/Core/SymbolManager.cpp
@@ -85,7 +85,8 @@
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 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27365.80310.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161205/9164ec8a/attachment.bin>
More information about the cfe-commits
mailing list