[flang-commits] [flang] [flang][OpenMP][NFC] Hoist variant match-info construction into Semantics (PR #204387)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Tue Jun 23 07:50:36 PDT 2026


================
@@ -2230,4 +2230,101 @@ void ProcessTraitProperties(llvm::omp::VariantMatchInfo &vmi,
   }
 }
 
+UnsupportedSelectorFeature FindUnsupportedSelectorFeature(
+    const parser::traits::OmpContextSelectorSpecification &ctxSel,
+    SemanticsContext &semaCtx) {
+  for (const parser::OmpTraitSetSelector &traitSet : ctxSel.v) {
+    using TSSName = parser::OmpTraitSetSelectorName;
+    auto setName{std::get<TSSName>(traitSet.t).v};
+    if (MapTraitSet(setName) == llvm::omp::TraitSet::target_device)
+      return UnsupportedSelectorFeature::TargetDevice;
+
+    for (const parser::OmpTraitSelector &selector :
+        std::get<std::list<parser::OmpTraitSelector>>(traitSet.t)) {
+      const auto &props{
+          std::get<std::optional<parser::OmpTraitSelector::Properties>>(
+              selector.t)};
+      if (!props)
+        continue;
----------------
kparzysz wrote:

The coding style in the frontend uses braces even for single statements.

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


More information about the flang-commits mailing list