[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

Sandeep via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 13 22:21:51 PDT 2022


sandeepkosuri added inline comments.


================
Comment at: clang/include/clang/Sema/Scope.h:483-488
+  /// Determine whether this scope is some OpenMP directive with
+  /// order clause which specifies concurrent scope.
+  bool isOpenMPOrderClauseScope() const{
+    return getFlags() & Scope::OpenMPOrderClauseScope;
+  }
+
----------------
ABataev wrote:
> Why do wee need new scope?
I needed a new scope flag to keep track of all the new scopes created inside a region which has an associated order clause. Then I proceeded to mark all those nested scopes within 'order clause' region with this flag. I needed to do this to implement this restriction (OpenMP 5.1 - 2.11.3):
```
A region that corresponds to a construct with an order clause that specifies concurrent may not contain calls to the OpenMP Runtime API.
```
Changes in this file, in SemaOpenMP.cpp ( in Sema::ActOnOpenMPCall() ) and in Scope.cpp together form the implementation of the above restriction.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127855



More information about the cfe-commits mailing list