Commit 786d31e
committed
[clang] When checking for covariant return types, make sure the pointers or references are to *classes*.
https://eel.is/c++draft/class.virtual#8.1
This prevents overriding methods with non class return types that have less cv-qualification.1 parent 55d51dd commit 786d31e
File tree
2 files changed
+12
-2
lines changed- clang
- lib/Sema
- test/SemaCXX
2 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18273 | 18273 | | |
18274 | 18274 | | |
18275 | 18275 | | |
18276 | | - | |
| 18276 | + | |
18277 | 18277 | | |
18278 | 18278 | | |
18279 | 18279 | | |
| |||
18296 | 18296 | | |
18297 | 18297 | | |
18298 | 18298 | | |
18299 | | - | |
| 18299 | + | |
18300 | 18300 | | |
18301 | 18301 | | |
18302 | 18302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
0 commit comments