[PATCH] D62885: [analyzer] Add werror flag for analyzer warnings

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 4 17:40:26 PDT 2019


Szelethus added a comment.

Interesting. Let's also have a link to your cfe-dev letter: http://lists.llvm.org/pipermail/cfe-dev/2019-June/062495.html

So, you'd like to make this a frontend flag in order not to expose it to "regular" end users? Or was it because, well, every other flag we have is a frontend flag?

We've recently had a lot of discussion about what features should the user access -- now, we currently discourage anyone from using the analyzer from the command line (as seen by the fact that every configuration flag we have only exposed through the frontend), which at the same time forces anyone who'd like to custom-configure it to be exposed to every frontend flag we have.

This is, in my opinion, somewhat counter intuitive: we use the frontend to hide developer-only flags, yet the expectation that nobody will visit them is unreasonable if we don't provide a subset of end-user facing flags through the driver. This has resulted (or so I've been told) in numerous bugreports from users using experimental features that were known to be not stable.

For a project whose entire foundation is based on an estimation (I mean to refer to false positives), I fear that this flag would be impractical for most users. I certainly wouldn't like to receive an error on a false positive, but I can see that for your specific use, while on specific checkers are enabled, this would be fine. But again, do we really do this flag justice by "simply" making it a frontend flag?

At the end of the day, the idea sounds great, and I'm not opposed to landing this before resolve this paradox.



================
Comment at: test/Analysis/override-werror.c:10
+  return p; // expected-warning{{incompatible pointer types}} \
+               werror-warning{{incompatible pointer types}}
 }
----------------
Why isn't this `werror-error`?


Repository:
  rC Clang

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

https://reviews.llvm.org/D62885





More information about the cfe-commits mailing list