summaryrefslogtreecommitdiff
path: root/utils/analyzer/exploded-graph-rewriter.py
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-10-17 23:10:05 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-10-17 23:10:05 +0000
commit40a1cfa0b13160d82f688daa7fbab9f249679617 (patch)
tree70bd8d0fec3f93d6075e2572d6e7179540886fda /utils/analyzer/exploded-graph-rewriter.py
parent7d0e090bbc61baebf0be18e4d9ba36615b6cd566 (diff)
downloadclang-40a1cfa0b13160d82f688daa7fbab9f249679617.tar.gz
[analyzer] Display cast kinds in program point dumps.
Because cast expressions have their own hierarchy, it's extremely useful to have some information about what kind of casts are we dealing with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/analyzer/exploded-graph-rewriter.py')
-rwxr-xr-xutils/analyzer/exploded-graph-rewriter.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/analyzer/exploded-graph-rewriter.py b/utils/analyzer/exploded-graph-rewriter.py
index 05b01b3f95..77da7392e3 100755
--- a/utils/analyzer/exploded-graph-rewriter.py
+++ b/utils/analyzer/exploded-graph-rewriter.py
@@ -73,6 +73,8 @@ class ProgramPoint(object):
elif self.kind == 'Statement':
logging.debug(json_pp)
self.stmt_kind = json_pp['stmt_kind']
+ self.cast_kind = json_pp['cast_kind'] \
+ if 'cast_kind' in json_pp else None
self.stmt_point_kind = json_pp['stmt_point_kind']
self.stmt_id = json_pp['stmt_id']
self.pointer = json_pp['pointer']
@@ -497,7 +499,9 @@ class DotDumpVisitor(object):
'<td align="left"><i>S%s</i></td>'
'<td align="left"><font color="%s">%s</font></td>'
'<td align="left">%s</td></tr>'
- % (self._make_sloc(p.loc), color, p.stmt_kind,
+ % (self._make_sloc(p.loc), color,
+ '%s (%s)' % (p.stmt_kind, p.cast_kind)
+ if p.cast_kind is not None else p.stmt_kind,
p.stmt_id, stmt_color, p.stmt_point_kind,
self._short_pretty(p.pretty)
if not skip_pretty else ''))