[flang-commits] [flang] [flang][OpenMP] Add semantic check for declare target (PR #71425)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 10:42:48 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 65fedb43942690644869baa1e27a78a516f3f29e 975296755451b064df79b75202b1262189fd5a25 -- flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/check-omp-structure.h
``````````

</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 85265c768891..f799015fb836 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -1184,18 +1184,19 @@ void OmpStructureChecker::Enter(const parser::OmpDeclareTargetWithList &x) {
           symbol->name());
       genericDetails->specific();
     }
-    if(IsProcedurePointer(*symbol)) {
+    if (IsProcedurePointer(*symbol)) {
       context_.Say(source,
           "The procedure '%s' in DECLARE TARGET construct cannot be a procedure pointer"_err_en_US,
           symbol->name());
     }
-    const SubprogramDetails *entryDetails = symbol->detailsIf<SubprogramDetails>();
-    if(entryDetails && entryDetails->entryScope()) {
+    const SubprogramDetails *entryDetails =
+        symbol->detailsIf<SubprogramDetails>();
+    if (entryDetails && entryDetails->entryScope()) {
       context_.Say(source,
           "The procedure '%s' in DECLARE TARGET construct cannot be an entry name"_err_en_US,
           symbol->name());
     }
-    if(IsStmtFunction(*symbol)) {
+    if (IsStmtFunction(*symbol)) {
       context_.Say(source,
           "The procedure '%s' in DECLARE TARGET construct cannot be a statement function"_err_en_US,
           symbol->name());

``````````

</details>


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


More information about the flang-commits mailing list