[flang-commits] [flang] [flang] Add notify-type and notify-wait-stmt (PR #76594)

via flang-commits flang-commits at lists.llvm.org
Fri Dec 29 17:36:37 PST 2023


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 058e527434aeb61ee6f72d2d460123440726a7df bea15b2c808d4c2a76012a7c564ae3d13e27b5cd -- flang/examples/FeatureList/FeatureList.cpp flang/include/flang/Evaluate/tools.h flang/include/flang/Lower/PFTBuilder.h flang/include/flang/Lower/Runtime.h flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/lib/Evaluate/tools.cpp flang/lib/Lower/Bridge.cpp flang/lib/Lower/Runtime.cpp flang/lib/Parser/executable-parsers.cpp flang/lib/Parser/unparse.cpp flang/lib/Semantics/check-coarray.cpp flang/lib/Semantics/check-coarray.h
``````````

</details>

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

``````````diff
diff --git a/flang/lib/Semantics/check-coarray.cpp b/flang/lib/Semantics/check-coarray.cpp
index e5c4771ab6..106af7960f 100644
--- a/flang/lib/Semantics/check-coarray.cpp
+++ b/flang/lib/Semantics/check-coarray.cpp
@@ -228,10 +228,13 @@ void CoarrayChecker::Leave(const parser::NotifyWaitStmt &x) {
     if (ExtractCoarrayRef(expr)) {
       context_.Say(parser::FindSourceLocation(notifyVar), // F2023 - C1178
           "A notify-variable in a NOTIFY WAIT statement may not be a coindexed object"_err_en_US);
-    } else if (!IsNotifyType(evaluate::GetDerivedTypeSpec(expr->GetType()))) { // F2023 - C1177
-       context_.Say(parser::FindSourceLocation(notifyVar), "The notify-variable must be of type NOTIFY_TYPE from module ISO_FORTRAN_ENV"_err_en_US);
+    } else if (!IsNotifyType(evaluate::GetDerivedTypeSpec(
+                   expr->GetType()))) { // F2023 - C1177
+      context_.Say(parser::FindSourceLocation(notifyVar),
+          "The notify-variable must be of type NOTIFY_TYPE from module ISO_FORTRAN_ENV"_err_en_US);
     } else if (!evaluate::IsCoarray(*expr)) { // F2023 - C1612
-       context_.Say(parser::FindSourceLocation(notifyVar), "The notify-variable must be a coarray"_err_en_US);
+      context_.Say(parser::FindSourceLocation(notifyVar),
+          "The notify-variable must be a coarray"_err_en_US);
     }
   }
 

``````````

</details>


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


More information about the flang-commits mailing list