[cfe-dev] Data flow analysis in Clang

Manuel Klimek klimek at google.com
Fri Nov 14 00:38:48 PST 2014

You basically have the static analyzer's CFG and Clang's AST. With the AST
you can do limited data flow analysis (as long as you don't need path or
control flow sensitivity), with the CFG you can do anything you want (at
least in C) given enough computing power :P

AST access is well-integrated in libtooling, CFG access less so (I haven't
written a tool that uses the CFG, but given that the CFG is used for
Clang's diagnostics, I'd imagine it's not too hard to use from a libTooling
based tool).

Looping in Anna & Jordan for more info on what's possible with the CFG /
static analyzer.


On Fri Nov 14 2014 at 6:56:10 AM Vanush Vaswani <vanush at gmail.com> wrote:

> What API's are available for Dataflow Analysis in Clang? I want to create a
> standalone tool (using libTooling) to analyse C source code.
> --
> View this message in context: http://clang-developers.42468.
> n3.nabble.com/Data-flow-analysis-in-Clang-tp4042447.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141114/1a30e89f/attachment.html>

More information about the cfe-dev mailing list