Commit Graph

10 Commits

Author SHA1 Message Date
Allan Shortlidge
7dc313f1be NFC: Fix tests that mistakenly rely on unavailable stored properties.
Preparation for rdar://107449845
2023-04-04 08:52:39 -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
d4a5cb2e71 [Sema|Tests] Update users of library-level=api to expect new diagnostics 2022-09-14 17:00:05 -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
Xi Ge
e0d7a3ec93 sema: allow unavailable context to refer SPI-available decls
Decls with @_spi_available aren't hidden entirely from public interfaces,
thus public interfaces may still refer to them. Be forgiving for such cases so public
interfaces can compile.

rdar://90938725
2022-03-28 22:49:33 -07:00
Xi Ge
9220f7716c test: redirect existing clang importer tests to test the new mechanism 2022-03-05 11:36:06 -08:00
Xi Ge
a4b4b1fa65 ClangImporter: don't import clang SPI attributes by default 2021-09-28 10:46:27 -07:00
Xi Ge
f2c868db5c ClangImporter: import SPIs from underlying clang modules by default
rdar://82822440
2021-09-09 15:22:15 -07:00
Xi Ge
36f25c3130 ClangImporter: teach clang importer to import Clang SPI symbols and model them similarly as Swift SPIs
For clang symbols marked with SPI_AVAILABLE, we add SPIAccessControlAttr to them so they will be
considered as SPIs in the AST. To be able to use all these symbols, we also add an implicit SPI import
statement for all clang modules. All clang SPIs belong to the same SPI group named "OBJC_DEFUALT_SPI_GROUP" because clang
currently doesn't support custom SPI group.

rdar://73902734
2021-08-28 11:11:09 -07:00