Skip to content

Support __swift_attr__ to APINotes #75819

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

Open
kateinoigakukun opened this issue Aug 10, 2024 · 0 comments
Open

Support __swift_attr__ to APINotes #75819

kateinoigakukun opened this issue Aug 10, 2024 · 0 comments
Labels
clang importer Area → compiler: The clang importer feature A feature request or implementation

Comments

@kateinoigakukun
Copy link
Member

Motivation

Currently, we have no way to mark Clang-imported declarations with arbitrary Swift attributes with APINotes files. For example, it can be problematic when migrating to strict concurrency model because we can't add concurrency related markers without modifying system header files.

Proposed solution

Add SwiftAttr field to APINotes like below

Name: SwiftWASILibc
Globals:
- Name: errno
  SwiftAttr: ["nonisolated(unsafe)"]

Alternatives considered

No response

Additional information

No response

@kateinoigakukun kateinoigakukun added feature A feature request or implementation triage needed This issue needs more specific labels clang importer Area → compiler: The clang importer and removed triage needed This issue needs more specific labels labels Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang importer Area → compiler: The clang importer feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

1 participant