Commit Graph

5 Commits

Author SHA1 Message Date
Slava Pestov
b73adbe700 Driver: Actually pass -require-explicit-availability{,-target} to frontend jobs
Unless you do this, the flag has no effect when used with the driver;
it only worked in conjunction with -Xfrontend.

Noticed while working on <rdar://problem/58490723>.
2020-01-13 21:50:10 -05:00
Slava Pestov
3abf47a191 Sema: Improve -require-explicit-availability diagnostic phrasing 2020-01-13 21:49:51 -05:00
Alexis Laferrière
c84e9df307 Frontend: -require-explicit-availability should not warn if marked unavailable 2019-08-14 13:01:07 -07:00
Ben Langmuir
0f0ad8cc0e Attempt to fix attr/require_explicit_availability test on non-mac
There was an unepxected warning because of mixing iOS and mac flags.
2019-06-17 17:21:28 -07:00
Alexis Laferrière
c44cff7c97 Add a CLI option to warn when a public decl has no availability
Add the command line option -require-explicit-availability to detect public
or `@usableFromInline` declarations and warn if they don't declare
an introduction OS version. This option should catch forgotten `@available`
attributes in frameworks where all services are expected to be introduced
by an OS version.

The option -require-explicit-availability-target "macOS 10.14, iOS 12.0"
can be specified for the compiler to suggest fix-its with the missing
attributes `@available(macOS 10.14, iOS 12.0, *)`.

rdar://51001662
2019-06-17 10:32:58 -07:00