Skip to content
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

[WIP][Parser][SR-1052] Added @discardableResult attribute parsing. #1887

Merged
merged 1 commit into from Apr 3, 2016

Conversation

tanadeau
Copy link
Contributor

What's in this pull request?

Part 1 for SR-1052: Add parsing of new @discardableResult attribute.
Future commits will add use in diagnostic generation, stdlib, etc.

Resolved bug number: Part 1 of SR-1052


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

Future commits will add use in diagnostic generation, stdlib, etc.
@@ -653,6 +654,7 @@ class AttributeChecker : public AttributeVisitor<AttributeChecker> {
IGNORED_ATTR(Testable)
IGNORED_ATTR(WarnUnqualifiedAccess)
IGNORED_ATTR(ShowInInterface)
IGNORED_ATTR(DiscardableResult)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the @discardableResult attribute be allowed on Void functions?

Currently @warn_unused_result is allowed in that case, but I'm not sure it makes sense for the new attribute.

@tanadeau tanadeau changed the title Added @discardableResult attribute parsing. [WIP][Parser][SR-1052] Added @discardableResult attribute parsing. Mar 26, 2016
@tanadeau
Copy link
Contributor Author

tanadeau commented Apr 2, 2016

@lattner It's been a week. Can this PR get reviewed? I'd like to finish SR-1052, but everything else builds on this PR.

@lattner
Copy link
Collaborator

lattner commented Apr 3, 2016

This looks great, sorry for the delay!

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.

None yet

3 participants