[clang] [Clang] Fix conversion from floats to bool-backed enums per CWG1094 (PR #211172)

Joyee Cheung via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 05:34:57 PDT 2026


================
@@ -111,3 +119,34 @@ namespace cwg1070 { // cwg1070: 3.5
   C c = {};
 #endif
 } // namespace cwg1070
+
+#if __cplusplus >= 201103L
+namespace cwg1094 { // cwg1094: 24
+enum class E : bool { Zero, One };
----------------
joyeecheung wrote:

> I'm not seeing this anywhere in your changes nor in the cwg10xx.cpp. Am I missing something?

See L134 and below in `cwg10xx.cpp`, I think this should be enough to cover non-bool enum cases? (not sure if it's the styling that makes it a bit easy to miss, happy to add a comment if it helps!)

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


More information about the cfe-commits mailing list