[clang] [libclang/python] Add missing enum variants (PR #143264)

Jannick Kremer via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 7 07:33:26 PDT 2025


DeinAlptraum wrote:

@Endilll this adds the missing enum variants, and also adds a test using libclang, parsing `Index.h` for all our used enums to check for missing variants. You can see what this looks like in case of failure on the first CI run for this PR.

This uses only the numeric enum values for comparisons since this is easier to implement (especially because some variants have aliases on the C-side)

Sidenote: I've noticed that a few enum variants have inconsistent namings, e.g. all Python enum variants are fully uppercase, execpt for `StmtExpr`. There's also `CXCursor_CompoundAssignOperator` which corresponds to `COMPOUND_ASSIGNMENT_OPERATOR`, i.e. slightly different names. I wonder if we should adapt these, but it might not be worth the breaking change.

https://github.com/llvm/llvm-project/pull/143264


More information about the cfe-commits mailing list