[clang] [libclang/python] Add missing concept declaration CursorKind (PR #69125)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 11:25:17 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Nick Renieris (VelocityRa)

<details>
<summary>Changes</summary>

Maps to [`CXCursor_ConceptDecl`](https://github.com/llvm/llvm-project/blob/ee8524087c78a673fcf5486ded69ee597a85e0f1/clang/include/clang-c/Index.h#L2716), added in ee8524087c78a673fcf5486ded69ee597a85e0f1.

Without this I get this error on my codebase which uses C++20 concept decls:
```
ValueError: Unknown template argument kind 604
```

---
Full diff: https://github.com/llvm/llvm-project/pull/69125.diff


1 Files Affected:

- (modified) clang/bindings/python/clang/cindex.py (+2) 


``````````diff
diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py
index ff386d2094a0b88..6a16f3a9ef6e957 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -1403,6 +1403,8 @@ def __repr__(self):
 CursorKind.STATIC_ASSERT = CursorKind(602)
 # A friend declaration
 CursorKind.FRIEND_DECL = CursorKind(603)
+# A concept declaration
+CursorKind.CONCEPT_DECL = CursorKind(604)
 
 # A code completion overload candidate.
 CursorKind.OVERLOAD_CANDIDATE = CursorKind(700)

``````````

</details>


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


More information about the cfe-commits mailing list