tbaederr wrote: Not sure if the `TextDiagnosticPrinter` should create the formatted stream from the `raw_ostream` or the `TextDiagnostic`. There is a unittest that passes `llvm::errs()` to the `TextDiagnostic` ctor directly. https://github.com/llvm/llvm-project/pull/164935