Skip to content

Conversation

@hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Dec 1, 2023

Fix counters for regions following else ifs, fix the counters for else if conditions, and fix handling of break statements. Also while here, clean up the handling of branch exit regions such that we don't generate multiple overlapping regions for each branch, but a single region at the end of the entire if statement that accounts for all exiting control flow.

rdar://104078910
rdar://104079242
Resolves #62943
Resolves #62944

The 'then' statement must be a BraceStmt, and
the 'else' must either be a BraceStmt or an IfStmt.
Fix counters for regions following `else if`s, fix
the counters for `else if` conditions, and fix
handling of `break` statements. Also while here,
clean up the handling of branch exit regions such
that we don't generate multiple overlapping
regions for each branch, but a single region at
the end of the entire `if` statement that accounts
for all exiting control flow.

rdar://104078910
rdar://104079242
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight hamishknight merged commit e6ec9b0 into swiftlang:main Dec 4, 2023
@hamishknight hamishknight deleted the or-else branch December 4, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect coverage for blocks following else ifs Incorrect else if condition coverage

2 participants