summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-12-30 12:06:23 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-12-30 12:06:23 +0000
commit113438cd5cc37fbd0474cb75e55c09beafd6126d (patch)
tree595f2f40523f09b76876a32a9f1a192d5dbdc46c /clang/lib/Sema
parent57286644f7c2010299f1093a95fa60934fc08dd2 (diff)
downloadbcm5719-llvm-113438cd5cc37fbd0474cb75e55c09beafd6126d.tar.gz
bcm5719-llvm-113438cd5cc37fbd0474cb75e55c09beafd6126d.zip
[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
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 5dd835498a9..f66e2181b28 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -1680,6 +1680,13 @@ StmtResult Sema::ActOnOpenMPRegionEnd(StmtResult S,
}
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();
OpenPOWER on IntegriCloud