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 41345925f9393518be8029cfb1ea80cfeb5631b4 
214e252a23fe6473aa21ccfbf8d098e1dbac5eb0 --extensions h,cpp,c -- 
clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp 
clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h 
clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion.c
 
clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion.cpp
``````````

</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 7ac5ec0b2f..825455e822 100644
--- a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
@@ -74,7 +74,8 @@ bool isUnaryLogicalNotOperator(const Stmt *Statement) {
 
 void fixGenericExprCastToBool(DiagnosticBuilder &Diag,
                               const ImplicitCastExpr *Cast, const Stmt *Parent,
-                              ASTContext &Context, bool 
UseUpperCaseLiteralSuffix) {
+                              ASTContext &Context,
+                              bool UseUpperCaseLiteralSuffix) {
   // In case of expressions like (! integer), we should remove the redundant 
not
   // operator and use inverted comparison (integer == 0).
   bool InvertComparison =
@@ -121,7 +122,8 @@ void fixGenericExprCastToBool(DiagnosticBuilder &Diag,
   }
 
   EndLocInsertion += getZeroLiteralToCompareWithForType(
-      Cast->getCastKind(), SubExpr->getType(), Context, 
UseUpperCaseLiteralSuffix);
+      Cast->getCastKind(), SubExpr->getType(), Context,
+      UseUpperCaseLiteralSuffix);
 
   if (NeedOuterParens) {
     EndLocInsertion += ")";
@@ -264,7 +266,8 @@ ImplicitBoolConversionCheck::ImplicitBoolConversionCheck(
     : ClangTidyCheck(Name, Context),
       AllowIntegerConditions(Options.get("AllowIntegerConditions", false)),
       AllowPointerConditions(Options.get("AllowPointerConditions", false)),
-      UseUpperCaseLiteralSuffix(Options.get("UseUpperCaseLiteralSuffix", 
false)) {}
+      UseUpperCaseLiteralSuffix(
+          Options.get("UseUpperCaseLiteralSuffix", false)) {}
 
 void ImplicitBoolConversionCheck::storeOptions(
     ClangTidyOptions::OptionMap &Opts) {
@@ -395,7 +398,8 @@ void ImplicitBoolConversionCheck::handleCastToBool(const 
ImplicitCastExpr *Cast,
   if (!EquivalentLiteral.empty()) {
     Diag << tooling::fixit::createReplacement(*Cast, EquivalentLiteral);
   } else {
-    fixGenericExprCastToBool(Diag, Cast, Parent, Context, 
UseUpperCaseLiteralSuffix);
+    fixGenericExprCastToBool(Diag, Cast, Parent, Context,
+                             UseUpperCaseLiteralSuffix);
   }
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/102831
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to