<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56773>56773</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`misc-const-correctness` not reported for variable storing non-const pointer result
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
firewave
</td>
</tr>
</table>
<pre>
```cpp
class C
{
};
C* cb();
void f()
{
C* c = cb();
if (c) {
}
}
```
https://godbolt.org/z/rvPPcE3ja
In turn the missing `const` on the pointer is detected with `WarnPointersAsValues`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlUk2TnCAQ_TV4odZC8GM8cJjd2a3KbU7JGRGULQYsQKeSX59GM5vsxsKmu5_93hMd_PiTo5YcSy4LIhdEztKKGPHLUaDu-ZFcEHvke3xB9IzlgOgJ0f4LtnkzYv0H-kyE4TpGMWKX_wkybjSGroQ2_jSXTXy4OZKH_aOcU1oiYmdE32BNfhy8TaUPE1S_4A7b9Spf2bv41-w3h9MaIMwK30yMxk04H4h3McGO_QEt3rikAjYRjyopmdSI7ybN-dkfIrjrgcdz_C7sqiK0y0Lxqm16QipGaDFyNvasF0Uyyap89CAnn3YhiCEAqVMxT2LnEw5q8SHLaB_wJoIRg1U4Jh-yRefdMfrhLKi42lSswfIvBwE216GU_gaFtdtje1qCfwdRKOG9s2f61rRdx4qZs4rJWhNKNG1r2YqTZqLqKlq3bT80pCmsGJSNHDXPiFKn7ningBw1l8JwSiglHT2Rvq7qqqRa11UHFOMwVlS0qCbqJowts4_8hYrAd0vDOkUArYkp_gXhlzSTU2qXA36xptkHrk1Qd7GpYtfmu_ffG0DV9A">