[clang][OpenMP] Fix directive in ActOnOpenMPTargetParallelForSimdDire… (#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.
This commit is contained in:
Krzysztof Parzyszek 2024-03-14 12:28:39 -05:00 committed by GitHub
parent f795d1a8b1
commit 5cf8cf3ac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14366,7 +14366,8 @@ StmtResult Sema::ActOnOpenMPTargetParallelForSimdDirective(
// The point of exit cannot be a branch out of the structured block.
// longjmp() and throw() must not violate the entry/exit criteria.
CS->getCapturedDecl()->setNothrow();
for (int ThisCaptureLevel = getOpenMPCaptureLevels(OMPD_target_parallel_for);
for (int ThisCaptureLevel =
getOpenMPCaptureLevels(OMPD_target_parallel_for_simd);
ThisCaptureLevel > 1; --ThisCaptureLevel) {
CS = cast<CapturedStmt>(CS->getCapturedStmt());
// 1.2.2 OpenMP Language Terminology