[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 07:02:08 PDT 2024


================
@@ -479,12 +479,15 @@ def add_raw_line(self, raw_line):
 # A visitor that dumps the ExplodedGraph into a DOT file with fancy HTML-based
 # syntax highlighing.
 class DotDumpVisitor:
-    def __init__(self, do_diffs, dark_mode, gray_mode, topo_mode, dump_dot_only):
+    def __init__(
+        self, do_diffs, dark_mode, gray_mode, topo_mode, dump_dot_only, dump_html_only
+    ):
----------------
steakhal wrote:

This ctor accepts `dump_dot_only` and `dump_html_only`, which reads to me as mutually exclusive flags.
This suggests to me that we should rather have a single parameter like `dump_only={None,Dot,Html}`.

EDIT: Alright, I've just later seen that in argparse, they are marked mutually exclusive, so it should be fine here too.
Maybe we could have an assert enforcing this.

https://github.com/llvm/llvm-project/pull/85515


More information about the cfe-commits mailing list