mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Turn on availability checking by default
Enable checking for uses of potentially unavailable APIs. There is a frontend option to disable it: -disable-availability-checking. This commit updates the SDK overlays with @availability() annotations for the declarations where the overlay refers to potentially unavailable APIs. It also changes several tests that refer to potentially unavailable APIs to use either #available() or @availability annotations. Swift SVN r27272
This commit is contained in:
@@ -607,8 +607,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableExperimentalPatterns |= Args.hasArg(OPT_enable_experimental_patterns);
|
||||
|
||||
Opts.EnableExperimentalAvailabilityChecking |=
|
||||
Args.hasArg(OPT_enable_experimental_availability_checking);
|
||||
Opts.DisableAvailabilityChecking |=
|
||||
Args.hasArg(OPT_disable_availability_checking);
|
||||
|
||||
Opts.EnableExperimentalUnavailableAsOptional |=
|
||||
Args.hasArg(OPT_enable_experimental_unavailable_as_optional);
|
||||
|
||||
Reference in New Issue
Block a user