mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] -suppress-warnings and -warnings-as-errors flags
Exposes the global warning suppression and treatment as errors functionality to the Swift driver. Introduces the flags "-suppress-warnings" and "-warnings-as-errors". Test case include.
This commit is contained in:
@@ -922,6 +922,11 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
Args.hasArg(OPT_show_diagnostics_after_fatal);
|
||||
Opts.UseColor |= Args.hasArg(OPT_color_diagnostics);
|
||||
Opts.FixitCodeForAllDiagnostics |= Args.hasArg(OPT_fixit_all);
|
||||
Opts.SuppressWarnings |= Args.hasArg(OPT_suppress_warnings);
|
||||
Opts.WarningsAsErrors |= Args.hasArg(OPT_warnings_as_errors);
|
||||
|
||||
assert(!(Opts.WarningsAsErrors && Opts.SuppressWarnings) &&
|
||||
"conflicting arguments; should of been caught by driver");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user