<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/101041>101041</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang/lib/Sema/SemaOpenMP.cpp:23090: Pointless test ?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            code-quality,
            clang:openmp
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dcb314
      </td>
    </tr>
</table>

<pre>
    Static analyser cppcheck says:

clang/lib/Sema/SemaOpenMP.cpp:23090:57: style: Same expression 'DepType!=OMPC_DOACROSS_source' found multiple times in chain of '&&' operators. [duplicateExpression]

Source code is

  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) {

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk0GPozoMxz-NuUStggOTcuDQKdPbqNXj3asQ3DavgeQloXr99k902N05rLSa1SKEkcE_--_YKkZzGYlqKF-hbDI1pasLda87kRdZ5_pH3SaVjGZqVPYRKTDtvb6SvrGoHhHEFngDfHlqq8YL4N6aDnDf0qAWc_A0vh_X2nsQWxS84iC2pQSxZTE9LM0vrRqI0X8-UIzGjQxQNuT_fngCzEE0h_fj7tQctru_Dm17im4KmgAlO7tp7Nkw2WS8JZbMQJGZkemrMiNz5xkE-PK8JXOegkouxDWD8rWfvDVaJXr7nhfK5rOk9pmHadcTM_HzF8bMzN407bZNSt9WIN4ulHZTCDSmxgTSydwJcANYMRANiIYd3o_NyYWeAvVsqWqhzdcimH0oZj-TvET94lcz3r6MN-Pt5AZ_0lM4mTS36eMYfqPIP8V5dk6-fkRlfS36SlQqozqXiChFhZhda8U31J9FmedlV6oup7NWgniuN3lfFVJlpkaOBZdY5RJLxHVRvUiJBe-k5FxiBwWnQRm7tvY-rF24ZCbGieqc57zIM6s6svG5JIjzKKz-nZQ16QGIgLvZ-Zx8sXWexsHP7rLJQj3jVt10iVBwa2KKPxIkkyzVX9sYdnRmTJZiZIliYiD22RRsfU3JP3cR94D7i0nXqVtrN8xge_9mVj64f0gnwP1TXQTcLwLvNf4fAAD__zbUOTI">