Skip to content

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Feb 1, 2022

Control async variant of imported ObjC methods.

For non-async variant:

  1. if swift_private(aka. NS_REFINED_FOR_SWIFT) is specified, hide.

For async variant:

  1. if swift_async(swift_private)(aka. NS_REFINED_FOR_SWIFT_ASYNC) is specified, hide.
  2. if swift_async(not_swift_private)(aka. NS_SWIFT_ASYNC) is specified, show.
  3. if swift_async_name()(aka. NS_SWIFT_ASYNC_NAME) is specified, show.
  4. if swift_private(aka. NS_REFINED_FOR_SWIFT) is specified, hide.

rdar://80602940

@rintaro rintaro requested a review from bnbarham February 1, 2022 22:52
@rintaro
Copy link
Member Author

rintaro commented Feb 1, 2022

@swift-ci Please smoke test

Control 'async' variant of imported ObjC methods.

For non-'async' variant:
1) if 'swift_private' is specified, hide.

For 'async' variant:
1) if 'swift_async(swift_private)' is specified, hide.
2) if 'swift_async(not_swift_private)' is specified, show.
3) if 'swift_async_name()' is specified, show.
4) if 'swift_private' is specified, hide.

rdar://80602940
@rintaro rintaro force-pushed the ide-completion-rdar80602940 branch from 24c3783 to a9bbc1f Compare February 1, 2022 22:53
Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

LGTM. As we spoke about I think it would be good to add "not recommended" to the completion handler functions (or even to just completely remove them), but that can be a follow up.

if (auto *ClangD = getClangDecl()) {
if (ClangD->hasAttr<clang::SwiftPrivateAttr>())
bool bypassSwiftPrivate = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

BypassSwiftPrivate ;) Not that anywhere is consistent 😆

@rintaro
Copy link
Member Author

rintaro commented Feb 3, 2022

@swift-ci Please smoke test macOS

@rintaro rintaro merged commit 747c7cf into swiftlang:main Feb 4, 2022
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