enum E : long { E0, E1 };
E f();
bool g(int i, double d) {
if (i) {}
if (d) {}
return f();
}
In the code above, three instances of readability-implicit-bool-conversion are detected. However, in some code bases, similar if conditions are very common and do not cause issues, whereas conversion from an enum might be a serious bug.
It would be nice to have more control over readability-implicit-bool-conversion warnings by either type involved (enum vs numerical) or usage (if vs return).