Issue |
93982
|
Summary |
Clang rejects standard attributes on tags
|
Labels |
clang
|
Assignees |
|
Reporter |
vgvassilev
|
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs