diff options
author | Takuya Shimizu <shimizu2486@gmail.com> | 2023-06-29 23:02:09 +0900 |
---|---|---|
committer | Takuya Shimizu <shimizu2486@gmail.com> | 2023-06-29 23:02:09 +0900 |
commit | 8038086aa75a122e5e632ebb1e7da06a2f7eed4b (patch) | |
tree | 169f12876b3dc645c4821c8d36fb4ef03bcf42a8 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | 09ed2102eab5d3d3786046009ff0d6724118b76b (diff) | |
download | llvm-8038086aa75a122e5e632ebb1e7da06a2f7eed4b.zip llvm-8038086aa75a122e5e632ebb1e7da06a2f7eed4b.tar.gz llvm-8038086aa75a122e5e632ebb1e7da06a2f7eed4b.tar.bz2 |
[clang][Sema] Remove dead diagnostic for loss of __unaligned qualifier
D120936 has made the loss of `__unaligned` qualifier NOT a bad-conversion.
Because of this, the bad-conversion note about the loss of this qualifier does not take effect.
e.g.
```
void foo(int *ptr);
void func(const __unaligned int *var) { foo(var); }
```
BEFORE this patch:
```
source.cpp:3:41: error: no matching function for call to 'foo'
3 | void func(const __unaligned int *var) { foo(var); }
| ^~~
source.cpp:1:6: note: candidate function not viable: 1st argument ('const __unaligned int *') would lose __unaligned qualifier
1 | void foo(int *ptr);
| ^
2 |
3 | void func(const __unaligned int *var) { foo(var); }
| ~~~
```
AFTER this patch:
```
source.cpp:3:41: error: no matching function for call to 'foo'
3 | void func(const __unaligned int *var) { foo(var); }
| ^~~
source.cpp:1:6: note: candidate function not viable: 1st argument ('const __unaligned int *') would lose const qualifier
1 | void foo(int *ptr);
| ^
2 |
3 | void func(const __unaligned int *var) { foo(var); }
| ~~~
```
Please note the different mentions of `__unaligned` and `const` in notes.
Reviewed By: cjdb, rnk
Differential Revision: https://reviews.llvm.org/D153690
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions