Skip to content

[4.0] [ClangImporter] Filter import-as-member decls by preferred submodule. #10625

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

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: The "import-as-member" feature was not checking the right context for a definition that had previously been forward-declared elsewhere in a module; in rare circumstances this would lead to these declarations being dropped entirely.
  • Scope: Affects import-as-member declarations from Objective-C.
  • Radar: rdar://problem/32816381
  • Reviewed by: @DougGregor
  • Risk: Low. Anything that previously got the right answer should continue to get the right answer.
  • Testing: Verified that the original test case succeeded, passed source compatibility suite on master.

…swiftlang#10612)

That is, if a member is redeclarable, use the module of the definition
if possible, and the canonical declaration otherwise. This is
consistent with what we do when we actually import the declaration.
Without this, we can end up dropping declarations.

rdar://problem/32816381
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

LGTM, if I failed to say so elsewhere

@jrose-apple jrose-apple merged commit 5179012 into swiftlang:swift-4.0-branch Jun 28, 2017
@jrose-apple jrose-apple deleted the 4.0-import-as-member-submodule-check branch June 28, 2017 00:38
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