Skip to content

[Gardening] fix looking odd logical expression mixing bool and enum #62677

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

Conversation

valeriyvan
Copy link
Contributor

Fix looking odd logical expression mixing bool and enum.

@CodaFi CodaFi requested a review from atrick December 19, 2022 19:50
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional that IsInterestingUser works in place of a boolean but still isn't quite proper to do so.

@valeriyvan
Copy link
Contributor Author

ping

@AnthonyLatsis AnthonyLatsis added the compiler The Swift compiler itself label Jan 25, 2023
@@ -400,8 +400,7 @@ void CanonicalizeOSSALifetime::extendLivenessThroughOverlappingAccess() {
findLastConsume = !destroys.contains(&inst);
continue;
}
// Stop at the latest use. An earlier end_access does not overlap.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the comment removed on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't intentional. Restored comment.

@valeriyvan valeriyvan force-pushed the CanonicalizeOSSALifetime-enum branch from 96321f8 to 735faf9 Compare January 25, 2023 15:04
@valeriyvan valeriyvan changed the title [Refactoring] fix looking odd logical expression mixing bool and enum [Gardening] fix looking odd logical expression mixing bool and enum Jan 25, 2023
@AnthonyLatsis AnthonyLatsis added code health SILOptimizer Area → compiler: SIL optimization passes labels Jan 25, 2023
@AnthonyLatsis AnthonyLatsis self-assigned this Jan 25, 2023
@AnthonyLatsis
Copy link
Collaborator

@swift-ci please smoke test and merge

@AnthonyLatsis
Copy link
Collaborator

@swift-ci please smoke test Linux

@AnthonyLatsis AnthonyLatsis removed their assignment Jan 25, 2023
@AnthonyLatsis AnthonyLatsis merged commit 8eee0ff into swiftlang:main Jan 25, 2023
@valeriyvan valeriyvan deleted the CanonicalizeOSSALifetime-enum branch January 26, 2023 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health compiler The Swift compiler itself SILOptimizer Area → compiler: SIL optimization passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants