[PATCH] D89546: [Flang][OpenMP 4.5] Add semantic check for OpenMP schedule clause

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 11:29:34 PDT 2020


sameeranjoshi added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:607-617
+      if (const auto &chunkExpr{
+              std::get<std::optional<parser::ScalarIntExpr>>(x.t)}) {
+        if (const auto chunkValue{GetIntValue(chunkExpr)}) {
+          if (*chunkValue <= 0) {
+            context_.Say(GetContext().clauseSource,
+                "The chunk size of the schedule clause must be a"
+                " positive integer."_err_en_US,
----------------
Can't this be replaced with `RequiresPositiveParameter` from `check-directive-structure.h` ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89546/new/

https://reviews.llvm.org/D89546



More information about the llvm-commits mailing list