Dear Clang Developers,
I am wondering about the best way to organize a project with several custom Clang Static Analyzer checkers.
Currently, we are compiling the custom checkers as plugins and load them dynamically with -load on the command line. This has the benefit of having a fast compile time, but it does not work (well) on Windows and it’s not nice for the end user.
The standard way, to add them in llvm/tools/clang/lib/StaticAnalyzer as described in https://clang-analyzer.llvm.org/checker_dev_manual.html, has the downsides of (1) having a large compilation time and (2) being in a place which is not directly under our source code control system.
I am wondering if there is a third way to organize things. Ideally, we would like to have
- fast compilation times;
- our checkers in a directory outside of the clang tree;
- easy on the end users (a static build of clang);
- our checkers working nicely on Windows.
The llvm tree has a “projects” directory under which they recommend to place external projects, but there are no guidelines on how to add CSA checkers there.
I would appreciate if you could provide some pointers on how to best organize our project.