This patch gives basic parsing and semantic support for "modifiers" of order clause introduced in OpenMP 5.1 ( section 2.11.3 )
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.
Do you have the test for this error message?
I think you can drop call of StringRef constructor here, just omp_