llvm-project
8b5503d9 - [Clang] Add diagnostic when scoped enumeration requires an explicit conversion for binary operations (#152698)

Commit
43 days ago
[Clang] Add diagnostic when scoped enumeration requires an explicit conversion for binary operations (#152698) ```diff main.cpp:4:8: error: invalid operands to binary expression ('E' and 'int') 4 | E::e + 0; | ~~~~ ^ ~ +main.cpp:4:3: note: no implicit conversion for scoped enum; consider casting to underlying type + 4 | E::e + 0; + | ^ + | static_cast<int>( ) ``` Resolves #24265
Author
Parents
Loading