================ @@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true if the path was changed. static bool cleanPathForOutput(FileManager &FileMgr, SmallVectorImpl<char> &Path) { bool Changed = FileMgr.makeAbsolutePath(Path); - return Changed | llvm::sys::path::remove_dots(Path); + return Changed | llvm::sys::path::remove_dots(Path, true); ---------------- sheredom wrote:
Added https://github.com/llvm/llvm-project/pull/106577/files#diff-3056397628ccde0c171064fdbedcdf91ff1ae3691f8dd1133150fc2cebf92277R11 which actually uncovered a bug in the impl and fixed that too (was reusing `PathStr` wrongly). https://github.com/llvm/llvm-project/pull/106577 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits