struct Obj {
int data;
}
void foo(Obj* obj) {
// OK
if (obj) {
if (obj->data == 42) {
}
}
// Warning
if (obj && obj->data == 42) {
}
}
If pointer is dereferenced in the same conditional expression after null pointer check then clang-tidy warns even if readability-implicit-bool-conversion.AllowPointerConditions is set to true. I believe that this option should allow this too.