[all-commits] [llvm/llvm-project] 803808: [clang][Sema] Remove dead diagnostic for loss of _...
Takuya Shimizu via All-commits
all-commits at lists.llvm.org
Thu Jun 29 07:02:46 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8038086aa75a122e5e632ebb1e7da06a2f7eed4b
https://github.com/llvm/llvm-project/commit/8038086aa75a122e5e632ebb1e7da06a2f7eed4b
Author: Takuya Shimizu <shimizu2486 at gmail.com>
Date: 2023-06-29 (Thu, 29 Jun 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaOverload.cpp
M clang/test/SemaCXX/MicrosoftExtensions.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list