[PATCH] D57860: [analyzer] Validate checker option names and values

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 12 04:39:18 PDT 2019


Szelethus marked 2 inline comments as done.
Szelethus added inline comments.


================
Comment at: lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp:340
+  if (OptionType == "bool") {
+    if (SuppliedValue != "true" && SuppliedValue != "false") {
+      if (AnOpts.ShouldEmitErrorsOnInvalidConfigValue) {
----------------
whisperity wrote:
> Does this mean that we no longer can give "1" and "0" for boolean checker options? Or was that //Tidy// who allowed such in the first place?
Well yea, "true" or "false" is the only input we accept (and have ever accepted) for boolean configs. I have nothing against adding 1 and 0 too, but let that be a topic of another revision.


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

https://reviews.llvm.org/D57860





More information about the cfe-commits mailing list