mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #84723 from j-hui/suppress-notes
[Diagnostics] Add -suppress-notes flag
This commit is contained in:
@@ -2653,6 +2653,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
}
|
||||
|
||||
Opts.SuppressWarnings |= Args.hasArg(OPT_suppress_warnings);
|
||||
Opts.SuppressNotes |= Args.hasArg(OPT_suppress_notes);
|
||||
Opts.SuppressRemarks |= Args.hasArg(OPT_suppress_remarks);
|
||||
for (const Arg *arg : Args.filtered(OPT_warning_treating_Group)) {
|
||||
Opts.WarningsAsErrorsRules.push_back([&] {
|
||||
@@ -2733,6 +2734,9 @@ static void configureDiagnosticEngine(
|
||||
if (Options.SuppressWarnings) {
|
||||
Diagnostics.setSuppressWarnings(true);
|
||||
}
|
||||
if (Options.SuppressNotes) {
|
||||
Diagnostics.setSuppressNotes(true);
|
||||
}
|
||||
if (Options.SuppressRemarks) {
|
||||
Diagnostics.setSuppressRemarks(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user