Commit 4293fa4
committed
Sema: Fix null dereference in
The `TypeRefinementContext::findMostRefinedSubContext()` method can return
`nullptr` in some circumstances, which means that callers need to check the
result before dereferencing it in order to avoid a crash. I haven't introduced
a test case because I can only reproduce the circumstances under which
`findMostRefinedSubContext()` returns `nullptr` with a specific project that is
exercising a bug in Swift macros. The fix here is obvious enough hardening,
though.
Resolves rdar://125054962overApproximateAvailabilityAtLocation().1 parent eb0cdda commit 4293fa4
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1381 | 1383 | | |
1382 | 1384 | | |
1383 | 1385 | | |
| |||
0 commit comments