Commit 93ebe63
committed
[C++20] [Modules] Fix ADL for friend in modules
Close #170235
The cause of the issue is it didn't check friendness for decls
in ordinary namespace if it isn't visible.
It is fine for code before modules, since everything is visible.
But it is not true after modules came in. This patch adjusts this.
Note that this doesn't change the control flow for non-modules codes,
as the decls in ordinary namespace is always visible then it won't never
fall in following friendness check.1 parent 82c6ad6 commit 93ebe63
2 files changed
+37
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3927 | 3927 | | |
3928 | 3928 | | |
3929 | 3929 | | |
3930 | | - | |
| 3930 | + | |
| 3931 | + | |
3931 | 3932 | | |
3932 | 3933 | | |
3933 | 3934 | | |
| |||
3959 | 3960 | | |
3960 | 3961 | | |
3961 | 3962 | | |
3962 | | - | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
3963 | 3966 | | |
3964 | 3967 | | |
3965 | 3968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments