[flang-commits] [flang] [Flang][OpenMP] Add some semantic checks for Linear clause (PR #111354)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Mon Dec 2 08:35:36 PST 2024


================
@@ -323,6 +323,30 @@ void OmpStructureChecker::CheckMultListItems() {
     CheckMultipleOccurrence(
         listVars, nontempNameList, itr->second->source, "NONTEMPORAL");
   }
+
+  // Linear clause
+  auto linearClauses{FindClauses(llvm::omp::Clause::OMPC_linear)};
+  for (auto itr{linearClauses.first}; itr != linearClauses.second; ++itr) {
+    const auto &linearClause{
+        std::get<parser::OmpClause::Linear>(itr->second->u)};
----------------
kparzysz wrote:

`FindClauses` now returns an iterator range, please use range-for here.

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


More information about the flang-commits mailing list