<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107600>107600</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] Improve documentation of bugprone-return-const-ref-from-parameter
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chrchr-github
</td>
</tr>
</table>
<pre>
~~~c++
const std::vector<int>& f(std::vector<int>&&) = delete; // bugprone-return-const-ref-from-parameter without this
const std::vector<int>& f(const std::vector<int>& v) { return v; }
~~~
The presence of a deleted overload prevents the warning, so maybe that should be mentioned in the documentation? Currently, there is no indication given to the user on how to address this warning.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone/return-const-ref-from-parameter.html
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8uu2ywQfhq8GTlywJd44cXJyW_p3_cFMIwNLYYIxj7NJs9e2TnpbdHTSkg2MwN8lxmZkp08YseqM6sumVzIhNgpE5WJ-WTJLEM2BH3r7ve7Yvy8reLCihcVfCJIpJl4YeJlRUUhMvFqPTHxH-M1jIyf_pDfVwtMXECjQ0ImzsB4z3gPwzJdY_CYR6Ql-nx_LI845mMMc36VUc5IGOHNkgkLARmb_gXXx1XrDq45wwMCrDu85vJ45X6_P34-GYRrxIReIYQR5DsZDWHF6ILUW3pFTwnIILzJ6K2fGH-FFGCWtwGBjCRIJixOw4AwoycbPGqwfj-jg1q2oNzCTPTwusSIntxtu4YMRgSbwAewXlu1l8FkV_RAYb9hSRgheDDhbQtJrSOmtKv2RHR48DFE17SJshuhnPTTwbl1PoQ4Md7jV4rymcjJ6tu2Mai-JMb7p22M9x8YdzA0u0x3QreilRl2x4ZXtWiOos5MV9RatKemFWJE1YqiPskS20FXx2PVNHrMbMcLXhZtUR8rcarqQ1HKSvNKlWN7HHhTsrLAWVr3HXtmU1qwOxZNXRSZkwO69Gz62G1V-bBMiZWFs4nSj3Nkye3j8RPl6gL_z9cY1t-82Rrgb1s3W6LrflX7MW4HFWbG-w3A-ye_xvAZFTHe7yw2qd-JrB3_FgAA___Jkj4J">