Commit Graph

10 Commits

Author SHA1 Message Date
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
Alexis Laferrière
7aff9c1bd0 [Sema|Tests] Update users of library-level=api to expect new diagnostics 2022-09-19 09:06:30 -07:00
Alexis Laferrière
4e3e07b241 Revert "[Sema|Tests] Update users of library-level=api to expect new diagnostics"
This reverts commit d4a5cb2e71.
2022-09-16 09:50:08 -07:00
Alexis Laferrière
1e40db1d4b Merge pull request #61105 from xymus/default-require-explicit-avail
[Sema] Require explicit availability on public modules and customizable diagnostics level
2022-09-15 11:05:12 -07:00
Alexis Laferrière
d4a5cb2e71 [Sema|Tests] Update users of library-level=api to expect new diagnostics 2022-09-14 17:00:05 -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
6b1f736f16 Availability: only diagnose exposing SPI_AVAILABLE symbols in modules with library-level=API
For executable targets or private libraries, using SPI_AVAILABLE symbols should be allowed.

rdar://91088241
2022-04-04 15:33:30 -07:00
Luciano Almeida
1e4563a9b6 [test] Restrict spi-available inline to macosx only 2022-03-28 21:35:50 -03:00
Luciano Almeida
11a66dc537 Make spi-available-inline test target dynamic 2022-03-27 19:46:32 -03:00
Xi Ge
e0fd8895aa test: add a test for using SPI in inlinable function body 2022-03-06 08:39:03 -08:00