Commit Graph

7 Commits

Author SHA1 Message Date
Allan Shortlidge
aeb5a46d9e AST: Emit warnings for redundant availability checks in custom domains. 2025-07-18 13:27:08 -07:00
Allan Shortlidge
02dcd5d8cf AST/Sema: Sink AvailabilityScopeBuilder from Sema to AST. 2025-03-15 23:47:29 -07:00
Allan Shortlidge
5bccbe567d AST: Refactor AvailabilityScope::getAvailabilityConditionVersionSourceRange().
Modify it to take an `AvailabilityDomain` and a `DeclContext` which will be
necessary in order to compare `AvailabilitySpec`s in a later refactor.
2025-02-23 10:53:06 -08:00
Allan Shortlidge
1ff1a8d7bc AST: Store the active DeclContext in AvailabilityScope.
In the future, the `DeclContext` for a given scope will be needed as an input
in order to query for the `AvailabilityDomain` associated with an
`AvailabilitySpec`.
2025-02-20 08:57:45 -08:00
Allan Shortlidge
06443b9669 AST: Refactor AvailabilityDomain to prepare for external definitions.
Represent an AvailabilityDomain as a pointer union where one member of the
union is inline storage for built-in domains with known requirements and the
other member of the union is a pointer to an externally allocated domain
definition.

NFC.
2025-01-13 22:11:22 -08:00
Allan Shortlidge
d0f63a0753 AST: Split Availability.h into multiple headers.
Put AvailabilityRange into its own header with very few dependencies so that it
can be included freely in other headers that need to use it as a complete type.

NFC.
2025-01-03 18:36:04 -08:00
Allan Shortlidge
239720897a AST: Rename TypeRefinementContext to AvailabilityScope. 2024-11-12 11:34:25 -08:00