[cfe-dev] A small example on how to initiate header search and configure CFG from an already formed AST.

Parijat Banerjee parijat.pcr at gmail.com
Mon Sep 13 23:00:11 PDT 2010


What is the TranslationUnit required as a parameter for AnalysisContext
creation ?

Thanks and Regards
Parijat
On Mon, Sep 13, 2010 at 8:24 AM, Ted Kremenek <kremenek at apple.com> wrote:

> On Sep 13, 2010, at 5:25 AM, Parijat Banerjee wrote:
>
> > Also can someone give a small snippet of code to demonstrate forming a
> CFG class( branch 2.7 + )  given an already formed ASTContext class and
> maybe a RecursiveASTVisitor to traverse the AST .
>
> Probably the best way to construct a CFG is to have an AnalysisContext
> object do it for you.  You can construct an AnalysisContext object using a
> FunctionDecl, and then call the getCFG() method to have it lazily create a
> CFG.  When the AnalysisContext object is destroyed, the CFG will be
> destroyed as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100913/3bba7980/attachment.html>


More information about the cfe-dev mailing list