]> granicus.if.org Git - clang/commitdiff
[analyzer] exploded-graph-rewriter: Implement displaying Store pointers.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 13 Aug 2019 23:04:56 +0000 (23:04 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 13 Aug 2019 23:04:56 +0000 (23:04 +0000)
They're useful when trying to understand what's going on
inside your LazyCompoundValues.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368769 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/exploded-graph-rewriter/escapes.c
test/Analysis/exploded-graph-rewriter/store.dot
utils/analyzer/exploded-graph-rewriter.py

index 84de67939cb115fc0f780e9064f7ee3b495b00fa..ea8c8994419a961ce5532cb864f8edf3c297404e 100644 (file)
@@ -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>
index d47a02295e4934fce92cf3284443a1f4e335e274..7267dd43e8984e17f20379df9b7c82abad1ae964 100644 (file)
@@ -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">
index d612cfc3ba73f2d96a3c915d7e1e9b75a9cf845a..ced5c36bab5e21564090b56c8e395b8ae2b92367 100755 (executable)
@@ -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">')