[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:
Anthony Latsis
2025-05-04 05:36:10 +01:00
parent 6bbd19a3bd
commit 8a14528728
25 changed files with 434 additions and 1051 deletions

View File

@@ -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)) {