[all-commits] [llvm/llvm-project] 4a7be3: [mlir] Add support for multi-parts diagnostics (#2...

lonely eagle via All-commits all-commits at lists.llvm.org
Wed Sep 23 20:10:34 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a7be3f275f2042e50ce80b66d7020bf84e3b09b
      https://github.com/llvm/llvm-project/commit/4a7be3f275f2042e50ce80b66d7020bf84e3b09b
  Author: lonely eagle <2020382038 at qq.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/Target/LLVMIR/ModuleImport.cpp
    A mlir/test/IR/diagnostic-handler-next.mlir
    M mlir/test/lib/IR/CMakeLists.txt
    A mlir/test/lib/IR/TestDiagnosticsNext.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir] Add support for multi-parts diagnostics (#217804)

Under the current MLIR diagnostic infrastructure, emitting multiple
remarks at the same location requires calling the remark API multiple
times; moreover, every call to remark prints a note. This PR introduces
the concepts of "parts" To diagnostics. A streaming manipulator, called
`next`, similar to `std::endl` can be used to split multiple parts into
a single `InFlightDiagnostic`. This can be used for example to emit
multiple remarks at the same location, share the notes for those
remarks.

---------

Co-authored-by: Mehdi Amini <joker.eph at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list