[cfe-dev] organizing a clang static analyzer checker project

Stefan Ciobaca via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 5 23:29:08 PDT 2017


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.

Thank you!

Best,
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170606/091f6bf1/attachment.html>


More information about the cfe-dev mailing list