[cfe-dev] Is there any way to get the caller of the CallExpr* in VisitCallExpr method?

dblaikie at gmail.com dblaikie at gmail.com
Sun Dec 29 08:54:45 PST 2013


Clang doesn't store parental relationships of AST nodes by default. So
you'd have to keep track of that yourself. If you're working with AST
matches I Selene you can use the 'parent map' for this.

On Sunday, December 29, 2013 4:37:14 AM, lotay <158481612 at qq.com> wrote:

> Hi all.
>
> the method of getDirectCallee() can get the callee(be called
> method/function) of the call expression,
> but Is there any way to get the caller(the method/ function who called it)
> of the CallExpr* in VisitCallExpr () method?
> Can anyone help me for this problem, or are there any other ways to know
> the
> caller of one call expression?
>
> Thanks in advance for any help...
>
>
>
> --
> View this message in context: http://clang-developers.42468.
> n3.nabble.com/Is-there-any-way-to-get-the-caller-of-the-
> CallExpr-in-VisitCallExpr-method-tp4036801.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> 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/20131229/78692f1f/attachment.html>


More information about the cfe-dev mailing list