Issue |
140020
|
Summary |
Wrong source range for local/global declarations with unused/alias attribute.
|
Labels |
clang:frontend
|
Assignees |
|
Reporter |
hokein
|
See https://godbolt.org/z/bG5cEzY4Y
```
struct TestType {
[[maybe_unused]] int unsafe_one[16]; // #1 good, it is fixed by https://github.com/llvm/llvm-project/commit/b3a6d434a7051d879718ef92a4fafd1697759aed
};
[[maybe_unused]] int unsafe_one[16]; // #2 bad
void func() {
[[maybe_unused]] int unsafe_one[16]; // #3 bad
}
```
The source range of the declaration should include the unused attribute.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs