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:
Devin Coughlin
2015-04-14 06:44:01 +00:00
parent de1917b597
commit d08b98b1ca
28 changed files with 178 additions and 158 deletions

View File

@@ -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);