<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61334>61334</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wunused-private-field still triggers on [[maybe_unused]] member
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pkasting
</td>
</tr>
</table>
<pre>
The following code triggers a warning with -Wunused-private-field (see https://godbolt.org/z/1G944d41q):
```
class [[maybe_unused]] Unused {};
class C {
private:
Unused unused_;
};
```
As far as I can tell from https://eel.is/c++draft/dcl.attr.unused, Clang should probably not warn here.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0UkGPnDwM_TXmYg0iAQY4cFh2xKfv3qrHlUMMpA1kmoQdbX99BTvtbldaKUpkO35-th-FYKaVuYWyg_KS0BZn59vrDwrRrFOinH5pv8yMo7PW3cw64eA0Y_RmmtgHJLyRX3f_zcQZT9-2dQusT1dvninyaTRsNYKsAzPOMV4D5A8ge5D95LRyNqbOTyD7XyB78V9TFLoQP0E2-7fsAtkDnLP7OczBUgh40O0WelH89FoRyguUF_x6GAhVB9UF8u6O8S718QgeDryz_FsL_-S_Yj69AbwH-5fQ6_0QcCSPFPB_HGjFyNbi6N3yoWlmm5oAsh9AdiA77WmMIHs92JRi9Om9G_mIj5bWCcPsNqvx6p0iZV9wdfEYOc7sOU10m-smbyjhVpyruqjqrK6TudVDRdQIOdZnFmdmJagu1FBoLcqmVmNiWpnJPMtFJpqyKOpUZ5UQ1EiSDVdZPUCR8ULGptY-L_uSEhPCxu1Z5HmRWFJswyEbKVe-4REEKXcV-XbPOaltClBk1oQY3lCiiZbbT4QSorH2TV1u_XzTCy-KfbJ5237QlYnzptLBLSD7vez9OV29-87DPu2D7L6Fo5nfAQAA__-SfPCi">