diff --git a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp --- a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp @@ -228,7 +228,8 @@ if (!S) return false; if (isa(S) || isa(S) || isa(S) || - isa(S) || isa(S)) + isa(S) || isa(S) || + isa(S)) return true; if (isa(S) || isa(S) || isUnaryLogicalNotOperator(S) || diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-allow-in-conditions.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-allow-in-conditions.cpp --- a/clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-allow-in-conditions.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-allow-in-conditions.cpp @@ -38,6 +38,9 @@ while (functionReturningInt()) {} while (functionReturningPointer()) {} while (functionReturningInt() && !functionReturningPointer() || (!functionReturningInt() && functionReturningPointer())) {} + do {} while (functionReturningInt()); + do {} while (functionReturningPointer()); + do {} while (functionReturningInt() && !functionReturningPointer() || (!functionReturningInt() && functionReturningPointer())); int value1 = functionReturningInt() ? 1 : 2; int value2 = !functionReturningInt() ? 1 : 2; int value3 = (functionReturningInt() && functionReturningPointer() || !functionReturningInt()) ? 1 : 2;