Szelethus added a comment.

> (though I would also prefer if even checkers could pre-register their options 
> somehow)

Good news, I've also successfully modified the tblgen file `Checkers.td` to be 
able to register checker options (it took waaaay more effort and I thought it'd 
take), so a list of non-plugin checker options should only be a patch away. 
Still struggling with the plugin part, but I'm making progress.



================
Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:157
+                     .getAsInteger(10, Ret);
+  assert(!HasFailed && "analyzer-config option should be numeric");
+  (void)HasFailed;
----------------
xazax.hun wrote:
> Can this assert be triggered using a bad invocation of the analyzer? I wonder 
> if it is a good idea to use asserts to validate user input. Maybe it would be 
> better to generate a warning and return the default value?
This is the current state of things, but I intend to change it later in a 
followup patch. I am not even sure what the thinking was behind this solution 
myself.


Repository:
  rC Clang

https://reviews.llvm.org/D53483



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to