Skip to content

[Profiler] Fix coverage mapping for switches #60775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

hamishknight
Copy link
Contributor

Previously we assumed the exit counter was the same as the entry counter. Update the logic such that we track break statements (including implicitly at the end of a case), as well as early returns and jumps to parent statements. This follows a similar logic to what we do for if statements.

rdar://99141044
Resolves #60772

Previously we assumed the exit counter was the
same as the entry counter. Update the logic such
that we track break statements (including
implicitly at the end of a case), as well as
early returns and jumps to parent statements. This
follows a similar logic to what we do for if
statements.

rdar://99141044
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit bd6aa99 into swiftlang:main Aug 25, 2022
@hamishknight hamishknight deleted the switchboard branch August 25, 2022 20:13
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 switch statements
1 participant