Skip to content

Conversation

tshortli
Copy link
Contributor

Teach Sema to diagnose the access level, exportability, and availability of availability domains that are referenced by @available attributes and if #available statements.

Resolves rdar://159147207.

…ecker.

This allows the `ExportContext` that is pre-computed for availability checking
to be reused when checking attached macro availability. Also, it just makes
more sense.

NFC.
@tshortli tshortli force-pushed the custom-availability-domain-access-checking branch from a705816 to cf03f04 Compare August 26, 2025 05:31
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli requested a review from xymus August 26, 2025 05:31
…queries.

When emitting statement diagnostics for `if #available` queries, diagnose the
availability of the decls representing the referenced availability domains.
Among other things, this checks that the domains are sufficiently visible to be
used in the containing function body context.
…omains.

Teach Sema to diagnose the access level, exportability, and availability of
availability domains that are referenced by `@available` attributes and
`if #available` statements.

Resolves rdar://159147207.
@tshortli tshortli force-pushed the custom-availability-domain-access-checking branch from cf03f04 to 0b5d510 Compare August 26, 2025 15:20
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli enabled auto-merge August 26, 2025 17:58
@tshortli tshortli merged commit ee4fd56 into swiftlang:main Aug 26, 2025
3 checks passed
@tshortli tshortli deleted the custom-availability-domain-access-checking branch August 26, 2025 21:01
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.

2 participants