mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[DiagnosticVerifier] Add -verify-ignore-unrelated flag
This adds the implementation required for later changing the default behaviour of the -verify flag to error when diagnostics are emitted in buffers other than the main file and files added with -verify-additional-file. To keep the current behaviour, use the flag -verify-ignore-unrelated. This flag is added as a no-op so that tests can start using it before the new behaviour is enabled by default.
This commit is contained in:
@@ -2588,6 +2588,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
if (Args.hasArg(OPT_verify_apply_fixes))
|
||||
Opts.VerifyMode = DiagnosticOptions::VerifyAndApplyFixes;
|
||||
Opts.VerifyIgnoreUnknown |= Args.hasArg(OPT_verify_ignore_unknown);
|
||||
Opts.VerifyIgnoreUnrelated |= Args.hasArg(OPT_verify_ignore_unrelated);
|
||||
Opts.SkipDiagnosticPasses |= Args.hasArg(OPT_disable_diagnostic_passes);
|
||||
Opts.ShowDiagnosticsAfterFatalError |=
|
||||
Args.hasArg(OPT_show_diagnostics_after_fatal);
|
||||
|
||||
Reference in New Issue
Block a user