summaryrefslogtreecommitdiffstats
path: root/clang/utils/analyzer/exploded-graph-rewriter.py
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-07-03 01:26:41 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-07-03 01:26:41 +0000
commitab758ba128c46ba30cad058b89991852f7be5543 (patch)
tree9ceddcacadb0e85e686a38615c764ef065fa6398 /clang/utils/analyzer/exploded-graph-rewriter.py
parent5fcf92e153806e8fb3f195104f3d057580236132 (diff)
downloadbcm5719-llvm-ab758ba128c46ba30cad058b89991852f7be5543.tar.gz
bcm5719-llvm-ab758ba128c46ba30cad058b89991852f7be5543.zip
[analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.
Add a label to nodes that have a bug report attached or on which the analysis was generally interrupted. Fix printing has_report and implement printing is_sink in the graph dumper. Differential Revision: https://reviews.llvm.org/D64110 llvm-svn: 364992
Diffstat (limited to 'clang/utils/analyzer/exploded-graph-rewriter.py')
-rwxr-xr-xclang/utils/analyzer/exploded-graph-rewriter.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/utils/analyzer/exploded-graph-rewriter.py b/clang/utils/analyzer/exploded-graph-rewriter.py
index 463ae02fe86..0926ba2511e 100755
--- a/clang/utils/analyzer/exploded-graph-rewriter.py
+++ b/clang/utils/analyzer/exploded-graph-rewriter.py
@@ -299,6 +299,8 @@ class ExplodedNode(object):
logging.debug('Adding ' + node_id)
self.node_id = json_node['node_id']
self.ptr = json_node['pointer']
+ self.has_report = json_node['has_report']
+ self.is_sink = json_node['is_sink']
self.points = [ProgramPoint(p) for p in json_node['program_points']]
self.state = ProgramState(json_node['state_id'],
json_node['program_state']) \
@@ -754,6 +756,12 @@ class DotDumpVisitor(object):
% ("gray20" if self._dark_mode else "gray",
node.node_id, node.ptr, node.state.state_id
if node.state is not None else 'Unspecified'))
+ if node.has_report:
+ self._dump('<tr><td><font color="red"><b>Bug Report Attached'
+ '</b></font></td></tr>')
+ if node.is_sink:
+ self._dump('<tr><td><font color="cornflowerblue"><b>Sink Node'
+ '</b></font></td></tr>')
self._dump('<tr><td align="left" width="0">')
if len(node.points) > 1:
self._dump('<b>Program points:</b></td></tr>')
OpenPOWER on IntegriCloud