<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95480>95480</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Proposal for a perf-related diagnostic
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickitat
</td>
</tr>
</table>
<pre>
Hi!
The idea is to provide (likely opt-in) switch to enable diagnostic of the following case: https://cppinsights.io/s/01568d5e.
Specifically I'm talking about implicit copy of `a` when calling `foo`.
I'm not sure where it is better to be implemented. As a part of compiler or probably clang-tidy.
Because in most of the cases people would be fine with this copying, it is definitely not something as generic as unaligned atomic access for example. Ideally something like perfsan )
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUUs2OozgQfhpzKQUZk0By4JDeVrR9W2nnBYxdhpo2NrKLzuTtRyY96p4LIOz6_urTOdMUEAdxehGn10pvPMc0BDLvxJqrMdrH8C8J1Qj5KuT1-fwxI5BFDZSBI6wpfpBFEOrs6R39A-LKBwpCXSDfic1cbmHQo0ewpKcQM5OB6IBnBBe9j3cKExidUbRXmJnXLNqrUDehbmZdKWSaZs41RaFuWaibbE7d2Z6wfir6f0VDjoz2_gFvQvULsPbvBVSPcWOgZfVkiMHE9VGYRSe16CTcZwxQ5spd0UkXo-hk_d3uEy9EhrwlLBMJgbi4H5EZU7E34s6BCwZGW8M1g4ZVJy5kJi4reUwQU0lr1KN_gPE6TAcm-_hke0Gjt4xAAZaY-U8-JZUMK8bVI9zj5m0hcxQQ7sQz8Ex5t0VhEuqfT2UWHQXiso1deVyQ5z2PDBMGTGTK5xa0Lw2woDku5Z8xmDO4mAB_6eKohjeLe7BfIGXPsGJyWQcoe346qOzQ2kt70RUOTd-c2-Ys-66aB9U2fe-aXstza6zWUvVOH88OJTrXXUxFg5LqKLumVao9tl2NyjrVuN422jXHzomjxEWTr73_WOqYpopy3nC4nI5nWXk9os97i5UKeIf9UChVSp2GMnMYtymLo_SUOX-hMLHH4b8U15i1333r3dkhodeM9ltjqy354e9yTsTzNtYmLkLdCujn67Cm-BMNC3XbpZTOPqV-DOp3AAAA__-tbSbX">