In C++, the enumeration is never Integer, and the enumeration condition judgment is added to avoid compiling errors when it is initialized to an integer.
Add support for initialization check of scope enum.
As the following case show, clang-tidy will give a wrong automatic fix:
enum Color {Red, Green, Blue}; enum class Gender {Male, Female}; void func() { Color color; // Color color = 0; <--- fix bug Gender gender; // <--- no warning }
clang-tidy: warning: do not use 'else' after 'return' [llvm-else-after-return]
not useful