[clang] [Clang] Properly parse enumeration declarations with fixed underlying type in generic associations (PR #210353)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 07:58:12 PDT 2026
================
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s
+// expected-no-diagnostics
+
+typedef long l;
+
+_Static_assert(_Generic(0L, enum E : long { A } : 0, int: 1) == 0, "");
+
+_Static_assert(_Generic(0L, enum E : 0, int: 1) == 0, "");
+
+_Static_assert(_Generic(0L, enum A : l { B } : 0, int: 1) == 0, "");
----------------
AaronBallman wrote:
Please add a newline to the end of the file.
https://github.com/llvm/llvm-project/pull/210353
More information about the cfe-commits
mailing list