[flang-commits] [flang] [flang][openmp] Support importing module declare target globals (PR #213930)

via flang-commits flang-commits at lists.llvm.org
Sat Aug 8 10:15:32 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 h,cpp -- flang/include/flang/Lower/OpenMP.h flang/lib/Lower/OpenMP/OpenMP.cpp flang/lib/Semantics/symbol.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/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index fecf39a88..54af9ca46 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -7210,7 +7210,8 @@ void Fortran::lower::attachOpenMPDeclareTargetAttributes(
             else
               clause = mlir::omp::DeclareTargetCaptureClause::enter;
 
-            declareTargetOp.setDeclareTarget(deviceType, clause, /*automap=*/false);
+            declareTargetOp.setDeclareTarget(deviceType, clause,
+                                             /*automap=*/false);
           }
         },
         ultimateSymbol.details());

``````````

</details>


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


More information about the flang-commits mailing list