[cfe-dev] getting all function calls?

ret val retval386 at gmail.com
Wed Jun 8 12:50:06 PDT 2011


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?

Thanks again

On Wed, Jun 8, 2011 at 2:59 PM, Joshua Cranmer <Pidgeot18 at gmail.com> wrote:

>  On 6/8/2011 10:11 AM, ret val wrote:
>
> I think I should use a ASTConsumer and implement the HandleTranslationUnit
> method. From there I would have a ASTContext and I'm not entirely sure where
> I could find the function calls.
>
>
> Have your consumer also inherit from RecursiveASTVisitor, and then
> implement VisitCallExpr. Example code that I have done can be found here:
> <https://github.com/jcranmer/dxr/blob/clang/xref-tools/cxx-clang/dxr-index.cpp><https://github.com/jcranmer/dxr/blob/clang/xref-tools/cxx-clang/dxr-index.cpp>
> .
>
>
> Thanks
>
>
> _______________________________________________
> cfe-dev mailing listcfe-dev at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
> --
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110608/cae363b5/attachment.html>


More information about the cfe-dev mailing list