Skip to content

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

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

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

Coming up with this still-very-brittle test case was a pain.

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 132737e38a22cb461cbf67a65f071c796115dc5e
Test requested by - @jrose-apple

@@ -0,0 +1,5 @@
#import <Foundation.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, meant to remove this line.

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 jrose-apple force-pushed the import-as-member-submodule-check branch from 132737e to fc8a24a Compare June 27, 2017 02:38
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 132737e38a22cb461cbf67a65f071c796115dc5e
Test requested by - @jrose-apple

@swift-ci
Copy link
Contributor

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

@jrose-apple
Copy link
Contributor Author

Source compat testing

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

@jrose-apple jrose-apple merged commit 701a70d into swiftlang:master Jun 27, 2017
@jrose-apple jrose-apple deleted the import-as-member-submodule-check branch June 27, 2017 16:00
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jun 27, 2017
…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 added a commit to jrose-apple/swift that referenced this pull request Jun 27, 2017
…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 added a commit that referenced this pull request Jun 28, 2017
…#10625)

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 (#10612)
jrose-apple added a commit that referenced this pull request Jun 28, 2017
…#10626)

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 (#10612)
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