<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/106374>106374</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
unify detection of object mutation in clang-tidy checks
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
firewave
</td>
</tr>
</table>
<pre>
> Could this also be applied for https://github.com/llvm/llvm-project/issues/69577?
Weirdly, those two checks are using distinct methods to infer whether the underlying container is mutated. `unnecessary-copy-initialization` uses `doesNotMutateObject` while `performance-unnecessary-value-param` uses `FunctionParmMutationAnalyzer`.
So unfortunately this change won't improve `performance-unnecessary-value-param`.
I can have a look at unifying both in a subsequent PR.
_Originally posted by @legrosbuffle in https://github.com/llvm/llvm-project/issues/94362#issuecomment-2149113119_
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyck0-PpDYQxT-NuZS6BeZfc-Aw2U1LOSS7Sg45roxdgDPGRexyt5hPH0FPNDPHnQtIhvrVq-dXKkY7ecRe1L-I-mumEs8U-tEGvKsbZgOZrQdR_gpfKDkDPNsIykWCAUGtq7NoYKQAM_MaRfkk5FXI62R5TsNZ0yLk1bnb_6_TGugf1Czk1caYMAp5bbq6bUV5FflXkT89nn-jDcZtQn4Bniki8J1Az6ifI6iAkKL1Exgb2XrNsCDPZCIwgfUjBrjPyDMG4BkheYPBbXuBJs_KegxgIyyJFaM5g2jy5D1qjFGF7aRp3U7WW7bK2RfFlrxockgR4_6rIYx_EP9-VH8bjmmaHO6zdbh_XzGMFBblNZ7eY2_KJTytKqjlPe6avN5bfFdhOZiW_JNXbnvBIJr8_N6VvwiSHylw8orRbY_b0LPyE8KdvJAtg13WQLefkPKhxW-glYdZ3RAUOKJnUAzJ2_HwbyCewXpQENMQ8d-EnuH7nx8IP74FO1mvnNtgpchoYNhAVLnDKVAc0jg63CGfT0xXlY0UsjwONC0Lej7JouqKoiyK7sdDCGSmL01XdirDvmhldakq2VXZ3A_FqCpsRykvpS60qXVXFaYYxkq3o9JDZnuZyyq_yEtRyKouzjW2ddPqumql1N1lFFWOi7LuvEs8U5iyQ0tf5E3ZVplTA7p47JSU2ik_ndiaTUi571joj8GGNMXdFhs5vnHYssP-cBwMMh7hABqBjqg9UrsfWQ9v5NfdyFJw_ed9fVV_6-V_AQAA___m2F6r">