Commit Graph

1 Commits

Author SHA1 Message Date
Allan Shortlidge
d8be24b395 Sema: Fix -disable-availability-checking.
Suppression of diagnostics about use of unavailable declarations in
equivalently unavailable contexts now relies on querying the
`TypeRefinementContext` hierarchy. Generation of the TypeRefinementContext tree
was suppressed when `-disable-availability-checking` was specified, though,
causing some unavailability diagnostics to be emitted when they ought to be
suppressed.

Instead of refusing to generate a `TypeRefinementContext` hierarchy, instead
just avoid populating nodes for `if #available` checks for OS versions since
these checks are meant to have no effect when `-disable-availability-checking`
is specified.

Resolves rdar://138987918.
2024-11-06 17:20:31 -08:00