Sirraide wrote: Actually, we could also just put it in `SourceManager` because that already has a reference to the `DiagnosticsEngine` and then a single `getNameForDiagnostic(StringRef Filename)` function would do. https://github.com/llvm/llvm-project/pull/143520