[cfe-dev] Cross Translation Unit (CTU) static analysis milestone and status

Gábor Márton via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 16 03:18:16 PDT 2019


Hi,

Cross Translation Unit (CTU) static analysis on master(trunk) reached
a milestone.
Now we can CTU analyse a not trivial C project - TMUX in this case -
without any crashes.
We are preparing a buildbot which does this analysis of TMUX with the
help of CodeChecker (https://github.com/Ericsson/codechecker/). We
would like to include this bot in the network of llvm buildbots during
the following weeks.

We are getting closer and closer to be able to CTU analyse complex
C++11 projects with the master branch. But before that, there are more
patches to create and commit. This work is hard and slow, because most
of the patches target the ASTImporter which is used in LLDB too, but
with different parameters and set up. And of course we don't want to
create regression for the LLDB folks. So, sometimes this work does
involve creating LLDB patches as well.

We continuously develop the ASTImporter in our fork, and we prepare
patches for LLVM master. However, our fork will be always ahead of the
LLVM master. Currently, we plan to create 30 more patches, and 6 are
already on Phabricator. I you are interested about what do we plan to
upstream have a look at here:
https://github.com/Ericsson/clang/projects/2.

If you'd like to get the full power of CTU analysis you should really
try our fork:
https://github.com/Ericsson/clang . We recommend to use it together
with CodeChecker, since the scan-build script is abandoned. Our fork
can analyse complex C++11(14) projects like bitcoin and protobuf
without crashes. Currently we work on the analysis of LLVM/Clang
itself, atm we fail to analyse 39 TUs out of ~2000. We regularly test
and ship CodeChecker with this fork to our internal customers; there
are dozens of projects which use the CTU analysis. Note that, however,
all our projects are on Linux, so we focus on Linux. Currently the
fork is based on Clang7, but soon we'll start rebasing to Clang8.

Cheers,
Gabor


More information about the cfe-dev mailing list