Unexposed clang_Type_getNumTemplateArguments et. al.


I recently had cause to notice that current cindex.py [1] omits the Type-related versions of the TemplateArgument related functions, notably clang_Type_getNumTemplateArguments. This function in particular is important as without it, I believe it is impossible to make sense of the AST from Python in the face of nested templates.

FWIW, entries like this:

(“clang_Type_getNumTemplateArguments”, [Type], ctypes.c_size_t),

in the registration array plus a suitably named wrapper(s) appears to be what is needed. Would a bug report along these lines be appropriate? Or is there some subtle reason for not including it/these?

I also happened to notice that the clang_Cursor_ analogues incorrectly specify some of the types as c_int rather than c_size_t. I realise this is a minor point, but I thought I’d mention it.

Thanks, Shaheed

P.S. Please CC me on any replies as I’m not subscribed here.

[1] I just checked https://github.com/llvm-mirror/clang/blob/master/bindings/python/clang/cindex.py