github-actions[bot] wrote: <!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning: <details> <summary> You can test this locally with the following command: </summary> ``````````bash git-clang-format --diff 6d34cfac53b993a6cdf3d6669e017eac3a2296c8 75fe805c9e2b45632e2653b3e3a1b7874ede2507 --extensions h,cpp -- clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-check.cpp clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h `````````` </details> <details> <summary> View the diff from clang-format here. </summary> ``````````diff diff --git a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp index 6c5456ef60..48851da143 100644 --- a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp @@ -349,26 +349,27 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) { forField(hasBitWidth(1))))); Finder->addMatcher( - traverse(TK_AsIs, implicitCastExpr( - ImplicitCastFromBool, unless(ExceptionCases), - // Exclude comparisons of bools, as they are - // always cast to integers in such context: - // bool_expr_a == bool_expr_b - // bool_expr_a != bool_expr_b - unless(hasParent(binaryOperator(anyOf( - BoolComparison, BoolXor, BoolOpAssignment, - BitfieldAssignment)))), - implicitCastExpr().bind("implicitCastFromBool"), - unless(hasParent(BitfieldConstruct)), - // Check also for nested casts, for example: - // bool -> int -> float. - anyOf(hasParent(implicitCastExpr().bind( - "furtherImplicitCast")), - anything()), - unless(isInTemplateInstantiation()), - unless(IsInCompilerGeneratedFunction))), + traverse( + TK_AsIs, + implicitCastExpr( + ImplicitCastFromBool, unless(ExceptionCases), + // Exclude comparisons of bools, as they are + // always cast to integers in such context: + // bool_expr_a == bool_expr_b + // bool_expr_a != bool_expr_b + unless(hasParent(binaryOperator(anyOf(BoolComparison, BoolXor, + BoolOpAssignment, + BitfieldAssignment)))), + implicitCastExpr().bind("implicitCastFromBool"), + unless(hasParent(BitfieldConstruct)), + // Check also for nested casts, for example: + // bool -> int -> float. + anyOf(hasParent(implicitCastExpr().bind("furtherImplicitCast")), + anything()), + unless(isInTemplateInstantiation()), + unless(IsInCompilerGeneratedFunction))), this); - } + } } void ImplicitBoolConversionCheck::check( `````````` </details> https://github.com/llvm/llvm-project/pull/120087 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits