[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:41 PST 2024


================
@@ -308,6 +308,10 @@ EXTENSION(datasizeof, LangOpts.CPlusPlus)
 
 FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus && LangOpts.RelativeCXXABIVTables)
 
+//Fixed enum feature and extension, to be relocated in this file
+FEATURE(c_fixed_enum, true)    
+EXTENSION(c_fixed_enum, true)  
----------------
AaronBallman wrote:

Yeah, it should be both, but I'd move the code around a bit, similar to:

https://github.com/llvm/llvm-project/blob/4ab298b5fbc8f48387062b2dd99ea07127c02e6b/clang/include/clang/Basic/Features.def#L160 (we can add a new section for C23 features)

https://github.com/llvm/llvm-project/blob/4ab298b5fbc8f48387062b2dd99ea07127c02e6b/clang/include/clang/Basic/Features.def#L263 (we can put under the C23 section)

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


More information about the cfe-commits mailing list