Merge pull request #84723 from j-hui/suppress-notes

[Diagnostics] Add -suppress-notes flag
This commit is contained in:
John Hui
2025-10-07 11:18:22 -07:00
committed by GitHub
7 changed files with 39 additions and 2 deletions

View File

@@ -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);
}