================ @@ -256,10 +256,13 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) { RS->emit(*OptDiagBase); // If there is a report handler, use it. - if (pImpl->DiagHandler && - (!pImpl->RespectDiagnosticFilters || isDiagnosticEnabled(DI)) && - pImpl->DiagHandler->handleDiagnostics(DI)) - return; + if (pImpl->DiagHandler) { + if (DI.getSeverity() == DS_Error) + pImpl->DiagHandler->HasErrors = true; ---------------- MaskRay wrote:
> Also, should this be set when handleDiagnostics is not called? The `RespectDiagnosticFilters` condition is here to suppress remarks for legacy LTOCodeGenerator (test: `llvm/test/LTO/X86/diagnostic-handler-remarks.ll`). It's not used for errors. I think conveying the `HasErrors` bit seems more useful, although the client does not use this information. https://github.com/llvm/llvm-project/pull/75889 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits