<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/93982>93982</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang rejects standard attributes on tags
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vgvassilev
</td>
</tr>
</table>
<pre>
Clang errors out on:
```cpp
[[gnu::always_inline]] inline int f();
[[gsl::Pointer(int)]] struct S{};
```
with:
```
error: misplaced attributes; expected attributes here
3 | [[gsl::Pointer(int)]] struct S{};
| ~~~~~~~~~~~~~~~~~~~~~ ^
| [[gsl::Pointer(int)]]
1 error generated.
```
where gcc happily accepts it.
I think we should support that case to improve consistency across different C++ entities which support attributes at that position.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk8GO2zgMhp9GvhATKJIT2wcf4skG2NsC-wALWWZsbRXJEOmkc-mzF4qDdtIOigKlDRiUf374JYqGyI0BsRW7TuyOhVl4iqm9jtf8x-O16OPw1r56E0bAlGIiiAtDDEIfhDwKeRB7ub52nh8rmdWNYckafTD-Zt7oPxe8Cyh2R7E7wpqACwxnoWqhGqE7eConv5b_E11gTELVLnAWrgTitFiGf0XVieoodPcofva0pjfH089-1_S-KaEPcHE0e2NxAMOcXL8wUjaFn2e0_LQMEyZcywEANIjqFf7INtwjY758FCB2f_0o_FX8lpcVuF3bCiMGTIZx2Hx4TI-DzBuH0VqYzDw7_wbGWpyZwPHmvfBv4MmFT3BDoCkufgBa5jkmBp4MgzWEwBHcZU7ximBjIEeMwWZiikQwuPMZEwaGV6E6oTrAwI4dEtwmZ6dvwHdtMQ_8HMmxi2FTDK0eGt2YAtttlR-9rctiaqXZqcpUe3OuSilto7Asy7rZb3VdotGqcK2SqpQ7vd3utZblplJaSzmUZb3f9_1ZilLixTi_8f562cQ0Fo5owbbRTa0Kb3r0dJ8qpWyeHqFUHrDUZv1Lv4wkSukdMX0nsGOPj2FL-D9aJiA2YTDp6frFAGxGKpbk24l5ptxmdRLqNDqeln5j40WoU-Y-Pi9zipkn1Oluk4Q6rU6vrfoaAAD___C0N5k">