Skip to content

[ParseSIL] Fix SILParser::parseSILIdentifierSwitch #20546

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 1 commit into from
Nov 14, 2018
Merged

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Nov 13, 2018

Template SILParser::parseSILIdentifierSwitch should not use ValueOwnershipKind in its implementation.

@rxwei rxwei requested a review from gottesmm November 13, 2018 21:31
@rxwei rxwei changed the title Fix SILParser::parseSILIdentifierSwitch [ParseSIL] Fix SILParser::parseSILIdentifierSwitch Nov 13, 2018
@rxwei
Copy link
Contributor Author

rxwei commented Nov 13, 2018

@swift-ci please smoke test

@gottesmm
Copy link
Contributor

This LGTM. That being said, I do think the commit comment can be improved. Can you mention in the commit comment that Result has the type of one of the template parameters and without this patch we are requiring T to be a ValueOwnershipKind (or convertible to that), which sort of defeats the point of having a templated argument.

@rxwei
Copy link
Contributor Author

rxwei commented Nov 13, 2018

I can update the comment either by making a new squash commit message or overwrite the commit and retrigger CI. Which do you prefer?

@gottesmm
Copy link
Contributor

Given that the macOS test failed, I would just overwrite and retrigger the CI.

…meter.

In `parseSILIdentifierSwitch`, `Result` has the type of one of the template parameters. Without this patch we are requiring `T` to be a `ValueOwnershipKind` (or convertible to that), which makes the function not usable on other result types and defeats the point of having a templated argument.
@rxwei
Copy link
Contributor Author

rxwei commented Nov 14, 2018

Done.

@rxwei
Copy link
Contributor Author

rxwei commented Nov 14, 2018

@swift-ci please smoke test and merge

1 similar comment
@rxwei
Copy link
Contributor Author

rxwei commented Nov 14, 2018

@swift-ci please smoke test and merge

@gottesmm
Copy link
Contributor

Nice commit message! = ). Thanks for catching this!

@swift-ci swift-ci merged commit a1a3c5f into master Nov 14, 2018
@rxwei rxwei deleted the rxwei-patch-2 branch November 14, 2018 04:16
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.

3 participants