Skip to content

Commit

Permalink
Allow --Wdisable to take precedence over --Werror for warning messages
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Cripps <kyle@pensando.io>
  • Loading branch information
kfcripps committed Sep 3, 2024
1 parent 3306162 commit dbd20a5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/error_reporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ class ErrorReporter {
/// @return the action to take for the given diagnostic, falling back to the
/// default action if it wasn't overridden via the command line or a pragma.
DiagnosticAction getDiagnosticAction(cstring diagnostic, DiagnosticAction defaultAction) {
// Actions for errors can never be overridden.
if (defaultAction == DiagnosticAction::Error) return defaultAction;
auto it = diagnosticActions.find(diagnostic);
if (it != diagnosticActions.end()) return it->second;
// if we're dealing with warnings and they have been globally modified
Expand Down

0 comments on commit dbd20a5

Please sign in to comment.