[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 18 16:44:53 PST 2018


NoQ added a comment.

Ugh. No, it doesn't work. It seems that stuff after `-Xclang` is not included in `Args` (even at the beginning of the function, when no arguments are consumed), and it doesn't make it into `CmdArgs` (yet?).

Test passes because `-analyzer-config` is a sub-string of the //file name//. If you rename the test, it stops working (:

I'll be debugging this a bit more on my end, but help is welcome. And in any case, thanks a lot for looking into this!~ I'm even more surprised how hard it is to come up with a sensible solution to our weird problem.



================
Comment at: test/Analysis/invalid-analyzer-config-value.c:72
+// even if -analyze isn't specified.
+// RUN: %clang --analyze -Xclang -analyzer-config -Xclang remember=TheVasa %s
+
----------------
This run-line *does* have `-analyze` specified, because that's what `--analyze` expands to. I guess the test that we need would be along the lines of `clang -Xclang -analyzer-config ...` without `--analyze`.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55823/new/

https://reviews.llvm.org/D55823





More information about the cfe-commits mailing list