Commit Graph

4 Commits

Author SHA1 Message Date
Allan Shortlidge
ac8aec32ea Sema: Correct the decl kind in a resilience diagnostic.
Not everything is a type, type checker.
2024-10-26 09:26:39 -07:00
Allan Shortlidge
f4b79594a8 Tests: Fix and re-enable @_spi_available tests
The main issue was that the tests specified `-library-level=api` in
`swift-frontend` invocations instead of `-library-level api`. The former seems
to have no effect and therefore expected diagnostics were not being emitted.

Additional clean up:
- Make every test require `OS=macosx` for ease of local testing.
- Avoid unnecessarily specifying target arches (this makes tests slow).
- Add missing `FileCheck` invocation.
- Add some missing test coverage.

Resolves rdar://91325474
2023-03-29 14:45:22 -07:00
Xi Ge
4f9cfd3a4f sema: diagnose @_spi_available on all platforms
@_spi_available should only be used when the symbol is publically available in some deployment
platforms, otherwise we should use @_spi.
2022-09-07 13:20:50 -07:00
Xi Ge
3786a8ceb9 sema: consider decl context with @_spi_available as an SPI export context
This allows chained invocations of multiple @_spi_available decls.

rdar://97748740
2022-07-28 16:05:35 -07:00