r368769 - [analyzer] exploded-graph-rewriter: Implement displaying Store pointers.

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 16:04:56 PDT 2019


Author: dergachev
Date: Tue Aug 13 16:04:56 2019
New Revision: 368769

URL: http://llvm.org/viewvc/llvm-project?rev=368769&view=rev
Log:
[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

Modified:
    cfe/trunk/test/Analysis/exploded-graph-rewriter/escapes.c
    cfe/trunk/test/Analysis/exploded-graph-rewriter/store.dot
    cfe/trunk/utils/analyzer/exploded-graph-rewriter.py

Modified: cfe/trunk/test/Analysis/exploded-graph-rewriter/escapes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/exploded-graph-rewriter/escapes.c?rev=368769&r1=368768&r2=368769&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/exploded-graph-rewriter/escapes.c (original)
+++ cfe/trunk/test/Analysis/exploded-graph-rewriter/escapes.c Tue Aug 13 16:04:56 2019
@@ -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">&Element\{"foo",0 S64b,char\}</td>
   // CHECK: <td align="left"><b>Environment: </b></td>

Modified: cfe/trunk/test/Analysis/exploded-graph-rewriter/store.dot
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/exploded-graph-rewriter/store.dot?rev=368769&r1=368768&r2=368769&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/exploded-graph-rewriter/store.dot (original)
+++ cfe/trunk/test/Analysis/exploded-graph-rewriter/store.dot Tue Aug 13 16:04:56 2019
@@ -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">

Modified: cfe/trunk/utils/analyzer/exploded-graph-rewriter.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/exploded-graph-rewriter.py?rev=368769&r1=368768&r2=368769&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/exploded-graph-rewriter.py (original)
+++ cfe/trunk/utils/analyzer/exploded-graph-rewriter.py Tue Aug 13 16:04:56 2019
@@ -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">')




More information about the cfe-commits mailing list