[cfe-dev] clang_getCursor and Macro instantiations

Michal Fizek michal.fizek at googlemail.com
Fri Dec 23 06:20:04 PST 2011


Hi all,
Im new here, so forgive me please, if im doing something wrong.
I have a question regarding libclang and clang_getCursor and macro
calling. When im using libclang, and its function clang_getCursor(),
and i pass to it a location in c++ source, that points to a parameter
of a macro call, the clang_getCursor returns me a cursor to the macro,
not to the parameter.. can i even get the cursor the the parameter, or
its not possible? ..Lets say i have macro LOG(param1, param2, param3)
something, something... ... and when i call LOG(something1,
something2, something3(some variable)) and i call clang_getCursor on
something3 location.. i get a cursor to macro LOG instantiation ...
there is no way around this?

Thank you
Michal



More information about the cfe-dev mailing list