mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -147,6 +147,13 @@ static void validateArgs(DiagnosticEngine &diags, const ArgList &Args) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for conflicting warning control flags
|
||||
if (Args.hasArg(options::OPT_suppress_warnings) &&
|
||||
Args.hasArg(options::OPT_warnings_as_errors)) {
|
||||
diags.diagnose(SourceLoc(), diag::error_conflicting_options,
|
||||
"-warnings-as-errors", "-suppress-warnings");
|
||||
}
|
||||
}
|
||||
|
||||
static void computeArgsHash(SmallString<32> &out, const DerivedArgList &args) {
|
||||
|
||||
Reference in New Issue
Block a user