[cfe-dev] Data flow analysis in Clang

Anna Zaks ganna at apple.com
Sat Nov 15 23:03:26 PST 2014

> On Nov 15, 2014, at 10:51 AM, Manuel Klimek <klimek at google.com> wrote:
> On Sat Nov 15 2014 at 6:40:58 PM Markus Elfring <Markus.Elfring at web.de <mailto:Markus.Elfring at web.de>> wrote:
> > Data exchange about what?
> I am still missing interface descriptions around control flow graphs.
> http://clang.llvm.org/extra/doxygen/annotated.html <http://clang.llvm.org/extra/doxygen/annotated.html>
> http://clang.llvm.org/docs/LibTooling.html <http://clang.llvm.org/docs/LibTooling.html>
> Do I overlook any documentation (besides source code from the ClangTidy tool)?
> There is not much documentation about this apart from what the static analyzer itself has. For most of it look at the code:
> http://reviews.llvm.org/diffusion/L/browse/cfe/trunk/include/clang/Analysis/CFG.h <http://reviews.llvm.org/diffusion/L/browse/cfe/trunk/include/clang/Analysis/CFG.h>

The clang CFG class and related analysis are defined in /include/clang/Analysis/. Note, these are not stable APIs that are guaranteed not to change (though this is true for most of clang/llvm). There are few users of these APIs. For example, LiveVariables and CFGReachabilityAnalysis are good examples of flow-sensitive analysis implemented on top of the clang CFG. The clang static analyzer is another consumer of the CFG; however, it performs path-sensitive static analysis.


> Cheers,
> /Manuel
> Regards,
> Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141115/16a7d881/attachment.html>

More information about the cfe-dev mailing list