<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58789>58789</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Broken copy elision
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
psiha
</td>
</tr>
</table>
<pre>
Example where simply making a function a template breaks Clang's codegen (it starts making copies):
https://godbolt.org/z/3EM13GrKz
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdj81uwyAQhJ8GLqgRP_EPBw5Jk_RQ9SEWe2PTEGMBbpo8fYmlqlIlVuxopG9mbejv5vgN19kju40YkSVXxJ1d4eKmgQE7L1OXXZjKmrFYkJHZiHBJ7NXDNBDZJNaFHgecGJGtyyxliDn9IrowO0xEaqJ2hB8I3405z-mp5Km8IfQ2-LwJsbBOjzLq-CHUW3x_UDSirputllJr2hvVa6WBZpc9mn0MlxJZ8HeG3qXSkS7Rm390l8fFbrpwLcL7r9_vZY7hE7tcpEtpeRY8VW3TajoadUYltlXbS1HVYOF8tlvUFQC3He-goh4s-mRItSdSTnhjK6LspDpQZySXUgiuRC1aoTe8EVr2YFXNVYNckC3HKzi_efZ4nk2jWSvZZUjFLLfk9GdCSm6YENe4wocljyGaObkR6Bps1uI_r_eUag">