[flang-commits] [flang] [flang][OpenMP] Add semantic checks for two DECLARE VARIANT restrictions (PR #209528)

via flang-commits flang-commits at lists.llvm.org
Wed Jul 15 04:22:34 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,h -- flang/lib/Semantics/check-omp-structure.h flang/lib/Semantics/check-omp-variant.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-omp-variant.cpp b/flang/lib/Semantics/check-omp-variant.cpp
index 228d439d4..40fdaef57 100644
--- a/flang/lib/Semantics/check-omp-variant.cpp
+++ b/flang/lib/Semantics/check-omp-variant.cpp
@@ -901,7 +901,7 @@ static void CollectConstructSelectorSet(
           constructs.push_back(leaf);
         }
       } else if (const auto *value{std::get_if<TraitName::Value>(&traitName.u)};
-                 value && *value == TraitName::Value::Simd) {
+          value && *value == TraitName::Value::Simd) {
         // In a construct selector, `simd` is represented as Value::Simd (it can
         // carry simd-specific properties), not as a Directive; treat it as
         // OMPD_simd so it participates in the comparison.

``````````

</details>


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


More information about the flang-commits mailing list