[cfe-dev] getting all function calls?

ret val retval386 at gmail.com
Thu Jun 9 06:11:34 PDT 2011


I see the equivlanent TraverseStmt() method now, but I do not see a way to
get statments fron the ASTContext.


On Thu, Jun 9, 2011 at 2:35 AM, Adrien Chauve <adrien.chauve at gmail.com>wrote:

> You need to launch at some time the traversal of the AST. One way is
> to call Traverse in the virtual method HandleTranslationUnit.
> Please see my first answer to this thread.
>
> Adrien
>
> On Thu, Jun 9, 2011 at 04:15, ret val <retval386 at gmail.com> wrote:
> > I have been editing the PrintFunctionNames
> > example(llvm/tools/clang/examples) and the trivial VisitCallExpr() method
> I
> > implemented does not run. Does anyone mind taking a look at it?
> >
> > The full file is here: https://gist.github.com/1015907
> >
> > Thanks again
> >
> > On Wed, Jun 8, 2011 at 4:02 PM, Joshua Cranmer <Pidgeot18 at gmail.com>
> wrote:
> >>
> >> On 6/8/2011 12:50 PM, ret val wrote:
> >> > I do not see the VisitCallExpr method in the code or in Doxygen.
> >> >
> >> > It looks like the RecursiveASTVisitor class can give me statements,
> >> > where statements become expressions become function calls by
> >> > inheritance. Or am I missing something?
> >> So, most of the functions in RecursiveASTVisitor are defined via macro
> >> calls, which makes finding out what they are difficult. For my own
> >> sanity, I used a simple plugin to dump out all of the functions of
> >> RecursiveASTVisitor; their output can be found at
> >> <http://www.tjhsst.edu/~jcranmer/visitorfuncs.txt>.
> >>
> >> --
> >> Joshua Cranmer
> >> News submodule owner
> >> JSHydra author
> >>
> >>
> >> _______________________________________________
> >> cfe-dev mailing list
> >> cfe-dev at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >
> >
> > _______________________________________________
> > 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/20110609/8c0a9e64/attachment.html>


More information about the cfe-dev mailing list