mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user