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_final_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 9cfedf992..8eaa8aa27 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -15038,10 +15038,10 @@ static Expr *makeFloorIVRef(Sema &SemaRef, 
ArrayRef<VarDecl *> FloorIndVars,
 /// if there are no finalization statements.
 /// Note: Loops with non-arithmetic loop variables (e.g., iterators) are 
skipped
 /// because finalization only applies to integer/floating-point counters.
-static Stmt *buildLoopFinalization(
-    ASTContext &Context,
-    ArrayRef<OMPLoopBasedDirective::HelperExprs> LoopHelpers,
-    ArrayRef<Stmt *> LoopStmts) {
+static Stmt *
+buildLoopFinalization(ASTContext &Context,
+                      ArrayRef<OMPLoopBasedDirective::HelperExprs> LoopHelpers,
+                      ArrayRef<Stmt *> LoopStmts) {
   assert(LoopHelpers.size() == LoopStmts.size() &&
          "LoopHelpers and LoopStmts must have the same size");
   SmallVector<Stmt *, 8> FinalizationStmts;
@@ -15055,8 +15055,10 @@ static Stmt *buildLoopFinalization(
     if (auto *For = dyn_cast<ForStmt>(LoopStmt)) {
       if (auto *InitDeclStmt = dyn_cast_or_null<DeclStmt>(For->getInit())) {
         if (InitDeclStmt->isSingleDecl()) {
-          if (auto *InitVar = 
dyn_cast<VarDecl>(InitDeclStmt->getSingleDecl())) {
-            // Skip finalization if loop variable is not arithmetic (e.g., 
iterator).
+          if (auto *InitVar =
+                  dyn_cast<VarDecl>(InitDeclStmt->getSingleDecl())) {
+            // Skip finalization if loop variable is not arithmetic (e.g.,
+            // iterator).
             if (!InitVar->getType()->isArithmeticType())
               continue;
           }
@@ -15344,10 +15346,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/212853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to