mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[6.2] Cherry-pick "Frontend: Obsolete -fixit-all and -emit-fixits-path"
With `ARCMigrate` and `arcmt-test` removed from clang in https://github.com/llvm/llvm-project/pull/119269 and the new code migration experience under way (see https://github.com/swiftlang/swift-evolution/pull/2673), these options are no longer relevant nor known to be in use. They were introduced long ago to support fix-it application in Xcode. For now, turn them into a no-op and emit a obsoletion warning. (cherry picked from commit 46c394788a84d5932289c71274dd32ea2d61d9dc)
This commit is contained in:
@@ -2550,7 +2550,20 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
Opts.EmitMacroExpansionFiles = !negated;
|
||||
}
|
||||
|
||||
Opts.FixitCodeForAllDiagnostics |= Args.hasArg(OPT_fixit_all);
|
||||
{
|
||||
OptSpecifier obsoleteOpts[] = {
|
||||
OPT_fixit_all,
|
||||
OPT_emit_fixits_path,
|
||||
};
|
||||
|
||||
for (auto option: obsoleteOpts) {
|
||||
if (auto *arg = Args.getLastArg(option)) {
|
||||
Diags.diagnose(SourceLoc(), diag::ignoring_option_obsolete,
|
||||
arg->getOption().getPrefixedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Opts.SuppressWarnings |= Args.hasArg(OPT_suppress_warnings);
|
||||
Opts.SuppressRemarks |= Args.hasArg(OPT_suppress_remarks);
|
||||
for (const Arg *arg : Args.filtered(OPT_warning_treating_Group)) {
|
||||
|
||||
Reference in New Issue
Block a user