Skip to content

[DiagnosticQol][SR-14505] Use DeclDescriptive kind in missing return data flow diagnostics #36952

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

LucianoPAlmeida
Copy link
Contributor

Separate closure and declaration on diagnoseMissingReturn data flow diagnostics and use better descriptive naming.

Resolves SR-14505.

@LucianoPAlmeida LucianoPAlmeida force-pushed the SR-14505-diag-miss-ret branch from 8f3a886 to 3b7a8f9 Compare April 18, 2021 03:13
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

if b {
return 0
}
} // expected-error {{missing return in a instance method expected to return 'Int'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this say an instance method or remove the article altogether?

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 make sense to remove the article, thanks @harlanhaskins :)

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

@LucianoPAlmeida LucianoPAlmeida force-pushed the SR-14505-diag-miss-ret branch from 913c5b0 to 6639211 Compare April 18, 2021 17:10
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor

@varungandhi-apple varungandhi-apple left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! The diagnostic wording feels a little bit odd with the missing a/an, but that seems like somewhat tedious to get right, so I think this is good to go. 🚢

@varungandhi-apple
Copy link
Contributor

@swift-ci please smoke test macOS

1 similar comment
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci please smoke test macOS

@LucianoPAlmeida
Copy link
Contributor Author

LucianoPAlmeida commented Apr 19, 2021

"This build failed because of a Jenkins Error; typically a Java exception."
This seems unrelated, let's try it again ...

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci please smoke test macOS

@varungandhi-apple
Copy link
Contributor

That generally happens when the system is overloaded. Maybe we can retry after a few hours.

@LucianoPAlmeida
Copy link
Contributor Author

LucianoPAlmeida commented Apr 19, 2021

That generally happens when the system is overloaded.

Ah, I've seen this message couple of times, didn't know that. Thanks for the info @varungandhi-apple :)

@LucianoPAlmeida LucianoPAlmeida merged commit ddeb192 into swiftlang:main Apr 20, 2021
@LucianoPAlmeida LucianoPAlmeida deleted the SR-14505-diag-miss-ret branch April 20, 2021 11: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