[PATCH] D142796: Flang semantic check support for tile and unroll OpenMP Directive.

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 11:55:43 PDT 2023


tschuett added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:659
+      for (const auto &s : sizeClause->v) {
+         const std::optional<std::int64_t> u = GetIntValue(s);
+        if (*u < 0) {
----------------
Do you need to check whether `u` is `std::nullopt` first before you do `*u`?


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:679
+            std::get_if<parser::OmpClause::Partial>(&clause.u)}) {
+      const std::optional<std::int64_t> u = GetIntValue(sizeClause->v);
+      if (*u < 1) {
----------------
Same here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142796



More information about the llvm-commits mailing list