| // RUN: %check_clang_tidy %s bugprone-bool-pointer-implicit-conversion %t |
| void SomeOtherFunction(bool*); |
| bool *b = SomeFunction(); |
| // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: dubious check of 'bool *' against 'nullptr' |
| // CHECK-FIXES: if (*b) { |
| // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: dubious check of 'bool *' against 'nullptr' |
| // CHECK-FIXES: if (F() && *b) { |
| #define TESTMACRO if (b || F()) |
| bool *c = SomeFunction(); |
| c[0] = false; // no-warning |
| SomeOtherFunction(c); // no-warning |
| delete[] c; // no-warning |
| *(c) = false; // no-warning |
| } d = { SomeFunction() }; |
| (void)*d.b; // no-warning |
| #define CHECK(b) if (b) {} |