[cfe-dev] [analyzer] Reimplementing checker options -- looking for reviews!

Devin Coughlin via cfe-dev cfe-dev at lists.llvm.org
Sun Mar 17 21:04:08 PDT 2019


Hi Kristóf,

It’s great to see this area getting cleaned up!

> On Mar 16, 2019, at 1:32 PM, Kristóf Umann <dkszelethus at gmail.com> wrote:
> 
> Hi!
> 
> TL;DR: The API for registering checker options changes once several changes that are up for review now land. This affects out-of-tree and checker plugin developers. Now's the time to participate in the discussion!

As a reminder, LLVM encourages an incremental development process where for significant changes it is important to discuss the change and gather consensus. This can avoiding wasted effort implement an approach that doesn’t have consensus. See <https://www.llvm.org/docs/DeveloperPolicy.html#incremental-changes>. It also makes the patches easier to review.

> In (not overwhelmingly) more detail:
> 
> After many-many months of hard work, I'm very confident in the current state of the project. Allow me to elaborate.
> 
> In the recent months, the frontend of the analyzer, specifically how command line options are handled, have changed a lot. Right now, compared to how things used to be,
> 
> * We can list non-checker analyzer configurations
> * We can verify user input for non-checker analyzer configurations
> * The interface of AnalyzerOptions changed dramatically in order not to allow this problem to arise again
> * debug.ConfigDumper contains all non-checker analyzer configurations, making it an actually usable debug tool
>  * An almost decade-old issue, the checker naming bug was resolved by reimplementing checker dependencies, and the related interface was also changed to guard against this happening again
> 
> You probably noticed that I put a very strong emphasis on non-checker analyzer configurations -- since checkers can be loaded run-time via plugins, doing the same for them is a far more difficult task.

I’m not sure how much emphasis we should put on checkers loaded via plugins. The analyzer really doesn’t support a plugin model and probably never will, given the difficulty of maintaining a stable C++ ABI when the components we depend on (such as the AST) don’t expose one in C++.

> I've uploaded several patches that finally fixes this for good. Although these have up for more than a month now, the code changed quite a bit, and after several in-office discussions, vigorous testing and refactoring, I'm very confident that everything is in it's final place. Please take a look if these changes affect you!
> 
> The most important of these patches is https://reviews.llvm.org/D57855 <https://reviews.llvm.org/D57855>. Please visit the "Stack" as well, the list of patches that depend on this and those this depends on. While 11 patches might seem a little scary at first, I've put a lot of effort into making as small as possible, in order to easy on reviewing. Note that the one patch I highlighted here is quite large however.

I commented on a bunch of these.

It is really, really great to see the improvements in testability and specification here. As I noted in some of the patches, I do have some serious concerns about the changes to the user model and command-line flags — but I don’t want those to get in the way of the general goodness of many of the improvements here. It would probably be a good idea to tease apart the patches that change the user model from those that improve analyzer infrastructure. Let's get the infrastructure ones landed!

Devin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190317/5612149f/attachment.html>


More information about the cfe-dev mailing list