<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/79967>79967</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/Sema/SemaOpenMP.cpp:24351: pointless test ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</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:24351: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) {
There is just a chance some other identifier was intended. On the other hand, if it
is simple duplication, it can be removed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk02PuzYQxj-NuYwWEZvXA4ds-Oe2yqrsPTL2JHhjbGQPafPtK5Jsu4dK1VZFCCN5_PM8M_PIGM3ZIbaseGVFl8iFRh9arQaxyZPB61vbkySjQDppbxEDqHlWI6oLRHmLTGxZ1rHs-VVWujPje2sGxvc9TvK5HGZ0b--pmmcmtjwXxYaJbVExsYVIN4vrTy8nBPxjDhij8Q4YrzqcP24zMr5hoju8ve-O3WG7--3Q98fol6CQ8QpOfnEapsWSmS0CmQkjGAdqlMaBP60gxsv7W4GfMUjyIabAile9zNYoSfjrr3tZ0X2X1N_vAeU1gonfdwDMyq67ftuTVJcXJn6dkXZLCOioMwEVmSsyXjPeABMdEx0c3t67ow8aA2p4ZvWkrc9TMDwUwz9Jfp76l1DjLj_GG3c5-mk-qiUcDa1lerThPyT5f3Hulatev5f9Y8SwtgI-l0gg1zY7hRD9hOBpxABGoyNzMhjgd7mOAqHTqFM4OKDxK2qUTjO-W5to6IE2EaKZ1iH6mot1HtYYAiUdDAgBJ39FnT4OJLoVuhGNTLDdVFlZZqIuq2Rs85MuqxrzIVdlI4ZTo4uq5kOtywa5KDAxLc94nm1EltWiyqu0EI2sBZZKDmXWVCeWZzhJY1Nrr1PqwzkxMS7YVk1TVomVA9p4dy3nT9fx1cChXeNfhuUcWZ5ZEyn-TSBDFtufmRRmbxxZjBEIIwET-2QJth2J5rv9-Z7x_dnQuAyp8tMKttev5WUO_hMVMb6_px8Z398V_BkAAP__MF9gsg">