1 // https://clang.llvm.org/extra/clang-tidy/checks/bugprone-bool-pointer-implicit-conversion.html
3 bool test(bool* pointer_to_bool
, int* pointer_to_int
)
5 if (pointer_to_bool
) { // warning for pointer to bool
8 if (pointer_to_int
) { // no warning for pointer to int
11 if (!pointer_to_bool
) { // no warning, but why not??
14 if (pointer_to_bool
!= nullptr) { // no warning for nullptr comparison
17 // no warning on return, but why not??
18 // clang-tidy bug: https://bugs.llvm.org/show_bug.cgi?id=38060
19 return pointer_to_bool
;