<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91090>91090</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/Sema/SemaExpr.cpp:17213: 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/SemaExpr.cpp:17213:16: style: Expression is always true because 'else if' condition is opposite to previous condition at line 17211. [multiCondition]
Source code is
if (!CheckInferredResultType) {
ConvHints.tryToFixConversion(SrcExpr, SrcType, DstType, *this);
} else if (CheckInferredResultType) {
Second if looks pointless to me. Suggest code rework.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8GSmzAM_Rpx0SwDNgQ4cMgmZdpbp9kfMEZJ3HUwtezs8vcdZ7OzObYXJOSnZ703smI2p5moh_oZ6n2mYjg73096lGWVjW5a-0NQwWhUs7Irk0e9LPpM-hVZrQxyC8UeivtXWzWfQAzWjCCGA13UPXx7X3yulwXktmxEKVPcgNwih9VSShKCmI2b0TAq-6ZWxuAj4UhaRSYE0ZBlQnME0aB282TCHe6WxbEJhMHh4ulqXOQHhApozUyYri5zhPr5Em0wu08A1PtHFQcXvSbUbiI0_HiCiGiOCKIFUe6SCz_mI3lP0y_iaMPLuhCIDqF5_mpA3Ln5-t3MgfPg1xc3mPdUIZ_UgmgPXif1IHZ48PqDY4d7Dp8piG04GwbRgXwghmaPd0fSSP8yz10gJW9Sm3XulXFxZg6WmJN_F8rxEE8n4vBhgac351_zj9Zs6uXUyU5l1JdNWbV1uxFVdu67VspGVW09yW5DtdDVJCRJJTbTRhWdzEwvClEVdVGJUjZFlVdjV9XHRhVat-2mLaEq6KKMza29XnLnT5lhjtR3ZdEVmVUjWb7tqRD3PRMgdunPTfT0JyprwpqK9T7zfSJ5GuOJoSqs4cBftMEES_3_7Cr-_HIo-QJyyKK3_TmE5fYGxABiOJlwjmOu3SXR2utneFq8-006gBhuihjEcBP1NwAA__-AwRiq">