[clang] [clang] Simplify usage of FileManager::makeAbsolutePath (PR #182360)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 19 12:22:31 PST 2026
================
@@ -505,14 +492,18 @@ bool FileManager::fixupRelativePath(const FileSystemOptions &FileSystemOpts,
return true;
}
-bool FileManager::makeAbsolutePath(SmallVectorImpl<char> &Path) const {
+bool FileManager::makeAbsolutePath(SmallVectorImpl<char> &Path,
+ bool RemoveDots) const {
bool Changed = FixupRelativePath(Path);
if (!llvm::sys::path::is_absolute(StringRef(Path.data(), Path.size()))) {
FS->makeAbsolute(Path);
Changed = true;
}
+ if (RemoveDots)
+ Changed |= llvm::sys::path::remove_dots(Path);
----------------
jansvoboda11 wrote:
This also normalizes path separators. Should we at least mention that in the function documentation?
https://github.com/llvm/llvm-project/pull/182360
More information about the cfe-commits
mailing list