Issue 63450
Summary [clang-tidy] More fine-grained options for readability-implicit-bool-conversion
Labels new issue
Assignees
Reporter chrchr-github
    ~~~c++
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`).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to