[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 12:25:17 PDT 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 2162a18fb206736c41c9182737b72ae15d5e6bf0 f25688a5f6242e4e16cad377fa281df665d0e38b --extensions h,cpp,c -- clang/test/SemaOpenACC/loop-construct-collapse-ast.cpp clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp clang/include/clang/AST/OpenACCClause.h clang/include/clang/Sema/SemaOpenACC.h clang/lib/AST/OpenACCClause.cpp clang/lib/AST/StmtProfile.cpp clang/lib/AST/TextNodeDumper.cpp clang/lib/Parse/ParseOpenACC.cpp clang/lib/Sema/SemaOpenACC.cpp clang/lib/Sema/TreeTransform.h clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/test/AST/ast-print-openacc-loop-construct.cpp clang/test/ParserOpenACC/parse-clauses.c clang/test/ParserOpenACC/parse-clauses.cpp clang/test/SemaOpenACC/compute-construct-device_type-clause.c clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c clang/test/SemaOpenACC/loop-construct-device_type-clause.c clang/tools/libclang/CIndex.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/include/clang/Sema/SemaOpenACC.h b/clang/include/clang/Sema/SemaOpenACC.h
index b4d54d9595..839fdb79cd 100644
--- a/clang/include/clang/Sema/SemaOpenACC.h
+++ b/clang/include/clang/Sema/SemaOpenACC.h
@@ -263,7 +263,6 @@ public:
       return std::get<CollapseDetails>(Details).LoopCount;
     }
 
-
     ArrayRef<DeviceTypeArgument> getDeviceTypeArchitectures() const {
       assert((ClauseKind == OpenACCClauseKind::DeviceType ||
               ClauseKind == OpenACCClauseKind::DType) &&
diff --git a/clang/lib/Sema/SemaOpenACC.cpp b/clang/lib/Sema/SemaOpenACC.cpp
index 6a4054b53f..18d02402ef 100644
--- a/clang/lib/Sema/SemaOpenACC.cpp
+++ b/clang/lib/Sema/SemaOpenACC.cpp
@@ -1064,9 +1064,9 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitCollapseClause(
   if (!LoopCount.isUsable())
     return nullptr;
 
-  return OpenACCCollapseClause::Create(
-      Ctx, Clause.getBeginLoc(), Clause.getLParenLoc(),
-      Clause.isForce(), LoopCount.get(), Clause.getEndLoc());
+  return OpenACCCollapseClause::Create(Ctx, Clause.getBeginLoc(),
+                                       Clause.getLParenLoc(), Clause.isForce(),
+                                       LoopCount.get(), Clause.getEndLoc());
 }
 
 } // namespace

``````````

</details>


https://github.com/llvm/llvm-project/pull/109461


More information about the cfe-commits mailing list