[cfe-dev] Unexposed clang_Type_getNumTemplateArguments et. al.

Shaheed Haque via cfe-dev cfe-dev at lists.llvm.org
Sun Nov 26 13:44:49 PST 2017


Hi,

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171126/78ca937b/attachment.html>


More information about the cfe-dev mailing list