[PATCH] D65250: [analyzer] exploded-graph-rewriter: Improve user-friendliness.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 16:04:14 PDT 2019


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware, Charusso.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet.
Herald added a project: clang.

Change the default behavior: the tool no longer dumps the rewritten .dot file to stdout, but instead it automatically converts it into an .html file (which essentially wraps an .svg file) and immediately opens it with the default web browser.

This means that the tool should be fairly easy to use:

  $ exploded-graph-rewriter.py /tmp/ExprEngine.dot

The benefits of wrapping the .svg file into an .html file are:

- It'll open in a web browser, which is the intended behavior. An .svg file would be open with an image viewer/editor instead.
- It avoids the white background around the otherwise dark svg area in dark mode.

I also added more help text so that it was easier to figure out how to use the tool (suggestions are welcome!).

The new feature bypasses tests because i don't expect everybody (esp. buildbots) to have python-graphviz installed. The LIT substitution is specifically tweaked to enforce the old mode.

TODO: Add a `-o` flag to specify the output file.


Repository:
  rC Clang

https://reviews.llvm.org/D65250

Files:
  clang/test/Analysis/exploded-graph-rewriter/lit.local.cfg
  clang/utils/analyzer/exploded-graph-rewriter.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65250.211622.patch
Type: text/x-patch
Size: 4508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190724/d59d4159/attachment.bin>


More information about the cfe-commits mailing list