Commit 7ab5915
committed
[Refactoring] Don't drop returns with expressions
Previously we were unconditionally dropping a
return statement if it was the last node, which
could cause us to inadvertently drop the result
expression as well. Instead, only drop bare
'return' statements.
rdar://777893601 parent aa189f2 commit 7ab5915
File tree
2 files changed
+37
-6
lines changed- lib/IDE
- test/refactoring/ConvertAsync
2 files changed
+37
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4623 | 4623 | | |
4624 | 4624 | | |
4625 | 4625 | | |
4626 | | - | |
4627 | | - | |
4628 | | - | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
4629 | 4629 | | |
4630 | 4630 | | |
4631 | 4631 | | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
4632 | 4640 | | |
4633 | 4641 | | |
4634 | | - | |
4635 | | - | |
| 4642 | + | |
| 4643 | + | |
4636 | 4644 | | |
4637 | 4645 | | |
4638 | 4646 | | |
| |||
4895 | 4903 | | |
4896 | 4904 | | |
4897 | 4905 | | |
4898 | | - | |
| 4906 | + | |
4899 | 4907 | | |
4900 | 4908 | | |
4901 | 4909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
0 commit comments