mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: Deprecate -warn-on-potentially-unavailable-enum-case option.
When `-warn-on-potentially-unavailable-enum-case` was introduced, the build system was required to invoke `swift-frontend` at artificially low deployment targets when emitting `.swiftinterface` files for legacy architectures. Because the deployment target was low, some availability diagnostics needed to be de-fanged in order to allow module interface emission to succeed. Today, the build system is able to use the correct deployment target when emitting module interfaces and the `-warn-on-potentially-unavailable-enum-case` is superfluous, so deprecate it. Resolves rdar://114092047
This commit is contained in:
@@ -642,6 +642,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
if (Args.hasArg(OPT_check_api_availability_only))
|
||||
Diags.diagnose(SourceLoc(), diag::warn_flag_deprecated,
|
||||
"-check-api-availability-only");
|
||||
if (Args.hasArg(OPT_warn_on_potentially_unavailable_enum_case))
|
||||
Diags.diagnose(SourceLoc(), diag::warn_flag_deprecated,
|
||||
"-warn-on-potentially-unavailable-enum-case");
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_unavailable_decl_optimization_EQ)) {
|
||||
auto value =
|
||||
@@ -667,8 +670,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
= A->getOption().matches(OPT_enable_conformance_availability_errors);
|
||||
}
|
||||
|
||||
Opts.WarnOnPotentiallyUnavailableEnumCase |=
|
||||
Args.hasArg(OPT_warn_on_potentially_unavailable_enum_case);
|
||||
Opts.WarnOnEditorPlaceholder |= Args.hasArg(OPT_warn_on_editor_placeholder);
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_disable_typo_correction,
|
||||
|
||||
Reference in New Issue
Block a user