Commit dc6ec45
committed
[cxx-interop] Assign correct owning module to class template specializations
When importing C++ class template specializations into Swift, we were assigning the owning module to the imported Swift structs inconsistently. For specializations that had a typedef (or a using-decl), we assumed the module that declares the typedef to be the owning module for the specialization. For specializations that do not have a typedef, we assumed the module that declares the class template itself to be the owning module. This changes the behavior to always assume the latter.
rdar://1585898031 parent bf07c4b commit dc6ec45
File tree
7 files changed
+37
-15
lines changed- include/swift
- AST
- ClangImporter
- lib
- AST
- ClangImporter
- test/Interop/Cxx/stdlib
- Inputs
7 files changed
+37
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
935 | 938 | | |
936 | 939 | | |
937 | 940 | | |
938 | 941 | | |
939 | 942 | | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
945 | 947 | | |
946 | 948 | | |
947 | 949 | | |
| |||
956 | 958 | | |
957 | 959 | | |
958 | 960 | | |
959 | | - | |
| 961 | + | |
960 | 962 | | |
961 | 963 | | |
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | 967 | | |
966 | 968 | | |
967 | | - | |
| 969 | + | |
968 | 970 | | |
969 | 971 | | |
970 | 972 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3199 | 3199 | | |
3200 | 3200 | | |
3201 | 3201 | | |
3202 | | - | |
3203 | | - | |
3204 | | - | |
3205 | | - | |
3206 | | - | |
3207 | | - | |
3208 | | - | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
3209 | 3209 | | |
3210 | 3210 | | |
3211 | 3211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments