@@ -6838,13 +6838,24 @@ StmtResult Sema::ActOnOpenMPDistributeParallelForSimdDirective(
6838
6838
// The point of exit cannot be a branch out of the structured block.
6839
6839
// longjmp() and throw() must not violate the entry/exit criteria.
6840
6840
CS->getCapturedDecl()->setNothrow();
6841
+ for (int ThisCaptureLevel =
6842
+ getOpenMPCaptureLevels(OMPD_distribute_parallel_for_simd);
6843
+ ThisCaptureLevel > 1; --ThisCaptureLevel) {
6844
+ CS = cast<CapturedStmt>(CS->getCapturedStmt());
6845
+ // 1.2.2 OpenMP Language Terminology
6846
+ // Structured block - An executable statement with a single entry at the
6847
+ // top and a single exit at the bottom.
6848
+ // The point of exit cannot be a branch out of the structured block.
6849
+ // longjmp() and throw() must not violate the entry/exit criteria.
6850
+ CS->getCapturedDecl()->setNothrow();
6851
+ }
6841
6852
6842
6853
OMPLoopDirective::HelperExprs B;
6843
6854
// In presence of clause 'collapse' with number of loops, it will
6844
6855
// define the nested loops number.
6845
6856
unsigned NestedLoopCount = CheckOpenMPLoop(
6846
6857
OMPD_distribute_parallel_for_simd, getCollapseNumberExpr(Clauses),
6847
- nullptr /*ordered not a clause on distribute*/, AStmt , *this, *DSAStack,
6858
+ nullptr /*ordered not a clause on distribute*/, CS , *this, *DSAStack,
6848
6859
VarsWithImplicitDSA, B);
6849
6860
if (NestedLoopCount == 0)
6850
6861
return StmtError();
@@ -7793,14 +7804,14 @@ static OpenMPDirectiveKind getOpenMPCaptureRegionForClause(
7793
7804
CaptureRegion = OMPD_teams;
7794
7805
break;
7795
7806
case OMPD_distribute_parallel_for:
7807
+ case OMPD_distribute_parallel_for_simd:
7796
7808
CaptureRegion = OMPD_parallel;
7797
7809
break;
7798
7810
case OMPD_parallel_for:
7799
7811
case OMPD_parallel_for_simd:
7800
7812
case OMPD_target_teams_distribute_parallel_for:
7801
7813
case OMPD_target_teams_distribute_parallel_for_simd:
7802
7814
case OMPD_teams_distribute_parallel_for_simd:
7803
- case OMPD_distribute_parallel_for_simd:
7804
7815
// Do not capture schedule clause expressions.
7805
7816
break;
7806
7817
case OMPD_task:
0 commit comments