[clang] [C23] More improved type compatibility for enumerations (PR #150946)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 29 08:50:04 PDT 2025
================
@@ -511,6 +511,14 @@ def note_odr_number_of_bases : Note<
"class has %0 base %plural{1:class|:classes}0">;
def note_odr_enumerator : Note<"enumerator %0 with value %1 here">;
def note_odr_missing_enumerator : Note<"no corresponding enumerator here">;
+def note_odr_incompatible_fixed_underlying_type : Note<
+ "enumeration %0 declared with incompatible fixed underlying types (%1 vs. "
+ "%2)">;
+def note_odr_fixed_underlying_type : Note<
+ "enumeration %0 has fixed underlying type here">;
+def note_odr_missing_fixed_underlying_type : Note<
+ "enumeration %0 missing fixed underlying type here">;
----------------
AaronBallman wrote:
I've added test coverage, which discovered two more bugs. The first bug was with this PR, which has been fixed. The second bug is that the new test has an error that the user cannot address because it's with compiler-generated code. That's not being touched by this PR but is something we need to address separately.
https://github.com/llvm/llvm-project/pull/150946
More information about the cfe-commits
mailing list