Skip to content

[🍒6.2][APIGen] Don't record declarations from clang header files (#81086) #81221

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

zixu-w
Copy link
Contributor

@zixu-w zixu-w commented Apr 30, 2025

When Swift visits an ExtensionDecl from an @objc @implementation extension, it fetches the implemented Objective-C interface declaration from the header file and adds to the visitor.
We don't want these API records from APIGenRecorder for Swift API descriptor, because we cannot correctly reason about their API access as they depend on the header group which Swift doesn't know about.

Resolves rdar://148943382

(cherry picked from commit cd54530)

…#81086)

When Swift visits an `ExtensionDecl` from an `@objc @implementation`
extension, it fetches the implemented Objective-C interface declaration
from the header file and adds to the visitor.
We don't want these API records from `APIGenRecorder` for Swift API
descriptor, because we cannot correctly reason about their API access as
they depend on the header group which Swift doesn't know about.

Resolves rdar://148943382

<!--
If this pull request is targeting a release branch, please fill out the
following form:

https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1

Otherwise, replace this comment with a description of your changes and
rationale. Provide links to external references/discussions if
appropriate.
If this pull request resolves any GitHub issues, link them like so:

  Resolves <link to issue>, resolves <link to another issue>.

For more information about linking a pull request to an issue, see:

https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

<!--
Before merging this pull request, you must run the Swift continuous
integration tests.
For information about triggering CI builds via @swift-ci, see:

https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift!
-->

(cherry picked from commit cd54530)
@zixu-w zixu-w requested a review from a team as a code owner April 30, 2025 22:44
@zixu-w zixu-w closed this May 22, 2025
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.

1 participant