================ @@ -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:
This unfortunately exposes the detail of DiagnosticHandler, but the alternative (set HasErrors in `DiagnosticHandler::handleDiagnostics`) isn't better and a new client may forget to call the base. 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