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 origin/main HEAD --extensions cpp --
clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp
clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.cpp
clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git
a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
index 08f68f041..d0689974c 100644
--- a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
@@ -268,7 +268,8 @@ static bool isDestCapacityOverflows(const
MatchFinder::MatchResult &Result) {
// Assume that the destination array's capacity cannot overflow if the
// expression of the memory allocation contains '+ 1'.
StringRef DestCapacityExprStr = exprToStr(DestCapacityExpr, Result);
- return !(DestCapacityExprStr.contains("+1") ||
DestCapacityExprStr.contains("+ 1"));
+ return !(DestCapacityExprStr.contains("+1") ||
+ DestCapacityExprStr.contains("+ 1"));
}
static bool
diff --git a/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
b/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
index 2097d8f65..5ec0a87fd 100644
--- a/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
@@ -54,8 +54,7 @@ ConstCorrectnessCheck::ConstCorrectnessCheck(StringRef Name,
AllowedTypes(
utils::options::parseStringList(Options.get("AllowedTypes", ""))) {
- if (!AnalyzeValues && !AnalyzeReferences &&
- !AnalyzePointers)
+ if (!AnalyzeValues && !AnalyzeReferences && !AnalyzePointers)
this->configurationDiag(
"The check 'misc-const-correctness' will not "
"perform any analysis because 'AnalyzeValues', "
diff --git a/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
b/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
index 7ebdea5d6..5eb63537a 100644
--- a/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
@@ -53,7 +53,7 @@ AST_MATCHER(FunctionDecl, isPlacementOverload) {
const auto *FPT = Node.getType()->castAs<FunctionProtoType>();
ASTContext &Ctx = Node.getASTContext();
return !(Ctx.getLangOpts().SizedDeallocation &&
- Ctx.hasSameType(FPT->getParamType(1), Ctx.getSizeType()));
+ Ctx.hasSameType(FPT->getParamType(1), Ctx.getSizeType()));
}
} // namespace
diff --git a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
index 53fd9fa67..265306c68 100644
--- a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
@@ -197,8 +197,8 @@ static bool areExclusiveRanges(BinaryOperatorKind OpcodeLHS,
// Handle the case where constants are off by one: x > 5 && x < 6.
APSInt ValueLhsPlus1;
return OpcodeLHS == BO_GT && OpcodeRHS == BO_LT &&
- incrementWithoutOverflow(ValueLHS, ValueLhsPlus1) &&
- APSInt::compareValues(ValueLhsPlus1, ValueRHS) == 0;
+ incrementWithoutOverflow(ValueLHS, ValueLhsPlus1) &&
+ APSInt::compareValues(ValueLhsPlus1, ValueRHS) == 0;
}
// Returns whether the ranges covered by the union of both relational
@@ -724,9 +724,9 @@ static bool areSidesBinaryConstExpressions(const
BinaryOperator *&BinOp,
};
return (IsIntegerConstantExpr(LhsBinOp->getLHS()) ||
- IsIntegerConstantExpr(LhsBinOp->getRHS())) &&
- (IsIntegerConstantExpr(RhsBinOp->getLHS()) ||
- IsIntegerConstantExpr(RhsBinOp->getRHS()));
+ IsIntegerConstantExpr(LhsBinOp->getRHS())) &&
+ (IsIntegerConstantExpr(RhsBinOp->getLHS()) ||
+ IsIntegerConstantExpr(RhsBinOp->getRHS()));
}
static bool areSidesBinaryConstExpressionsOrDefinesOrIntegerConstant(
@@ -743,7 +743,7 @@ static bool
areSidesBinaryConstExpressionsOrDefinesOrIntegerConstant(
auto IsDefineExpr = [AstCtx](const Expr *E) {
const SourceRange Lsr = E->getSourceRange();
return !(!Lsr.getBegin().isMacroID() || E->isValueDependent() ||
- !E->isIntegerConstantExpr(*AstCtx));
+ !E->isIntegerConstantExpr(*AstCtx));
};
return IsDefineExpr(Lhs) || IsDefineExpr(Rhs);
diff --git
a/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
b/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
index ca8700d97..77b66f858 100644
--- a/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
@@ -413,7 +413,8 @@ static bool areTypesCompatible(QualType ArgType, QualType
ParamType,
// Arithmetic types are interconvertible, except scoped enums.
if (ParamType->isArithmeticType() && ArgType->isArithmeticType()) {
- return !((ParamType->isEnumeralType() &&
ParamType->castAsCanonical<EnumType>()
+ return !(
+ (ParamType->isEnumeralType() && ParamType->castAsCanonical<EnumType>()
->getOriginalDecl()
->isScoped()) ||
(ArgType->isEnumeralType() &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/158706
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits