mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add -verify-apply-fixes to accompany -verify.
Enables Chris's auto-apply-fixes mode for -verify: if an expected-* annotation has the wrong message, or if the expected fix-its are incorrect, this option will **edit the original file** to update them. This is a tool for compiler developers only; it doesn't affect normal diagnostic printing or normal fix-its.
This commit is contained in:
@@ -981,7 +981,10 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
DiagnosticEngine &Diags) {
|
||||
using namespace options;
|
||||
|
||||
Opts.VerifyDiagnostics |= Args.hasArg(OPT_verify);
|
||||
if (Args.hasArg(OPT_verify))
|
||||
Opts.VerifyMode = DiagnosticOptions::Verify;
|
||||
if (Args.hasArg(OPT_verify_apply_fixes))
|
||||
Opts.VerifyMode = DiagnosticOptions::VerifyAndApplyFixes;
|
||||
Opts.SkipDiagnosticPasses |= Args.hasArg(OPT_disable_diagnostic_passes);
|
||||
Opts.ShowDiagnosticsAfterFatalError |=
|
||||
Args.hasArg(OPT_show_diagnostics_after_fatal);
|
||||
|
||||
Reference in New Issue
Block a user