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 h,cpp,c -- 
clang/test/OpenMP/loop_transform_iv.c clang/include/clang/AST/StmtOpenMP.h 
clang/lib/AST/StmtOpenMP.cpp clang/lib/CodeGen/CGStmtOpenMP.cpp 
clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/fuse_codegen.cpp 
clang/test/OpenMP/interchange_codegen.cpp clang/test/OpenMP/reverse_codegen.cpp 
clang/test/OpenMP/stripe_codegen.cpp clang/test/OpenMP/tile_codegen.cpp 
--diff_from_common_commit
``````````

: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/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index d5dda5f33..12f10c806 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -9975,7 +9975,8 @@ static Stmt *buildPreInits(ASTContext &Context, 
ArrayRef<Stmt *> PreInits) {
 }
 
 /// Helper to determine if a loop should skip finalization.
-/// Returns true for range-based for loops or loops with non-arithmetic 
counters.
+/// Returns true for range-based for loops or loops with non-arithmetic
+/// counters.
 static bool shouldSkipLoopFinalization(Stmt *LoopStmt) {
   if (isa<CXXForRangeStmt>(LoopStmt))
     return true;
@@ -10698,8 +10699,8 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr 
*CollapseLoopCountExpr,
       // exit value. For iterator-based loops (range-based for or explicit
       // iterator loops), skip finalization entirely.
       ExprResult Final;
-      bool IsIteratorLoop = IS.IsRangeFor ||
-                            !IS.CounterVar->getType()->isArithmeticType();
+      bool IsIteratorLoop =
+          IS.IsRangeFor || !IS.CounterVar->getType()->isArithmeticType();
       if (IsIteratorLoop && isOpenMPLoopTransformationDirective(DKind)) {
         // Iterator-based loops in transformation directives don't need
         // explicit finalization - the iterator is already at the end.
@@ -10714,9 +10715,10 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr 
*CollapseLoopCountExpr,
             FinalIterCount = LastIter.get();
           }
         }
-        Final = buildCounterUpdate(SemaRef, CurScope, UpdLoc, CounterVar,
-                                    IS.CounterInit, FinalIterCount, 
IS.CounterStep,
-                                    IS.Subtract, IS.IsNonRectangularLB, 
&Captures);
+        Final =
+            buildCounterUpdate(SemaRef, CurScope, UpdLoc, CounterVar,
+                               IS.CounterInit, FinalIterCount, IS.CounterStep,
+                               IS.Subtract, IS.IsNonRectangularLB, &Captures);
         if (!Final.isUsable()) {
           HasErrors = true;
           break;
@@ -15377,11 +15379,10 @@ StmtResult 
SemaOpenMP::ActOnOpenMPTileDirective(ArrayRef<OMPClause *> Clauses,
                 LoopHelper.Init->getBeginLoc(), LoopHelper.Inc->getEndLoc());
   }
 
-  return OMPTileDirective::Create(Context, StartLoc, EndLoc, Clauses, NumLoops,
-                                  AStmt, Inner,
-                                  buildPreInits(Context, PreInits),
-                                  buildLoopFinalization(Context, LoopHelpers,
-                                                        LoopStmts));
+  return OMPTileDirective::Create(
+      Context, StartLoc, EndLoc, Clauses, NumLoops, AStmt, Inner,
+      buildPreInits(Context, PreInits),
+      buildLoopFinalization(Context, LoopHelpers, LoopStmts));
 }
 
 StmtResult SemaOpenMP::ActOnOpenMPStripeDirective(ArrayRef<OMPClause *> 
Clauses,

``````````

</details>


https://github.com/llvm/llvm-project/pull/214717
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to