[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 08:01:21 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:
Oh weird! Github messed that up and showed it as JUST a blank line for me! When I went full-screen it shows it (and when I go back to not fullscreen anymore!). Sorry about that.
https://github.com/llvm/llvm-project/pull/152698
More information about the cfe-commits
mailing list