rnk added a comment.

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.

If the consequences are mostly that diagnostics and  `__FILE__`  in such a case 
refer to non-existent files, I can live with that, it's just a moderate 
reduction in usability for what seems like unreasonable usage.

I have also wanted to do slash canonicalization at this exact point, to respect 
the user setting.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121733

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to