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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to