[all-commits] [llvm/llvm-project] 207cbb: DiagnosticHandler: refactor error checking (#75889)

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Dec 19 21:51:40 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 207cbbd71009090768c63004b967eddfab0f1d2e
      https://github.com/llvm/llvm-project/commit/207cbbd71009090768c63004b967eddfab0f1d2e
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
    M clang/lib/CodeGen/CodeGenAction.cpp
    M llvm/lib/IR/LLVMContext.cpp
    M llvm/tools/llc/llc.cpp

  Log Message:
  -----------
  DiagnosticHandler: refactor error checking (#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
`DiagnosticHandler::handleDiagnostics`, but all derived
`handleDiagnostics` would have to call the base function.




More information about the All-commits mailing list