<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69577>69577</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`performance-unnecessary-value-param` not detected for `std::string` when accessed via index operator
</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
#include <string>
void f(std::string type)
{
const char Type = type[0];
}
```
https://godbolt.org/z/ae3efnTvs
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUVGO4yAMPY3zg1oRmITwwUe73ZxgLkDAaVhRiICk2z39KklHI42EwMjPz_Z7Omd3D4gKmis0t0ovZYpJjS7hU69YDdG-FLT0OGaegd6AXoBxF4xfLBLgv3JJLtyB_34n93uNzpIRWJeLBX4BfjlgpLxmBCbfWHE9AkIIMTHkQsykE_l8zRv17UA3VwrNDfj1q-j2Dr4GO75TKXPeerEeWH-Pdoi-nGO6A-v_Aes1chzD55orq7iVXOoKVd1KIWhXC1lNaqiZkEjbmgtpugapYSN2XSu6gdZc2sopRhmvaS2p5G0tzw2ibBotBiN1ywyHD4oP7fzZ-_Wx9a5czguqVjZCVF4P6PMuNmMBn2RPAmOb9kltNadhuWf4oN7lkr9ZiiseNydmTGNMDx0MnpYQ0GDOOr1Oq_YLnmad9ANaSkIsxGJBU9CSMSYCLf3hxAZ7ThiINhsJWrI6TVyw-JfEGZMuMVVL8uqHrq5My3A28QGs3-Z7P6c5xT9oCrB-3yoD6_et_wcAAP__Sgi7iw">