[PATCH] D55665: Output to SARIF from scan-build
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 13 12:37:44 PST 2018
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Thanks, looks perfectly sane to me!
When i previously wanted to add tests for scan-build, it seemed fairly straightforward:
diff --git a/test/Analysis/scan-build/lit.local.cfg b/test/Analysis/scan-build/lit.local.cfg
new file mode 100644
index 0000000000..84749a790e
--- /dev/null
+++ b/test/Analysis/scan-build/lit.local.cfg
@@ -0,0 +1,7 @@
+# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
+
+import lit.util
+
+config.substitutions.append(('%scan_build',
+ lit.util.which('scan-build',
+ config.environment['PATH'])))
diff --git a/test/Analysis/scan-build/simple-test.test b/test/Analysis/scan-build/simple-test.test
new file mode 100644
index 0000000000..61053dedce
--- /dev/null
+++ b/test/Analysis/scan-build/simple-test.test
@@ -0,0 +1,3 @@
+// RUN: %scan_build --help 2>&1 | FileCheck %s
+
+// CHECK: USAGE: scan-build
But i never committed it, so i'm not sure if it works anywhere except my machine, and i didn't write any actual tests after that. If you like this, you can add this to your patch or make me commit it separately, in any order.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55665/new/
https://reviews.llvm.org/D55665
More information about the cfe-commits
mailing list