Skip to content

[PrintAsObjC] Print availability on classes, protocols, and categories #11252

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

jrose-apple
Copy link
Contributor

Now that Clang has availability diagnostics too (-Wpartial-availability and friends) we need to get this correct, or people will get warnings in the generated header!

Also fix up an issue with availability messages being omitted in certain cases.

rdar://problem/33313703

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@jrose-apple
Copy link
Contributor Author

I recommend reviewing this one commit-by-commit and/or with a diff that ignores whitespace: https://github.com/apple/swift/pull/11252/files?w=1

@jrose-apple
Copy link
Contributor Author

error: argument labels '(extendingOrTruncating:)' do not match any available overloads
        return Int(extendingOrTruncating: result)
               ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@moiseev, looks like you missed SwiftPM in your update?

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 124a0ecfa8af19e7bb0e0b167e57f911644e20b8
Test requested by - @jrose-apple

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@jrose-apple
Copy link
Contributor Author

Review ping for @DougGregor or @devincoughlin.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

case PlatformKind::watchOSApplicationExtension:
plat = "watchos_app_extension";
break;
default:
Copy link
Member

Choose a reason for hiding this comment

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

Can we not have a default case here? The effect is the same, but we'll get warnings if PlatformKind ever gets extended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's pre-existing code I just moved around, but sure.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok.

Now that Clang has availability diagnostics too
(-Wpartial-availability and friends) we need to get this correct, or
people will get warnings in the generated header!

rdar://problem/33313703
No functionality change. Diff best viewed ignoring whitespace.
A misplaced brace left the messages in empty space. Noticed by
inspection.
Per feedback from Doug. The last case was unreachable anyway, so no
functionality change.
@jrose-apple jrose-apple force-pushed the PrintAsObjC-availability-fixes branch from 124a0ec to c4c09ea Compare August 9, 2017 00:28
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple jrose-apple merged commit 8de31c3 into swiftlang:master Aug 9, 2017
@jrose-apple jrose-apple deleted the PrintAsObjC-availability-fixes branch August 9, 2017 17:57
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Aug 28, 2017
…ability-fixes

[PrintAsObjC] Print availability on classes, protocols, and categories

rdar://problem/33313703
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