[OPENMP 4.5] Allow 'ordered' clause on 'loop simd' constructs.
OpenMP 4.5 allows to use 'ordered' clause without parameter on 'loop simd' constructs.

llvm-svn: 256639
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 5dd8354..f66e218 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -1680,6 +1680,13 @@
     }
     ErrorFound = true;
   }
+  if (isOpenMPWorksharingDirective(DSAStack->getCurrentDirective()) &&
+      isOpenMPSimdDirective(DSAStack->getCurrentDirective()) && OC &&
+      OC->getNumForLoops()) {
+    Diag(OC->getLocStart(), diag::err_omp_ordered_simd)
+        << getOpenMPDirectiveName(DSAStack->getCurrentDirective());
+    ErrorFound = true;
+  }
   if (ErrorFound) {
     ActOnCapturedRegionError();
     return StmtError();