Remove support for Swift 3 @objc inference.

Obsolete the `-enable-swift3-objc-inference` option and related options by
removing support for inferring `@objc` attributes using Swift 3 rules.
Automated migration from Swift 3 has not been supported by the compiler for
many years.
This commit is contained in:
Allan Shortlidge
2024-01-08 12:04:04 -08:00
parent 3e16fa4e7e
commit e5c6bb649c
23 changed files with 17 additions and 634 deletions

View File

@@ -917,10 +917,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.EnableAppExtensionRestrictions |= Args.hasArg(OPT_enable_app_extension);
Opts.EnableAppExtensionRestrictions |= Opts.EnableAppExtensionLibraryRestrictions;
Opts.EnableSwift3ObjCInference =
Args.hasFlag(OPT_enable_swift3_objc_inference,
OPT_disable_swift3_objc_inference, false);
if (Args.hasArg(OPT_enable_swift3_objc_inference))
Diags.diagnose(SourceLoc(), diag::warn_flag_deprecated,
"-enable-swift3-objc-inference");
@@ -981,17 +977,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.EnableSPIOnlyImports = Args.hasArg(OPT_experimental_spi_only_imports);
if (Opts.EnableSwift3ObjCInference) {
if (const Arg *A = Args.getLastArg(
OPT_warn_swift3_objc_inference_minimal,
OPT_warn_swift3_objc_inference_complete)) {
if (A->getOption().getID() == OPT_warn_swift3_objc_inference_minimal)
Opts.WarnSwift3ObjCInference = Swift3ObjCInferenceWarnings::Minimal;
else
Opts.WarnSwift3ObjCInference = Swift3ObjCInferenceWarnings::Complete;
}
}
if (Args.hasArg(OPT_warn_swift3_objc_inference_minimal))
Diags.diagnose(SourceLoc(), diag::warn_flag_deprecated,
"-warn-swift3-objc-inference-minimal");