tbaederr wrote: There is also https://github.com/llvm/llvm-project/blob/028bfa255e90581d1c08237a66c20b25096277e8/clang/lib/Frontend/TextDiagnostic.cpp#L1062-L1068 which _seems_ like a much simpler implementation. https://github.com/llvm/llvm-project/pull/165479