[clang] [Clang] Add diagnostic when scoped enumeration requires an explicit conversion for binary operations (PR #152698)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 15 06:36:47 PDT 2025
================
@@ -4401,6 +4401,11 @@ def warn_impcast_different_enum_types : Warning<
def warn_impcast_int_to_enum : Warning<
"implicit conversion from %0 to enumeration type %1 is invalid in C++">,
InGroup<ImplicitIntToEnumCast>, DefaultIgnore;
+
+def note_no_implicit_conversion_for_scoped_enum
+ : Note<"no implicit conversion for scoped enum; consider casting to "
----------------
erichkeane wrote:
I think I'd rather we stick to just the 1 warning, so don't do the C++23 version.
https://github.com/llvm/llvm-project/pull/152698
More information about the cfe-commits
mailing list