Skip to content

Commit 5cf8cf3

Browse files
authored
[clang][OpenMP] Fix directive in ActOnOpenMPTargetParallelForSimdDire… (llvm#85217)
…ctive The function `ActOnOpenMPTargetParallelForSimdDirective` gets the number of capture levels for OMPD_target_parallel_for, whereas the intended directive is OMPD_target_parallel_for_simd.
1 parent f795d1a commit 5cf8cf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14366,7 +14366,8 @@ StmtResult Sema::ActOnOpenMPTargetParallelForSimdDirective(
1436614366
// The point of exit cannot be a branch out of the structured block.
1436714367
// longjmp() and throw() must not violate the entry/exit criteria.
1436814368
CS->getCapturedDecl()->setNothrow();
14369-
for (int ThisCaptureLevel = getOpenMPCaptureLevels(OMPD_target_parallel_for);
14369+
for (int ThisCaptureLevel =
14370+
getOpenMPCaptureLevels(OMPD_target_parallel_for_simd);
1437014371
ThisCaptureLevel > 1; --ThisCaptureLevel) {
1437114372
CS = cast<CapturedStmt>(CS->getCapturedStmt());
1437214373
// 1.2.2 OpenMP Language Terminology

0 commit comments

Comments
 (0)