Skip to content
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

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

Merged
merged 2 commits into from Mar 5, 2019

Conversation

Projects
None yet
4 participants
@devincoughlin
Copy link
Member

devincoughlin commented Feb 25, 2019

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

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Feb 25, 2019

@swift-ci please test

@devincoughlin devincoughlin requested review from jrose-apple and brentdax Feb 25, 2019

@brentdax
Copy link
Collaborator

brentdax left a comment

The new code is so clean.

Show resolved Hide resolved lib/ClangImporter/ImporterImpl.h Outdated
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp Outdated
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp Outdated
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp Outdated
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp Outdated
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp Outdated
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp
Show resolved Hide resolved lib/ClangImporter/ClangImporter.cpp Outdated
[ClangImporter] Refactor availability attribute importing logic. NFC.
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 devincoughlin:refactor-import-attrs branch from 90ca6d7 to e80116d Mar 3, 2019

@devincoughlin

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Mar 3, 2019

@swift-ci please test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test Linux Platform
Git Sha - e80116d

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - e80116d

@devincoughlin devincoughlin force-pushed the devincoughlin:refactor-import-attrs branch from e80116d to b3ff2d8 Mar 4, 2019

@devincoughlin

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Mar 4, 2019

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

@devincoughlin

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Mar 4, 2019

@swift-ci Please test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test Linux Platform
Git Sha - e80116d

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Mar 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - e80116d

@devincoughlin

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Mar 5, 2019

@swift-ci please test and merge

1 similar comment
@devincoughlin

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Mar 5, 2019

@swift-ci please test and merge

@devincoughlin

This comment has been minimized.

Copy link
Member Author

devincoughlin commented Mar 5, 2019

@swift-ci Please clean test OS X platform

@devincoughlin devincoughlin merged commit b2d6e8c into apple:master Mar 5, 2019

4 of 5 checks passed

Test and Merge Build finished.
Details
Swift Test Linux Platform No test results found.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform No test results found.
Details
Swift Test OS X Platform (smoke test)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.