The function promises to canonicalize the path, but neglected to do so
for the root component.
For example, calling remove_dots("/tmp/foo.c", Style::windows_backslash)
resulted in "/tmp\foo.c". Now it produces "\tmp\foo.c".
Also fix FIXME in the corresponding test.
Also fix PCHPreambleTest -- it canonicalized Path on insertion, but not
on lookup.
Also fix InMemoryFileSystemTest -- creating "same" filesystem should
match path normalization.
Also fix ProxyFileSystemTest on Win/x64 -- "/" is no longer expected.
Clean "./" from FILE expansion.
This is alternative to https://reviews.llvm.org/D121733
and helps with Clang header modules in which FILE
may expand to "./foo.h" or "foo.h" depending on whether the file was
included directly or not.
Only do this when UseTargetPathSeparator is true, as we are already
changing the path in that case.