[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-19 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. lgtm 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

[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-19 Thread Teresa Johnson via cfe-commits
@@ -256,10 +256,13 @@ void LLVMContext::diagnose(const DiagnosticInfo ) { RS->emit(*OptDiagBase); // If there is a report handler, use it. - if (pImpl->DiagHandler && - (!pImpl->RespectDiagnosticFilters || isDiagnosticEnabled(DI)) && -

[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-19 Thread Fangrui Song via cfe-commits
@@ -256,10 +256,13 @@ void LLVMContext::diagnose(const DiagnosticInfo ) { RS->emit(*OptDiagBase); // If there is a report handler, use it. - if (pImpl->DiagHandler && - (!pImpl->RespectDiagnosticFilters || isDiagnosticEnabled(DI)) && -

[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-18 Thread Fangrui Song via cfe-commits
@@ -256,10 +256,13 @@ void LLVMContext::diagnose(const DiagnosticInfo ) { RS->emit(*OptDiagBase); // If there is a report handler, use it. - if (pImpl->DiagHandler && - (!pImpl->RespectDiagnosticFilters || isDiagnosticEnabled(DI)) && -

[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes In LLVMContext::diagnose, set `HasErrors` for `DS_Error` so that all derived `DiagnosticHandler` have correct `HasErrors` information. An alternative is to set `HasErrors` in

[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Fangrui Song (MaskRay) Changes In LLVMContext::diagnose, set `HasErrors` for `DS_Error` so that all derived `DiagnosticHandler` have correct `HasErrors` information. An alternative is to set `HasErrors` in

[llvm] [clang] DiagnosticHandler: refactor error checking (PR #75889)

2023-12-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/75889 In LLVMContext::diagnose, set `HasErrors` for `DS_Error` so that all derived `DiagnosticHandler` have correct `HasErrors` information. An alternative is to set `HasErrors` in