<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/128210>128210</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp:92: Possible && || mixup ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:codegen,
code-quality
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
A recent build of clang by gcc says:
clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp:92:58: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
Source code is
assert(!Packoffsets || Index < Packoffsets->size() &&
"number of elements in layout struct does not "
"match number of packoffset annotations");
Suggest add ( and ) to make intention clear.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykk8tu6zYQhp9mtBnYkEZSLC20sJ2jtkAWB8iia5IayWwo0uUlifv0BW3nsioKHGIASTPix-HPnyIEvVjmAdoDtI-FSPHk_DApWVdNId10GfboWbGNKJM2E7oZlRF2QXnBRSkM4hKg3kOZ41oBGo2WQOPRTfwbW6Dx96fnp0OaZ_ZP4uJSPGQU-606n6He9wT1vu2g3uOb8FbbJb-GtCwcIp6FZxtPHDig8C7ZCeEHQVdC3wE95Lh_9vim40nbb_XdMcdnHdrD5s9vQGgfb40_u-QVo3ITow63HF6HCIF9BOqAqp9Cvbh5DhwD3tD4h534HaE-4rfiBuofQf_D11k93rv8IP7HACKbVsk-y8yGV7YxoLZorrJhiD6piJPjgNbF_P__xK4iqhN-wc-f3aKw1kURtbMh86iH-nBX5X4EYpoQqEORtaceo8NVvDBqG9nmiagMC7-Fcl9MQz31dS8KHqpdU1Zt3z90xWmQHSnFQqqGq109d4q53U19X8leNvNcFnqgktqSqKp2zUPZbatyx3JuVbNTqqSuhqbkVWizNeZ13Tq_FDqExENFHVVlYYRkE65GJroZsd7nA12yBQnomPNu4s3fSRgdLznZPhZ-yLyNTEuApjQ6xPC1QtTR8PALtsafLgQtDd9d8OGbVb-nM0I9Fsmb4RTj-XqLaAQaFx1PSW6VW_Oa5vXjsTl79xerCDRedx6AxvvmXwf6NwAA___f5CQx">