[flang-commits] [flang] [Flang][OpenMP] : Compilation error involving Cray pointers and data sharing attributes (PR #82481)

via flang-commits flang-commits at lists.llvm.org
Sun Mar 24 23:01:33 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 373e77b4c0ad9b0bf370f0e5a32a4100a5459d82 73fcef745d622c61ff88da762492fa545e11313d -- flang/lib/Semantics/resolve-directives.cpp
``````````

</details>

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

``````````diff
diff --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp
index 878f856357..1228f61f66 100644
--- a/flang/lib/Semantics/resolve-directives.cpp
+++ b/flang/lib/Semantics/resolve-directives.cpp
@@ -2005,15 +2005,15 @@ void OmpAttributeVisitor::Post(const parser::Name &name) {
           if (symbol->test(Symbol::Flag::CrayPointee)) {
             return;
           } else if (GetContext().defaultDSA == Symbol::Flag::OmpNone &&
-            !symbol->test(Symbol::Flag::OmpThreadprivate) &&
-            // Exclude indices of sequential loops that are privatised in
-            // the scope of the parallel region, and not in this scope.
-            // TODO: check whether this should be caught in IsObjectWithDSA
-            !symbol->test(Symbol::Flag::OmpPrivate)) {
-          context_.Say(name.source,
-              "The DEFAULT(NONE) clause requires that '%s' must be listed in "
-              "a data-sharing attribute clause"_err_en_US,
-              symbol->name());
+              !symbol->test(Symbol::Flag::OmpThreadprivate) &&
+              // Exclude indices of sequential loops that are privatised in
+              // the scope of the parallel region, and not in this scope.
+              // TODO: check whether this should be caught in IsObjectWithDSA
+              !symbol->test(Symbol::Flag::OmpPrivate)) {
+            context_.Say(name.source,
+                "The DEFAULT(NONE) clause requires that '%s' must be listed in "
+                "a data-sharing attribute clause"_err_en_US,
+                symbol->name());
           }
         }
       }

``````````

</details>


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


More information about the flang-commits mailing list