[flang-commits] [flang] [Flang][Semantics] Allow EVENT_TYPE, LOCK_TYPE and NOTIFY TYPE to be deallocate (PR #192940)

via flang-commits flang-commits at lists.llvm.org
Mon Apr 20 04:10:02 PDT 2026


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 cpp -- flang/lib/Semantics/check-deallocate.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/flang/lib/Semantics/check-deallocate.cpp b/flang/lib/Semantics/check-deallocate.cpp
index 6ba4571d8..ee14e966b 100644
--- a/flang/lib/Semantics/check-deallocate.cpp
+++ b/flang/lib/Semantics/check-deallocate.cpp
@@ -82,9 +82,11 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
                         "Name in DEALLOCATE statement is not definable"_err_en_US)
                     .Attach(std::move(
                         whyNot->set_severity(parser::Severity::Because)));
-              } else if (auto whyNot{
-                             WhyNotDefinable(source, context_.FindScope(source),
-                                 DefinabilityFlags{DefinabilityFlag::AllowEventLockOrNotifyType}, *symbol)}) {
+              } else if (auto whyNot{WhyNotDefinable(source,
+                             context_.FindScope(source),
+                             DefinabilityFlags{
+                                 DefinabilityFlag::AllowEventLockOrNotifyType},
+                             *symbol)}) {
                 // Catch problems with non-definability of the dynamic object
                 context_
                     .Say(source,
@@ -119,7 +121,9 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
                       .Attach(std::move(
                           whyNot->set_severity(parser::Severity::Because)));
                 } else if (auto whyNot{WhyNotDefinable(source,
-                               context_.FindScope(source), DefinabilityFlags{DefinabilityFlag::AllowEventLockOrNotifyType},
+                               context_.FindScope(source),
+                               DefinabilityFlags{DefinabilityFlag::
+                                       AllowEventLockOrNotifyType},
                                *expr)}) {
                   context_
                       .Say(source,

``````````

</details>


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


More information about the flang-commits mailing list