[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:40:26 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL288696: [analyzer] Print type for SymbolRegionValues when dumping to stream (authored by ddcc).
Changed prior to commit:
https://reviews.llvm.org/D27365?vs=80310&id=80311#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27365
Files:
cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp
cfe/trunk/test/Analysis/expr-inspection.c
Index: cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp
===================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp
+++ cfe/trunk/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 {
Index: cfe/trunk/test/Analysis/expr-inspection.c
===================================================================
--- cfe/trunk/test/Analysis/expr-inspection.c
+++ cfe/trunk/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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27365.80311.patch
Type: text/x-patch
Size: 1061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161205/5d91dd09/attachment.bin>
More information about the cfe-commits
mailing list