Commit 6935e90
committed
Use tag name lookup for class names
This PR would fix #16855 .
I think the correct lookup to use for class names is Tag name lookup,
because it does not take namespaces into account. The current lookup
does and because of this some valid programs are not accepted.
If you think that Tag name lookup is not correct for all cases when
we are looking up types based on class names then we can only
do tag name lookup when looking up class names for inheritance.
In case of inheritance:
```
[class.derived]p2 says:
"During the lookup for a base class name, non-type names are ignored."
```1 parent 36a4055 commit 6935e90
File tree
3 files changed
+21
-5
lines changed- clang
- docs
- lib/Sema
- test/CXX/class.derived
3 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments