Always promote warn_falloff_nonvoid_function
to error
This diagnostic should always be promoted to error, regardless of the ignoring state in `FilteringDiagConsumer`. This fixes the SourceCall/ErrorMacro.C test. The failure became visible after merging https://github.com/root-project/root/pull/12654, given that `IgnorePromptDiags` now defaults to 0 in `makeDefaultCompilationOptions()`.
This commit is contained in:
parent
5ca904dabd
commit
ef943ddcfa
@ -162,15 +162,15 @@ namespace {
|
||||
|
||||
void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
|
||||
const Diagnostic &Info) override {
|
||||
if (Info.getID() == diag::warn_falloff_nonvoid_function) {
|
||||
DiagLevel = DiagnosticsEngine::Error;
|
||||
}
|
||||
if (Ignoring()) {
|
||||
if (Info.getID() == diag::warn_unused_expr
|
||||
|| Info.getID() == diag::warn_unused_result
|
||||
|| Info.getID() == diag::warn_unused_call
|
||||
|| Info.getID() == diag::warn_unused_comparison)
|
||||
return; // ignore!
|
||||
if (Info.getID() == diag::warn_falloff_nonvoid_function) {
|
||||
DiagLevel = DiagnosticsEngine::Error;
|
||||
}
|
||||
if (Info.getID() == diag::ext_return_has_expr) {
|
||||
// An error that we need to suppress.
|
||||
auto Diags = const_cast<DiagnosticsEngine*>(Info.getDiags());
|
||||
|
Loading…
Reference in New Issue
Block a user