Skip to content

Commit 26b7070

Browse files
xguptaShivam Gupta
andauthored
[Clang] Remove some dead code in getNumTeamsExprForTargetDirective (#95695)
This was reported in https://pvs-studio.com/en/blog/posts/cpp/1126/, fragment N9. V523 The 'then' statement is equivalent to the subsequent code fragment. CGOpenMPRuntime.cpp:6040, 6036 --------- Co-authored-by: Shivam Gupta <[email protected]>
1 parent 1b7631a commit 26b7070

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6047,11 +6047,6 @@ const Expr *CGOpenMPRuntime::getNumTeamsExprForTargetDirective(
60476047
MinTeamsVal = MaxTeamsVal = 0;
60486048
return nullptr;
60496049
}
6050-
if (isOpenMPParallelDirective(NestedDir->getDirectiveKind()) ||
6051-
isOpenMPSimdDirective(NestedDir->getDirectiveKind())) {
6052-
MinTeamsVal = MaxTeamsVal = 1;
6053-
return nullptr;
6054-
}
60556050
MinTeamsVal = MaxTeamsVal = 1;
60566051
return nullptr;
60576052
}

0 commit comments

Comments
 (0)