AaronBallman wrote:

> I don’t think we want to canonicalise _all_ paths though because e.g. 
> `src/foo.cc` is less noisy than e.g. 
> `/home/username/projects/whatever/src/foo.cc`

Sure, but I was thinking more that we do want to canonicalize paths like 
`blah\src/foo.cc` to `blah\src\foo.cc` on Windows. so there are consistent 
Windows path separators being used. Perhaps my use of "canonicalize" isn't 
right. :-) 

> The point of this change imo (at least this was my original motivation), is 
> to avoid printing excessively convoluted file paths, which is also why I 
> originally added a check to use whichever path ends up being shorter (before 
> or after canonicalisation).

Agreed; I mostly was suggesting that whatever path ends up being shorter, it 
would still be nice to ensure the path printed out uses consistent separators 
(so the length stays the same, it's just a more natural-looking way to express 
the file for that particular file system).

https://github.com/llvm/llvm-project/pull/148745
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to