<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/67329>67329</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] performance-unnecessary-value-param: provide option to follow C++ Core Guidelines
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
KindDragon
</td>
</tr>
</table>
<pre>
C++ Core Guidelines rule `F.16: For “in” parameters, pass cheaply-copied types by value and others by reference to const` in Enforcements suggest that:
> (Simple) ((Foundation)) Warn when a parameter being passed by value has a size greater than 2 * sizeof(void*). Suggest using a reference to const instead.
(Simple) ((Foundation)) Warn when a parameter passed by reference to const has a size less or equal than 2 * sizeof(void*). Suggest passing by value instead.
So I think would be nice to skip this checks for types that has a size less or equal than 2 * sizeof(void*)
See: [F.16](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f16-for-in-parameters-pass-cheaply-copied-types-by-value-and-others-by-reference-to-const)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyclMtu2zwQhZ9mtBlQkClLthZa-BL_-NFlFl1T4khiQ5MsSTlwn76g4sRJkQJFNrqMRPKcOR9GhKBGQ9RCtYfqmIk5Tta335SRRy9Ga7LOymt7AL4HvseD9YT_zUqSVoYC-lkTQl2c8lUN5Q5P1iM8cNgW0ByUeX08ohNenCmSD8AP6EQI2E8knL6y3jpFEuPVUcDuihehZ0JhJNo4kV9qngbyZHrCaLG3JkSoC1QGH8xgfU9nMjFgmMeRQsQ4iQjlDoojFDsoHxD49lGdnSbgTXoBvj3Z2UgRlTXAm1T-LrzB54kMirta7EiZcdFL8i5uEgEFBvWLcPQk0o9xEgY5At8tdTsA316sksB3wJscH2_a5pA2FJ84QmVCJCHzm-4va76r_eSQd9I1hYDWI_2chf5nA2n3ZOGtGX_IXq6PFv_HOCnzhM921hI7QqNedIQn5dK3hYD-KeBg_S39FNxXFX44nijRCNV-AbM6At9OMboEBT8BP6lge-fyUcVp7nJlgZ8OziW673B_XiuHVc0G65ky7A41S11hH4lmiyfWXdnSJyaMZC9Ep9pbNCxa9kI0bzLZlrIpG5FRu6qbql43RdVkUyvqVVkOW9kXpZSbomrkpt_UgoZ6U1PHq0y1vOBl0fBqVZabssk3q20th34tSqq7oVrBuqCzUDrX-nLOrR8zFcJMbb0peZNp0ZEOyxDgvNfCjCwqeQXO01DwbVrEunkMsC60CjHct4kq6mV8vFtWHdGRH6w_i-RwNoZ6CkH4114snUsROW8vShJal7BOeAxWa_uMf5k42ex1m6IMb1neQuztGfgpybrdmPP2B_VxiTvMS6CL298BAAD__6fIops">