[PATCH] D100041: [flang][OpenMP] Add semantic checks for strict nesting inside `teams` construct.

Arnamoy B via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 28 09:17:46 PDT 2021


arnamoy10 added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:238
+
+  std::visit(Fortran::common::visitors{
+                 [&](const parser::OpenMPBlockConstruct &c) {
----------------
kiranchandramohan wrote:
> This visit will cause an additional traversal of the subtree rooted at the teams node. Visits to these nodes will be happening anyway during the normal traversal with various Enter and Leave functions.
> 
> Would it be possible to do these checks in the following functions? You can add if they don't exist. 
> 
> ```
> void OmpStructureChecker::Enter(const parser::OpenMPBlockConstruct &c)
> void OmpStructureChecker::Enter(const parser::OpenMPLoopConstruct &c)
> ```
> 
> Let me know if there is an issue with this approach.
Makes sense.  Thanks for the suggestion.


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

https://reviews.llvm.org/D100041



More information about the llvm-commits mailing list