summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-08-13 23:04:56 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-08-13 23:04:56 +0000
commitdaf41722bd54e03cc5a367d35b2208ff652f553d (patch)
treee046987f40e924b69c2a9d4577cadf47517b913c
parent9289681ea3d000e7d46b2c69bac26b45f960c4dd (diff)
downloadbcm5719-llvm-daf41722bd54e03cc5a367d35b2208ff652f553d.tar.gz
bcm5719-llvm-daf41722bd54e03cc5a367d35b2208ff652f553d.zip
[analyzer] exploded-graph-rewriter: Implement displaying Store pointers.
They're useful when trying to understand what's going on inside your LazyCompoundValues. Differential Revision: https://reviews.llvm.org/D65427 llvm-svn: 368769
-rw-r--r--clang/test/Analysis/exploded-graph-rewriter/escapes.c2
-rw-r--r--clang/test/Analysis/exploded-graph-rewriter/store.dot1
-rwxr-xr-xclang/utils/analyzer/exploded-graph-rewriter.py4
3 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Analysis/exploded-graph-rewriter/escapes.c b/clang/test/Analysis/exploded-graph-rewriter/escapes.c
index 84de67939cb..ea8c8994419 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/escapes.c
+++ b/clang/test/Analysis/exploded-graph-rewriter/escapes.c
@@ -9,7 +9,7 @@
// UNSUPPORTED: system-windows
void escapes() {
- // CHECK: <td align="left"><b>Store: </b></td>
+ // CHECK: <td align="left"><b>Store: </b> <font color="gray">(0x{{[0-9a-f]*}})</font></td>
// CHECK-SAME: <td align="left">foo</td><td align="left">0</td>
// CHECK-SAME: <td align="left">&amp;Element\{"foo",0 S64b,char\}</td>
// CHECK: <td align="left"><b>Environment: </b></td>
diff --git a/clang/test/Analysis/exploded-graph-rewriter/store.dot b/clang/test/Analysis/exploded-graph-rewriter/store.dot
index d47a02295e4..7267dd43e89 100644
--- a/clang/test/Analysis/exploded-graph-rewriter/store.dot
+++ b/clang/test/Analysis/exploded-graph-rewriter/store.dot
@@ -4,6 +4,7 @@
// UNSUPPORTED: system-windows
// CHECK: <b>Store: </b>
+// CHECK-SAME: <font color="gray">(0x2)</font>
// CHECK-SAME: <table border="0">
// CHECK-SAME: <tr>
// CHECK-SAME: <td align="left">
diff --git a/clang/utils/analyzer/exploded-graph-rewriter.py b/clang/utils/analyzer/exploded-graph-rewriter.py
index d612cfc3ba7..ced5c36bab5 100755
--- a/clang/utils/analyzer/exploded-graph-rewriter.py
+++ b/clang/utils/analyzer/exploded-graph-rewriter.py
@@ -644,6 +644,10 @@ class DotDumpVisitor(object):
if st is None:
self._dump('<i> Nothing!</i>')
else:
+ if self._dark_mode:
+ self._dump(' <font color="gray30">(%s)</font>' % st.ptr)
+ else:
+ self._dump(' <font color="gray">(%s)</font>' % st.ptr)
if prev_st is not None:
if s.store.is_different(prev_st):
self._dump('</td></tr><tr><td align="left">')
OpenPOWER on IntegriCloud