mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Allow additional files for diagnostic verifier
This change adds a frontend flag, -verify-additional-file, which can be used to pass extra files directly to the diagnostic verifier. These files are not otherwise considered to be Swift source files; they are not compiled or even properly parsed. This feature can be used to verify diagnostics emitted in non-source files, such as in module interfaces or header files.
This commit is contained in:
committed by
Alexis Laferrière
parent
ba00258c66
commit
5036a55550
@@ -957,6 +957,9 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
Opts.ShowDiagnosticsAfterFatalError |=
|
||||
Args.hasArg(OPT_show_diagnostics_after_fatal);
|
||||
|
||||
for (Arg *A : Args.filtered(OPT_verify_additional_file))
|
||||
Opts.AdditionalVerifierFiles.push_back(A->getValue());
|
||||
|
||||
Opts.UseColor |=
|
||||
Args.hasFlag(OPT_color_diagnostics,
|
||||
OPT_no_color_diagnostics,
|
||||
|
||||
Reference in New Issue
Block a user