Skip to content

[Clang][Sema] Remove duplicate check in if-condition #101070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

DeinAlptraum
Copy link
Contributor

Resolves #101041

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:openmp OpenMP related changes to Clang labels Jul 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 29, 2024

@llvm/pr-subscribers-clang

Author: Jannick Kremer (DeinAlptraum)

Changes

Resolves #101041


Full diff: https://github.com/llvm/llvm-project/pull/101070.diff

1 Files Affected:

  • (modified) clang/lib/Sema/SemaOpenMP.cpp (+1-2)
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 9c80b3eec914c..1d378e6b830ae 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -23087,8 +23087,7 @@ OMPClause *SemaOpenMP::ActOnOpenMPDoacrossClause(
   if (DSAStack->getCurrentDirective() == OMPD_ordered &&
       DepType != OMPC_DOACROSS_source && DepType != OMPC_DOACROSS_sink &&
       DepType != OMPC_DOACROSS_sink_omp_cur_iteration &&
-      DepType != OMPC_DOACROSS_source_omp_cur_iteration &&
-      DepType != OMPC_DOACROSS_source) {
+      DepType != OMPC_DOACROSS_source_omp_cur_iteration) {
     Diag(DepLoc, diag::err_omp_unexpected_clause_value)
         << "'source' or 'sink'" << getOpenMPClauseName(OMPC_doacross);
     return nullptr;

@DeinAlptraum
Copy link
Contributor Author

@zyn0217 I hope you're the right person to ask for a review here?

Copy link
Contributor

@zyn0217 zyn0217 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
(However I'm not an OpenMP maintainer, but since this PR is clearly an NFC change, I'd boldly approve it.)

@zyn0217
Copy link
Contributor

zyn0217 commented Jul 30, 2024

(I presume you don't have commit access, so I'll help you merge it. Next time, please add an "NFC" term to the commit title if the PR doesn't contain any functional changes.)

@zyn0217 zyn0217 merged commit c9cc6c4 into llvm:main Jul 30, 2024
11 checks passed
@DeinAlptraum DeinAlptraum deleted the i101041 branch July 30, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:openmp OpenMP related changes to Clang clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang/lib/Sema/SemaOpenMP.cpp:23090: Pointless test ?
3 participants