-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
[PrintAsObjC] Print availability on classes, protocols, and categories #11252
Conversation
@swift-ci Please test macOS |
@swift-ci Please smoke test Linux |
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 |
@moiseev, looks like you missed SwiftPM in your update? |
Build failed |
@swift-ci Please test macOS |
@swift-ci Please smoke test Linux |
Review ping for @DougGregor or @devincoughlin. |
@swift-ci Please smoke test |
lib/PrintAsObjC/PrintAsObjC.cpp
Outdated
case PlatformKind::watchOSApplicationExtension: | ||
plat = "watchos_app_extension"; | ||
break; | ||
default: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
124a0ec
to
c4c09ea
Compare
@swift-ci Please smoke test |
…ability-fixes [PrintAsObjC] Print availability on classes, protocols, and categories rdar://problem/33313703
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