| Issue |
108878
|
| Summary |
Deprecated warning is emitted twice
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
aelovikov-intel
|
For
```
template <typename T>
struct ptr {};
struct sub_group {
template <typename T>
[[deprecated("use new interface")]]
auto load(T *) {}
};
auto foo(sub_group sg, int *p) { return sg.load(p); }
```
the warning is emitted twice (https://godbolt.org/z/PbzPMfhh5):
```
<source>:10:44: warning: 'load' is deprecated: use new interface [-Wdeprecated-declarations]
10 | auto foo(sub_group sg, int *p) { return sg.load(p); }
| ^
<source>:7:10: note: 'load' has been explicitly marked deprecated here
7 | auto load(T *) {}
| ^
<source>:10:44: warning: 'load<int>' is deprecated: use new interface [-Wdeprecated-declarations]
10 | auto foo(sub_group sg, int *p) { return sg.load(p); }
| ^
<source>:6:7: note: 'load<int>' has been explicitly marked deprecated here
6 | [[deprecated("use new interface")]]
| ^
2 warnings generated.
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs