Skip to content

[Diag] QoI: ownership in protocol check should not be 'else' clause #16093

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

davezarzycki
Copy link
Contributor

Hey @DougGregor – This might be worth cherry-picking into the 4.2 branch.

@davezarzycki davezarzycki requested a review from DougGregor April 22, 2018 13:03
@davezarzycki
Copy link
Contributor Author

@swift-ci please smoke test

@davezarzycki davezarzycki requested review from rudkx and huonw April 22, 2018 13:05
@davezarzycki
Copy link
Contributor Author

@swift-ci please smoke test linux

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Nice! I guess the idea here was that if something already set attr->isInvalid() there is no reason to try and diagnose it again... You might want to add that check to new condition as well.

@davezarzycki
Copy link
Contributor Author

davezarzycki commented Apr 22, 2018

@xedin – I'm not following your comment. The idea here is that sometimes multiple diagnostics need to be reported for a given AST node. There are two diagnostics here that should never have been joined via an else clause. The rest of the pull request is just code clean up.

@swift-ci please smoke test linux

@xedin
Copy link
Contributor

xedin commented Apr 22, 2018

I just wanted to point out that maybe it was else if because that places shouldn't have diagnosed for both these problems, but probably not...

@davezarzycki
Copy link
Contributor Author

Digging through the git blame history, it looks like an honest mistake from the start. See #11744.

@xedin
Copy link
Contributor

xedin commented Apr 22, 2018

Sounds good!

@davezarzycki davezarzycki merged commit bfda039 into swiftlang:master Apr 23, 2018
@davezarzycki davezarzycki deleted the qoi_more_ownership_checking branch April 23, 2018 13:52
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.

2 participants