Skip to content

Support __swift_attr__ to APINotes #75819

Open
@kateinoigakukun

Description

@kateinoigakukun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang importerArea → compiler: The clang importerfeatureA feature request or implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions