[cfe-dev] getting all function calls?

Adrien Chauve adrien.chauve at gmail.com
Wed Jun 8 23:35:01 PDT 2011


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
>
>



More information about the cfe-dev mailing list