[cfe-dev] LibTooling and Control Flow Analyses

Andi-Bogdan Postelnicu via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 4 11:58:10 PDT 2020


Yes you can build the CFG in libTooling using CFG::buildCFG by passing the ASTContext and the Stmt for which you want the CFG.

> On 4 Sep 2020, at 21:16, Stefan Schulze Frielinghaus via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> I've implemented a control-flow based analysis by deriving a CFG from an
> AnalysisDeclContext.  For fixed-point iteration I've used the
> ForwardDataflowWorklist.  The whole analysis is implemented directly
> into clang which may emit a couple of warnings during compilation.
> However, the analysis is actually independent and could therefore run on
> its own.  Thus I thought it would be also nice to have a standalone tool
> which led me to LibTooling.
> 
> Everything I read so far about LibTooling was about walking over the
> AST.  Is it also possible to derive a CFG in LibTooling (maybe from an
> ASTContext)?
> 
> Cheers,
> Stefan
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


More information about the cfe-dev mailing list