[cfe-dev] querying information about preprocessing directives in libclang

Stefan Seefeld stefan at seefeld.name
Sun Mar 27 14:38:41 PDT 2011


libclang defines cursor kinds for various preprocessing directives. 
However, I can't seem to find any means to access information about 
those directives themselves.

What I'd like to query is:

* from include directives:
    - the kind of directive (e.g., "include", "include_next")
    - the file name being included, in its symbolic form (the path as 
written)
    - the actual filename (full path) being resolved.

* from macro definitions:
   - the type of macro (object-like, function-like)
   - the parameter list
   - the macro definition body

* from macro instantiation:
   - a reference to the definition

Is any of this already available through libclang ? If not, is it planned ?

If neither, is there another API that's more suitable to find this 
information ?

Thanks,
         Stefan

--

       ...ich hab' noch einen Koffer in Berlin...




More information about the cfe-dev mailing list