[PATCH] D45417: [analyzer] Don't crash on printing ConcreteInt of size >64 bits
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 9 13:58:03 PDT 2018
NoQ added inline comments.
================
Comment at: test/Analysis/egraph-dump-int128.c:3
+// RUN: mkdir -p %t.dir
+// RUN: env TMPDIR=%t.dir TEMP=%t.dir TMP=%t.dir %clang_analyze_cc1 -analyzer-checker=debug.ViewExplodedGraph %s
+
----------------
george.karpenkov wrote:
> At least on a mac, `ViewExplodedGraph` launches `GraphViz.app`.
> Can we have a less invasive check? Wouldn't just dumping a value be sufficient?
Yeah, it just runs `xdg-open` on linux and `open` on mac, which often opens up a GUI viewer. That's not the behavior we want from automated tests.
I think you should use `ExprInspection` instead, and either dump the whole state with `clang_analyzer_printState()` or, even better, dump only the particular value with `clang_analyzer_dump(...)` - that way you'll be also capable of verifying the output.
Note that we actually don't have much tests for our dumps.
Repository:
rC Clang
https://reviews.llvm.org/D45417
More information about the cfe-commits
mailing list