[cfe-dev] libclang - access to function parameter types

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Sep 13 14:58:10 PDT 2011


On Sep 12, 2011, at 3:55 PM, Vinay Sajip wrote:

> It appears that function parameter types are not accessible via the libclang API
> - can someone confirm this? I can access the return type and parameter types via
> declarations using child nodes of the declaration cursor (e.g. ParmDecl), but if
> handed a CXType corresponding to a pointer to a function with prototype, how can
> you get at the parameter types of the function?

There is no way currently; there should be something like 'unsigned clang_getFunctionTypeNumParams(CXType)' and 'CXType clang_getFunctionTypeParam(CXType, unsigned index)' 

> 
> Thanks,
> 
> Vinay Sajip
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list