[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 10:39:40 PST 2024
================
@@ -121,6 +121,14 @@ int NegativeShortTest[NegativeShort == -1 ? 1 : -1];
enum Color { Red, Green, Blue }; // expected-note{{previous use is here}}
typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}}
+// Enumerations with a fixed underlying type.
+// https://github.com/llvm/llvm-project/issues/116880
+#if __STDC_VERSION__ >= 202311L && !__has_extension(c_fixed_enum)
----------------
AaronBallman wrote:
We should also add a similar test for `__has_feature`.
https://github.com/llvm/llvm-project/pull/117507
More information about the cfe-commits
mailing list