[flang-commits] [flang] [Flang][Semantics] Add a semantic check for simd construct (PR #109089)

via flang-commits flang-commits at lists.llvm.org
Tue Sep 17 23:22:26 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 4d18ce1dd2640829c3ad9cbb31e6ff92e2e29438 ec8fcc6711b2db468657d91d5dfeba985c308beb --extensions cpp -- flang/lib/Semantics/check-omp-structure.cpp
``````````

</details>

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

``````````diff
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index eac856f56f..dec90e7d70 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -2158,11 +2158,11 @@ void OmpStructureChecker::Leave(const parser::OmpClauseList &) {
     }
 
     // 2.11.5 Simd construct restriction (OpenMP 5.1)
-    if ( auto *clause{FindClause(llvm::omp::Clause::OMPC_safelen)} ) {
-      if ( FindClause(llvm::omp::Clause::OMPC_order) ) {
+    if (auto *clause{FindClause(llvm::omp::Clause::OMPC_safelen)}) {
+      if (FindClause(llvm::omp::Clause::OMPC_order)) {
         context_.Say(clause->source,
-          "The `SAFELEN` clause cannot appear in the `SIMD` directive "
-          "with `ORDER(CONCURRENT)` clause"_err_en_US);
+            "The `SAFELEN` clause cannot appear in the `SIMD` directive "
+            "with `ORDER(CONCURRENT)` clause"_err_en_US);
       }
     }
 

``````````

</details>


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


More information about the flang-commits mailing list