Sirraide wrote: > The downside to it being in `TextDiagnostic` is that consumers then all have > to normalize the path themselves (some file system APIs on some systems are > better about relative paths than others). If the paths are always equivalent, > it might be kinder to pass the resolved path. WDYT?
I mean, that’s also true I suppose; the only thing is then that we’d be normalising them twice if `-fdiagnostics-absolute-paths` is passed—unless we move the handling for that elsewhere as well, but now that’s dependent on the diagnostic options, so it probably shouldn’t be in `FileManager`—which leaves `DiagnosticsEngine`? But consumers don’t generally have access to the `DiagnosticsEngine`, so it’d have to be in the `FileManager` after all. I guess we could *always* compute both the absolute and the ‘short’ path for a file whenever `FileManager` opens one so that they’re always available. But that might have some impact on performance (though I guess this is a `perf/` branch already so we can try and see how it goes)? @AaronBallman Thoughts? https://github.com/llvm/llvm-project/pull/143520 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits