[cfe-dev] resolving call expressions with libclang

Douglas Gregor dgregor at apple.com
Sat Feb 5 09:07:55 PST 2011

Sent from my iPhone

On Feb 5, 2011, at 1:30 AM, Erik Verbruggen <erikjv at me.com> wrote:

> Hi,
> How can I resolve a CXCursor of kind CXCursor_CallExpr to a function declaration or the function definition (if any)?

Use clang_getCursorReferenced. 

> Or, should the visitor wait for a CXCursor_DeclRefExpr cursor? If so, will the resolved cursor point to the correct overload when used with C++ code?

Yes, it will point to the correct overload. 

  - Doug

> Regards,
> Erik.
> _______________________________________________
> 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/20110205/80122e70/attachment.html>

More information about the cfe-dev mailing list