Merge pull request #70784 from tshortli/swift3-no-more

Remove `-enable-swift3-objc-inference`
This commit is contained in:
Allan Shortlidge
2024-01-12 17:05:53 -08:00
committed by GitHub
34 changed files with 200 additions and 884 deletions

View File

@@ -899,10 +899,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");
@@ -963,17 +959,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");