Merge pull request #68009 from tshortli/deprecate-warn-on-potentially-unavailable-enum-case

Frontend: Deprecate -warn-on-potentially-unavailable-enum-case option
This commit is contained in:
Allan Shortlidge
2023-08-18 12:37:46 -07:00
committed by GitHub
7 changed files with 9 additions and 17 deletions

View File

@@ -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,