[cfe-dev] Fwd: I am trying to using clang to do autocomplete, How to go to declaration of a macro?

Jacob Carlborg via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 24 01:59:56 PST 2016


On 2016-11-23 13:45, 罗勇刚(Yonggang Luo)  via cfe-dev wrote:
> I am interested in the location of that macro:( because I want to
> implement go to definition directly by calling to clang.exe.

I don't think that's possible. You either need to find a different tool 
that builds upon libclang or implement a tool yourself that uses 
libclang [1]. The libraries expose this functionality but not the 
compiler itself, as far as I know.

[1] http://clang.llvm.org/doxygen/group__CINDEX__CODE__COMPLET.html

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list