Commit 9a0f165
committed
[Sema]: minor improvements to unused expression result diagnostics
Previously we would emit a diagnostic in cases in which a throwing
function returning a structurally-unihabited type was called within an
optional try expression. Such cases can never produce a return value, so
suppress the existing diagnostic.1 parent aca07fb commit 9a0f165
File tree
2 files changed
+83
-6
lines changed- lib/Sema
- test/Sema
2 files changed
+83
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1823 | 1823 | | |
1824 | 1824 | | |
1825 | 1825 | | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
1829 | 1834 | | |
1830 | 1835 | | |
1831 | 1836 | | |
| |||
1972 | 1977 | | |
1973 | 1978 | | |
1974 | 1979 | | |
1975 | | - | |
1976 | | - | |
1977 | | - | |
| 1980 | + | |
| 1981 | + | |
1978 | 1982 | | |
1979 | 1983 | | |
1980 | 1984 | | |
| |||
| 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 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
0 commit comments