[flang-commits] [flang] [flang][OpenMP] Add semantic check for device clause (PR #72789)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Sun Nov 19 00:19:42 PST 2023


================
@@ -2748,6 +2748,16 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Device &x) {
   const auto &device{std::get<1>(deviceClause.t)};
   RequiresPositiveParameter(
       llvm::omp::Clause::OMPC_device, device, "device expression");
+  auto modifier = std::get<0>(x.v.t);
----------------
kiranchandramohan wrote:

```suggestion
  std::optional<parser::OmpDeviceClause::DeviceModifier> modifier = std::get<0>(deviceClause.t);
```

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


More information about the flang-commits mailing list