This is an archive of the discontinued LLVM Phabricator instance.

[python bindings] Add missing cursor kind in Clang Python's bindings.
Needs ReviewPublic

Authored by ColinChargy on Aug 27 2021, 7:49 AM.

Details

Reviewers
rsmith
jdoerfert
Summary

Some of the values in CXCursorKind in clang\include\clang-c\Index.h (lines 1706-2686) where not handled in clang\bindings\python\clang\cindex.py, leading to raise a Python exception where retrieving kind of such Cursors:

  File "/usr/lib/python3/dist-packages/clang/cindex.py", line 650, in from_id
    raise ValueError('Unknown template argument kind %d' % id)
ValueError: Unknown template argument kind 280

I hope this patch is OK.

I think we could, in a future patch, put these definitions in a single file to make sure both C and python always match; let me know if that does seem appealing.

Regards,
Colin Chargy

Diff Detail

Event Timeline

ColinChargy created this revision.Aug 27 2021, 7:49 AM
ColinChargy requested review of this revision.Aug 27 2021, 7:49 AM

What is the process / schedule to get this change in? I am facing the same problem with llvm 12 and python bindings.

Hi @teerytko,
It's my first PR, so I don't know how to get this PR reviewed. I sent an e-mail to @rsmith without luck. Should I send another e-mail to the mailing list IYHO ?
Regards,
Colin Chargy