From: Artem Dergachev Date: Tue, 13 Aug 2019 23:04:56 +0000 (+0000) Subject: [analyzer] exploded-graph-rewriter: Implement displaying Store pointers. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db6fabf91bcf4e2501fbb6a3ef6a0f78cd48f9e2;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368769 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/exploded-graph-rewriter/escapes.c b/test/Analysis/exploded-graph-rewriter/escapes.c index 84de67939c..ea8c899441 100644 --- a/test/Analysis/exploded-graph-rewriter/escapes.c +++ b/test/Analysis/exploded-graph-rewriter/escapes.c @@ -9,7 +9,7 @@ // UNSUPPORTED: system-windows void escapes() { - // CHECK: Store: + // CHECK: Store: (0x{{[0-9a-f]*}}) // CHECK-SAME: foo0 // CHECK-SAME: &Element\{"foo",0 S64b,char\} // CHECK: Environment: diff --git a/test/Analysis/exploded-graph-rewriter/store.dot b/test/Analysis/exploded-graph-rewriter/store.dot index d47a02295e..7267dd43e8 100644 --- a/test/Analysis/exploded-graph-rewriter/store.dot +++ b/test/Analysis/exploded-graph-rewriter/store.dot @@ -4,6 +4,7 @@ // UNSUPPORTED: system-windows // CHECK: Store: +// CHECK-SAME: (0x2) // CHECK-SAME: // CHECK-SAME: // CHECK-SAME:
diff --git a/utils/analyzer/exploded-graph-rewriter.py b/utils/analyzer/exploded-graph-rewriter.py index d612cfc3ba..ced5c36bab 100755 --- a/utils/analyzer/exploded-graph-rewriter.py +++ b/utils/analyzer/exploded-graph-rewriter.py @@ -644,6 +644,10 @@ class DotDumpVisitor(object): if st is None: self._dump(' Nothing!') else: + if self._dark_mode: + self._dump(' (%s)' % st.ptr) + else: + self._dump(' (%s)' % st.ptr) if prev_st is not None: if s.store.is_different(prev_st): self._dump('
')