[PATCH] D121733: Clean pathnames in FileManager.

Ben Barham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 16:00:03 PDT 2022


bnbarham added a comment.

In D121733#3393546 <https://reviews.llvm.org/D121733#3393546>, @rnk wrote:

> I've been somewhat afraid to touch this code because of symlinks. Is that something we need to worry about? Consider this path: root/symlink/../foo.h. remove_dots will turn this into root/foo.h, but if symlink points to some unrelated directory, the .. directory entry points to something other than root. I can't imagine that people rely on this behavior often, but I could be wrong.

`remove_dots` doesn't remove `..` by default, it needs to be passed `true` to do that. This is only removing `.`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121733/new/

https://reviews.llvm.org/D121733



More information about the cfe-commits mailing list