Skip to content

[ClangImporter] Refactor availability attribute importing logic. NFC. #22872

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 2 commits into from
Mar 5, 2019

Conversation

devincoughlin
Copy link
Contributor

Refactor the PlatformAvailability logic for determining
which Clang availability attributes are relevant when importing. The goal
is to separate the logic for attribute relevance for a given platform from
the logic to determine whether a deprecated attribute should be imported as
unavailable in Swift.

This also makes it possible for the "deprecated-as-unavailable" logic to
refer to the underlying Clang declaration, which is functionality that will
be used in a later commit.

This commit has no intended functional change.

Part of rdar://problem/48348822

@devincoughlin
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@beccadax beccadax left a comment

Choose a reason for hiding this comment

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

The new code is so clean.

Refactor the PlatformAvailability logic for determining
which Clang availability attributes are relevant when importing. The goal
is to separate the logic for attribute relevance for a given platform from
the logic to determine whether a deprecated attribute should be imported as
unavailable in Swift.

This also makes it possible for the "deprecated-as-unavailable" logic to
refer to the underlying Clang declaration, which is functionality that will
be used in a later commit.

This commit has no intended functional change.

Part of rdar://problem/48348822
@devincoughlin devincoughlin force-pushed the refactor-import-attrs branch from 90ca6d7 to e80116d Compare March 3, 2019 22:39
@devincoughlin
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test Linux Platform
Git Sha - e80116db20bf0e5765ad204ed838d0381d1e8e22

@swift-ci
Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - e80116db20bf0e5765ad204ed838d0381d1e8e22

@devincoughlin devincoughlin force-pushed the refactor-import-attrs branch from e80116d to b3ff2d8 Compare March 4, 2019 00:45
@devincoughlin
Copy link
Contributor Author

Updated expected diagnostic text in SourceKit/DocSupport/doc_clang_module.swift.response

@devincoughlin
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test Linux Platform
Git Sha - e80116db20bf0e5765ad204ed838d0381d1e8e22

@swift-ci
Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - e80116db20bf0e5765ad204ed838d0381d1e8e22

@devincoughlin
Copy link
Contributor Author

@swift-ci please test and merge

1 similar comment
@devincoughlin
Copy link
Contributor Author

@swift-ci please test and merge

@devincoughlin
Copy link
Contributor Author

@swift-ci Please clean test OS X platform

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.

4 participants