[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:46 PDT 2025


================
@@ -13,6 +13,7 @@ enum class E { e };
 
 template<typename T> int f(T t) { return ~t; } // expected-error {{invalid argument type}}
 template<typename T, typename U> int f(T t, U u) { return t % u; } // expected-error {{invalid operands to}}
+                                                                   // expected-note at -1 {{no implicit conversion for scoped enum}}
----------------
erichkeane wrote:

Unrelated change.

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


More information about the cfe-commits mailing list