<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/68303>68303</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] Split cppcoreguidelines-avoid-const-or-ref-data-members or make it configurable
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nilssonk
</td>
</tr>
</table>
<pre>
There are projects where lvalue ref members are seen as acceptable (since single-assignment semantics and implicit deletion of copy constructor/operators are purposeful design choices) while const or rvalue ref members are seen as bad practice. E.g.
```
struct FooContainer {
int& x;
int& y;
};
```
is okay, while
```
struct BarContainer {
int const x;
int && y;
};
```
is not.
It would be nice to have more customizability since the only currently available option for these projects is to disable the check entirely.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU91uqzgQfhpzMwI5hiTNBRdts5H2evcF_DPAbIwH2SZd9ulXkPS0R9WpdCQEeDw_3zffjE6J-oDYiv2L2J8LPeeBYxvIp8ThWhh2S_v3gBFBR4Qp8j9oc4K3zeRv2s8IETsYcTQY0-aVEAPoBNpanLI2HkGop0TBIiQKvcfyXnfEkCHhqEMmm0AHBzROnixlcOgxEwfgDixPC1gOKcfZZo5CXXjCqDM_Kk5znDhhN3twuGYGOzBZTEKd4G0gj_dw4Ajxe9BGO5iitpksVvBH1VdCnoV8Fgf5eLbjHQpcmF85ZE0BI4jjy_0SAIBCFuoA_4r6q3H5YRTH88f_zxUoAV_1ItTrncF3MF50_DWMB_UvSECow--gCZzfe7G9_8zwxrN3YBACWYTMMOgbwsgRwc4p80j_aUOe8gJ3-fOAwMEvYOcYMWS_gL5p8tuQ8LQJ3nFc_dKncaO0JneUNr81iR3QXgFDpoh-qQrX1u5Un3SB7e5wOuzlScqmGFqlrJUdyvqodthZbeTheGyO1mCz2xtVF9QqqeqdlPudqqVsqsbtTkaa4851RrvGikbiqMlX3t_GimNfUEoztoenWtaF1wZ92tZHKet16MtMbhFKresU2zWoNHOfRCM9pZw-0mTKflu8T2H7M_w1ecpgp8lyxH4mh54CplLfmFy5aVlyLCN2pdNZl-9DzBFGfUWgTfCO-jmu3Srm6Nsh5ymJ-lmoi1CXnvIwm8ryKNRlhfP4lI9-C3XZKCahLhvL_wMAAP__fn9YNA">