Use clang's enum_extensibility attribute to check enum values
We could avoid constructing bad enum values using enum_extensibility: https://clang.llvm.org/docs/AttributeReference.html#enum-extensibility
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- teor changed milestone to %Tor: unspecified
changed milestone to %Tor: unspecified
Here's how we can check for that feature in clang: https://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros
I think the same syntax works on gcc, but we should check.
That first link (https://clang.llvm.org/docs/AttributeReference.html#enum-extensibility) gives me an empty page. Is there a better place to find out what this is?
Replying to nickm:
That first link (https://clang.llvm.org/docs/AttributeReference.html#enum-extensibility) gives me an empty page. Is there a better place to find out what this is?
That's really weird, I see that too. But it worked a few days ago. And some search engines still have it indexed :-)
Here's the version from clang 9.0.0, the latest release: https://releases.llvm.org/9.0.0/tools/clang/docs/AttributeReference.html#enum-extensibility
- Trac changed time estimate to 8h
changed time estimate to 8h
- Trac moved to tpo/core/tor#32580 (closed)
moved to tpo/core/tor#32580 (closed)