[PATCH] D92732: [Flang][OpenMP 4.5] Add semantic check for OpenMP Do Loop Constructs

Yashaswini Hegde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 14 08:52:07 PST 2021


yhegde marked 4 inline comments as done.
yhegde added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:246-248
+      const auto it{block.begin()};
+      loop = it != block.end() ? parser::Unwrap<parser::DoConstruct>(*it)
+                               : nullptr;
----------------
kiranchandramohan wrote:
> Is something missing here?
> If "it" is block.begin() in the previous patch, how can it ever be block.end in this line unless the block is empty?
> 
> If nothing is missing, add a comment.
> Is something missing here?
> If "it" is block.begin() in the previous patch, how can it ever be block.end in this line unless the block is empty?
> 
I think If the block is empty then Fortran::parser::ExecutableConstruct has "no contained value".   If block is not empty then DoConstruct, if exists in ExecutableConstruct, is fetched. Please let me know otherwise.

> If nothing is missing, add a comment.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92732



More information about the llvm-commits mailing list