Commit 4a77ae8
committed
[cxx-interop] Fix incorrect diagnostic for non-imported functions
If a C++ function cannot be imported into Swift, we try to emit a diagnostic that explains why. This diagnostic wasn't always correct: for functions that return a C++ struct, we emitted a note saying "function uses foreign reference type in a return type which breaks 'swift_shared_reference' contract" even if the return type is a trivial struct without any attributes. This was emitted unless there was another diagnostic that we also provided for the same function.1 parent 49dbf15 commit 4a77ae8
1 file changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3202 | 3202 | | |
3203 | 3203 | | |
3204 | 3204 | | |
3205 | | - | |
3206 | | - | |
3207 | | - | |
3208 | | - | |
3209 | | - | |
3210 | | - | |
3211 | | - | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
3212 | 3215 | | |
3213 | 3216 | | |
3214 | 3217 | | |
| |||
0 commit comments