[clang] Use existing AvailabilityKind enum for code completion availability (PR #160296)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 17 01:15:01 PST 2026
================
@@ -3197,12 +3188,47 @@ def __repr__(self) -> str:
)
-availabilityKinds = {
- 0: CompletionChunk.Kind("Available"),
- 1: CompletionChunk.Kind("Deprecated"),
- 2: CompletionChunk.Kind("NotAvailable"),
- 3: CompletionChunk.Kind("NotAccessible"),
-}
+# AvailabilityKindCompat is an exact copy of AvailabilityKind, except for __str__
+# This is a temporary measure to keep the string representation the same
+# until we unify the return of CompletionString.availability to be AvailabilityKind
+# Note that deriving from AvailabilityKind directly is not possible
----------------
Endilll wrote:
```python
# AvailabilityKindCompat is an exact copy of AvailabilityKind, except for __str__.
# This is a temporary measure to keep the string representation the same
# until we change CompletionString.availability to return AvailabilityKind, like Cursor.availability does.
# Note that deriving from AvailabilityKind directly is not possible.
```
(reflow as needed)
https://github.com/llvm/llvm-project/pull/160296
More information about the cfe-commits
mailing list