<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/85868>85868</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for clarity
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804:47: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
Source code is
for (unsigned i = TSFlags & X86II::EVEX_K ? 2 : 1;
I am guessing that
for (unsigned i = (TSFlags & X86II::EVEX_K) ? 2 : 1;
was intended. Suggest add () for clarity of intention.
Not all of us know all the C precedence rules well.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk0-LpDwQxj9NeSle0cQ_8eChZ3qE4YVloYdlbktMqjU7aZUkbuO3X-I0Ow0Lw8JexLKs-lWeeiK9N8NE1EL5AOUxkWsYZ9dq1fO8SPpZb-0pyGAUyknazZNDtSxqJPWGXm4e-AGyI2S3p7U_L8A6a3pg3Yt0AwVg3auogHUHf_kqnSf3_uV3mKplAX7gIiuAH4oa-AF92CzFl0crnTlvqKRVq5XBzBMujhRpmhTheXYIrAZWAatRTnqPeAesThHKB_Ve_vhRDeXxfuDTvDpFqGZNaPx9BhFv7cU67SJpNAj8iC-nzsrBI7AKX0X1_BxF4Ienb0-v3_9H4B0yjLPnwB_uOz6jvOCwkvdmGjCMMuDfAYGJT5nAmk-wV-nRTIEmTTrF0zoM5ANKHbUSsTRCd6HChvP5_d8oVXob78scUFobc6vHt2m-7mEYCR_vl-FWSx6vZG16z090y3XDG5lQm9d5JgSvM56MrS458aZoyowL6uus5KSE0o3QOpNlfk5MyzJWZDxvWM4E42lVn7msFeWsp6rkDRQZXaSxafRdOrshMd6v1IpSVCKxsifrd2czNtEV9yQwFo3u2ljzX78OHorMGh_8R5dggqX2382MVqq3uOw_lU5WZ9sxhGW_QqwD1g0mjGufqnmn3uBxyMXNP0hF-H4CD6zbT_grAAD__0eMIAk">