[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 22 00:26:58 PST 2024
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 bc1c86b810e518a8e3fa90d5c26908c43788873d c21867a39c74b23897158989081293558feb698c -- clang/include/clang/Analysis/Analyses/Consumed.h clang/include/clang/Analysis/Analyses/Dominators.h clang/include/clang/Analysis/Analyses/LiveVariables.h clang/include/clang/Analysis/Analyses/PostOrderCFGView.h clang/include/clang/Analysis/Analyses/ReachableCode.h clang/include/clang/Analysis/Analyses/ThreadSafety.h clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h clang/include/clang/Analysis/Analyses/UninitializedValues.h clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/include/clang/Analysis/AnyCall.h clang/include/clang/Analysis/CFG.h clang/include/clang/Analysis/CFGStmtMap.h clang/include/clang/Analysis/CallGraph.h clang/include/clang/Analysis/CloneDetection.h clang/include/clang/Analysis/CodeInjector.h clang/include/clang/Analysis/ConstructionContext.h clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h clang/include/clang/Analysis/FlowSensitive/DataflowValues.h clang/include/clang/Analysis/PathDiagnostic.h clang/include/clang/Analysis/ProgramPoint.h clang/include/clang/Analysis/RetainSummaryManager.h clang/include/clang/Analysis/SelectorExtras.h clang/include/clang/Analysis/Support/BumpVector.h clang/include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h clang/include/clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h clang/include/clang/StaticAnalyzer/Core/Checker.h clang/include/clang/StaticAnalyzer/Core/CheckerManager.h clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValVisitor.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/SummaryManager.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h clang/lib/Analysis/AnalysisDeclContext.cpp clang/lib/Analysis/BodyFarm.cpp clang/lib/Analysis/CFG.cpp clang/lib/Analysis/CFGReachabilityAnalysis.cpp clang/lib/Analysis/CFGStmtMap.cpp clang/lib/Analysis/CallGraph.cpp clang/lib/Analysis/CocoaConventions.cpp clang/lib/Analysis/ConstructionContext.cpp clang/lib/Analysis/Consumed.cpp clang/lib/Analysis/Dominators.cpp clang/lib/Analysis/ExprMutationAnalyzer.cpp clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp clang/lib/Analysis/FlowSensitive/Transfer.cpp clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp clang/lib/Analysis/IssueHash.cpp clang/lib/Analysis/LiveVariables.cpp clang/lib/Analysis/MacroExpansionContext.cpp clang/lib/Analysis/ObjCNoReturn.cpp clang/lib/Analysis/PathDiagnostic.cpp clang/lib/Analysis/PostOrderCFGView.cpp clang/lib/Analysis/ProgramPoint.cpp clang/lib/Analysis/ReachableCode.cpp clang/lib/Analysis/RetainSummaryManager.cpp clang/lib/Analysis/ThreadSafety.cpp clang/lib/Analysis/ThreadSafetyCommon.cpp clang/lib/Analysis/ThreadSafetyLogical.cpp clang/lib/Analysis/ThreadSafetyTIL.cpp clang/lib/Analysis/UninitializedValues.cpp clang/lib/Analysis/UnsafeBufferUsage.cpp clang/lib/Analysis/plugins/CheckerOptionHandling/CheckerOptionHandling.cpp clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp clang/lib/StaticAnalyzer/Checkers/BitwiseShiftChecker.cpp clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp clang/lib/StaticAnalyzer/Checkers/CXXSelfAssignmentChecker.cpp clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp clang/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp clang/lib/StaticAnalyzer/Checkers/InvalidatedIteratorChecker.cpp clang/lib/StaticAnalyzer/Checkers/Iterator.cpp clang/lib/StaticAnalyzer/Checkers/Iterator.h clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp clang/lib/StaticAnalyzer/Checkers/IteratorRangeChecker.cpp clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.h clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.cpp clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp clang/lib/StaticAnalyzer/Checkers/MismatchedIteratorChecker.cpp clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp clang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp clang/lib/StaticAnalyzer/Checkers/PointerIterationChecker.cpp clang/lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp clang/lib/StaticAnalyzer/Checkers/STLAlgorithmModeling.cpp clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp clang/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp clang/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp clang/lib/StaticAnalyzer/Checkers/TrustReturnsNonnullChecker.cpp clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp clang/lib/StaticAnalyzer/Core/APSIntType.cpp clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp clang/lib/StaticAnalyzer/Core/BlockCounter.cpp clang/lib/StaticAnalyzer/Core/BugReporter.cpp clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/lib/StaticAnalyzer/Core/CallEvent.cpp clang/lib/StaticAnalyzer/Core/Checker.cpp clang/lib/StaticAnalyzer/Core/CheckerContext.cpp clang/lib/StaticAnalyzer/Core/CheckerManager.cpp clang/lib/StaticAnalyzer/Core/CoreEngine.cpp clang/lib/StaticAnalyzer/Core/Environment.cpp clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp clang/lib/StaticAnalyzer/Core/LoopWidening.cpp clang/lib/StaticAnalyzer/Core/MemRegion.cpp clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h clang/lib/StaticAnalyzer/Core/ProgramState.cpp clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp clang/lib/StaticAnalyzer/Core/RegionStore.cpp clang/lib/StaticAnalyzer/Core/SValBuilder.cpp clang/lib/StaticAnalyzer/Core/SVals.cpp clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp clang/lib/StaticAnalyzer/Core/Store.cpp clang/lib/StaticAnalyzer/Core/SymbolManager.cpp clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp clang/lib/StaticAnalyzer/Core/WorkList.cpp clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp clang/lib/StaticAnalyzer/Frontend/AnalyzerHelpFlags.cpp clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
index f29efb9721..b95095d218 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
+++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
@@ -138,8 +138,8 @@ private:
// The first-choice implementation: use `widen` when it is available.
template <typename T>
- static auto widenInternal(Rank0, T &Current,
- const T &Prev) -> decltype(Current.widen(Prev)) {
+ static auto widenInternal(Rank0, T &Current, const T &Prev)
+ -> decltype(Current.widen(Prev)) {
return Current.widen(Prev);
}
@@ -247,13 +247,13 @@ runDataflowAnalysis(
// FIXME: Make all classes derived from `DataflowAnalysis` take an `Environment`
// parameter in their constructor so that we can get rid of this abomination.
template <typename AnalysisT>
-auto createAnalysis(ASTContext &ASTCtx,
- Environment &Env) -> decltype(AnalysisT(ASTCtx, Env)) {
+auto createAnalysis(ASTContext &ASTCtx, Environment &Env)
+ -> decltype(AnalysisT(ASTCtx, Env)) {
return AnalysisT(ASTCtx, Env);
}
template <typename AnalysisT>
-auto createAnalysis(ASTContext &ASTCtx,
- Environment &Env) -> decltype(AnalysisT(ASTCtx)) {
+auto createAnalysis(ASTContext &ASTCtx, Environment &Env)
+ -> decltype(AnalysisT(ASTCtx)) {
return AnalysisT(ASTCtx);
}
diff --git a/clang/lib/Analysis/BodyFarm.cpp b/clang/lib/Analysis/BodyFarm.cpp
index 9a6f158bfd..9c24983a48 100644
--- a/clang/lib/Analysis/BodyFarm.cpp
+++ b/clang/lib/Analysis/BodyFarm.cpp
@@ -422,9 +422,9 @@ static Stmt *create_call_once(ASTContext &C, const FunctionDecl *D) {
// First two arguments are used for the flag and for the callback.
if (D->getNumParams() != CallbackFunctionType->getNumParams() + 2) {
- LLVM_DEBUG(llvm::dbgs()
- << "Types of params of the callback do not match "
- << "params passed to std::call_once, " << "ignoring the call\n");
+ LLVM_DEBUG(llvm::dbgs() << "Types of params of the callback do not match "
+ << "params passed to std::call_once, "
+ << "ignoring the call\n");
return nullptr;
}
diff --git a/clang/lib/Analysis/ProgramPoint.cpp b/clang/lib/Analysis/ProgramPoint.cpp
index 1404f1d401..50db61da55 100644
--- a/clang/lib/Analysis/ProgramPoint.cpp
+++ b/clang/lib/Analysis/ProgramPoint.cpp
@@ -58,7 +58,8 @@ void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const {
Out << "\"kind\": \"";
switch (getKind()) {
case ProgramPoint::BlockEntranceKind:
- Out << "BlockEntrance\"" << ", \"block_id\": "
+ Out << "BlockEntrance\""
+ << ", \"block_id\": "
<< castAs<BlockEntrance>().getBlock()->getBlockID();
break;
diff --git a/clang/lib/Analysis/UnsafeBufferUsage.cpp b/clang/lib/Analysis/UnsafeBufferUsage.cpp
index e31dd0f0f5..e1ff0d92f6 100644
--- a/clang/lib/Analysis/UnsafeBufferUsage.cpp
+++ b/clang/lib/Analysis/UnsafeBufferUsage.cpp
@@ -2052,8 +2052,8 @@ fixUPCAddressofArraySubscriptWithSpan(const UnaryOperator *Node) {
if (!IndexString)
return std::nullopt;
- SS << "&" << (*DreString).str() << ".data()" << "[" << (*IndexString).str()
- << "]";
+ SS << "&" << (*DreString).str() << ".data()"
+ << "[" << (*IndexString).str() << "]";
}
return FixItList{
FixItHint::CreateReplacement(Node->getSourceRange(), SS.str())};
diff --git a/clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp b/clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
index cdba82cee3..05300328c4 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
@@ -1061,7 +1061,8 @@ bool ento::shouldRegisterContainerModeling(const CheckerManager &mgr) {
if (!mgr.getAnalyzerOptions().ShouldAggressivelySimplifyBinaryOperation) {
mgr.getASTContext().getDiagnostics().Report(
diag::err_analyzer_checker_incompatible_analyzer_option)
- << "aggressive-binary-operation-simplification" << "false";
+ << "aggressive-binary-operation-simplification"
+ << "false";
return false;
}
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
index f06ef3500c..06c3f45ceb 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
@@ -226,8 +226,8 @@ public:
else
OS << "call";
OS << " is converted to a pointer of type '" << PointeeType
- << "', which is incompatible with " << "sizeof operand type '"
- << SizeofType << "'";
+ << "', which is incompatible with "
+ << "sizeof operand type '" << SizeofType << "'";
SmallVector<SourceRange, 4> Ranges;
Ranges.push_back(CallRec.AllocCall->getCallee()->getSourceRange());
Ranges.push_back(SFinder.Sizeofs[0]->getSourceRange());
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index 5fe7d6f0db..d4d4b81413 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -820,7 +820,8 @@ PathDiagnosticPieceRef PathDiagnosticBuilder::generateDiagForBinaryOP(
PathDiagnosticLocation Start, End;
if (B->getOpcode() == BO_LAnd) {
- os << "&&" << "' is ";
+ os << "&&"
+ << "' is ";
if (*(Src->succ_begin() + 1) == Dst) {
os << "false";
@@ -834,7 +835,8 @@ PathDiagnosticPieceRef PathDiagnosticBuilder::generateDiagForBinaryOP(
}
} else {
assert(B->getOpcode() == BO_LOr);
- os << "||" << "' is ";
+ os << "||"
+ << "' is ";
if (*(Src->succ_begin() + 1) == Dst) {
os << "false";
diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
index 8f55bb3e0e..80d885d71d 100644
--- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
@@ -600,9 +600,10 @@ void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic &D, Rewriter &R,
int ColumnNumber =
P->getLocation().asLocation().getExpansionColumnNumber();
++NumExtraPieces;
- os << "<tr><td class=\"rowname\">Note:</td><td>" << "<a href=\"#Note"
- << NumExtraPieces << "\">line " << LineNumber << ", column "
- << ColumnNumber << "</a><br />" << P->getString() << "</td></tr>";
+ os << "<tr><td class=\"rowname\">Note:</td><td>"
+ << "<a href=\"#Note" << NumExtraPieces << "\">line " << LineNumber
+ << ", column " << ColumnNumber << "</a><br />" << P->getString()
+ << "</td></tr>";
}
}
diff --git a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
index edbb3b4f22..bd1aeecffc 100644
--- a/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
@@ -495,8 +495,8 @@ void CompoundLiteralRegion::dumpToStream(raw_ostream &os) const {
}
void CXXTempObjectRegion::dumpToStream(raw_ostream &os) const {
- os << "temp_object{" << getValueType() << ", " << "S"
- << Ex->getID(getContext()) << '}';
+ os << "temp_object{" << getValueType() << ", "
+ << "S" << Ex->getID(getContext()) << '}';
}
void CXXLifetimeExtendedObjectRegion::dumpToStream(raw_ostream &os) const {
@@ -505,7 +505,8 @@ void CXXLifetimeExtendedObjectRegion::dumpToStream(raw_ostream &os) const {
os << ID->getName();
else
os << "D" << ExD->getID();
- os << ", " << "S" << Ex->getID(getContext()) << '}';
+ os << ", "
+ << "S" << Ex->getID(getContext()) << '}';
}
void CXXBaseObjectRegion::dumpToStream(raw_ostream &os) const {
``````````
</details>
https://github.com/llvm/llvm-project/pull/82599
More information about the cfe-commits
mailing list