[clang] Use existing AvailabilityKind enum for code completion availability (PR #160296)

Jannick Kremer via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 4 08:57:42 PST 2026


DeinAlptraum wrote:

@Endilll sorry for the long delay, I finally got around to implement your suggestions. A few comments:
- `AvailabilityKindCompat` cannot derive from `AvailabilityKind`, apparently non-empty enums cannot be subclassed, so I created a straight copy
- Regarding `DeprecationWarning`: I thought it wouldn't be a good fit here since function isn't deprecated _yet_, but the docs are a bit unclear: according to the [DeprecationWarning docs](https://docs.python.org/3.13/library/exceptions.html#DeprecationWarning), this is only used for deprecated features, and `PendingDeprecationWarning` would be more fitting. But the [policy for Python's own release cycle](https://peps.python.org/pep-0387/#making-incompatible-changes) says otherwise, and recommends `DeprecationWarning` for cases like ours. 

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


More information about the cfe-commits mailing list