Commit 56b82bd
🍒[cxx-interop] Do not expose enums with optional generic cases
Explanation:
The code path trying to generate the C++ header for enums that have
cases with associated values of a generic optional type resulted in null
pointer dereference. The proper fix is a bit more involved so this PR
just temporarily avoids exposing the problematic enums to C++.
Scope: C++ Reverse Interop
Risk: Low, we stop exposing enums that were crashing the compiler before.
Testing: Added a regression test.
Issue: rdar://129250756
Reviewer: @egorzhdan
Original PR: swiftlang#749661 parent 4b9e512 commit 56b82bd
File tree
2 files changed
+14
-4
lines changed- lib/PrintAsClang
- test/Interop/SwiftToCxx/generics
2 files changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2910 | 2910 | | |
2911 | 2911 | | |
2912 | 2912 | | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
2913 | 2916 | | |
2914 | 2917 | | |
2915 | 2918 | | |
| |||
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
0 commit comments