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

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 13:52:03 PDT 2023


clementval 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) {
----------------
abidmalikwaterloo wrote:
> tschuett wrote:
> > Do you need to check whether `u` is `std::nullopt` first before you do `*u`?
> If it is std::nullopt, I do not think it is a semantic error. It will be a bug then.  You initiate it when you see something in the clause. It can't be null.  This is my understanding. 
So you should use `evaluate::ToInt64` directly. 


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