Skip to content

Commit a4d1673

Browse files
xguptayuxuanchen1997
authored andcommitted
[Clang] Remove some dead code in getNumTeamsExprForTargetDirective (#95695)
Summary: 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]> Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250549
1 parent 153c01f commit a4d1673

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)