<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95670>95670</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/Sema/SemaOpenMP.cpp:24774: Pointless test ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
code-quality
</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:24774: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/eJysk02PmzwQxz_NcLESgQ0xHDhkw3KLEj0898jYk8SNwa5toubbVyS03UOlaqsixOCX-c38xx4Rgr6MiDUUb1A0iZji1fpayZ5ledJb9ai7KKKWRIzCPAJ6Ip2TV5Q3EsQjANtC2kC6fKUR4wVoa3QPtO1wEIs5OBz3x7V0DtiW5pznwLYFB7YlIT4Mzj-dGJDgN-cxBG1HApQ36P5_OASaAWsO--Pu1By2u_8OXXcKdvISgXJyttOoyDCZqJ1BEvWAgeiRyKvQI7HnGQR083w5sQ69iNaHNYHiTU3OaCkivv-MC0XzUVL3jEOkVUh0-LhCiJ7ZZdNtuyjkbQXs_YJxN3mPY2y0Rxn1HYGWQCsCrAHWkMP-2JysV-hRkSWrhTY_i2DyUkx-J3nx-sNWPd4-jdfj7WQHd5KTP-k4l-l1DH-R5L_iPCvH315eiaqZqlglEqwznpU5z4q8Sq41nkupKixTnmaFqliW52WxyYvyvKm44jTRNU1pnm6yIuMZpdWaC15uepnhmTElsgLyFAehzdqY-7C2_pLoECasq2LD08SIHk149gilyx2nQHfzyCpcfZ2E0fExTxZN4usZsuqnS4A8NTrE8AsbdTRYf65PyNHqMRoMgUQMkQBrk8mb-hqje3YgbYG2Fx2vU7-WdpjB5v7DrJy3X1BGoO1TUwDavmTda_o9AAD__6fUNb4">