Skip to content

[ClangImporter] NS_ERROR_ENUMs can be redefined in separate modules #20527

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
merged 1 commit into from
Nov 13, 2018

Conversation

jrose-apple
Copy link
Contributor

It's not something that ought to happen, but when modules aren't quite set up properly (often by accident, thanks to header maps), we can get into basically this situation by having the definition end up in a header that's textually included into two different modules, or into a module and a bridging header. Handle that the same way we handle other redeclarations: have it show up in both modules.

rdar://problem/45646620

It's not something that /ought/ to happen, but when modules aren't
quite set up properly (often by accident, thanks to header maps), we
can get into basically this situation by having the definition end up
in a header that's textually included into two different modules, or
into a module and a bridging header. Handle that the same way we
handle other redeclarations: have it show up in both modules.

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

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b4efb25

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b4efb25

@jrose-apple
Copy link
Contributor Author

Source compat failures due to #20422.

@swift-ci Please test

@jrose-apple jrose-apple merged commit 647dd40 into swiftlang:master Nov 13, 2018
@jrose-apple jrose-apple deleted the i-am-error branch November 13, 2018 18:17
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Nov 14, 2018
…wiftlang#20527)

It's not something that /ought/ to happen, but when modules aren't
quite set up properly (often by accident, thanks to header maps), we
can get into basically this situation by having the definition end up
in a header that's textually included into two different modules, or
into a module and a bridging header. Handle that the same way we
handle other redeclarations: have it show up in both modules.

rdar://problem/45646620
(cherry picked from commit 647dd40)
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