[clang] [clang] Simplify usage of FileManager::makeAbsolutePath (PR #182360)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 19 12:49:03 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);
----------------
cyndyishida wrote:

What I'll do in this case is forward the FileManager doc to `remove_dots` & update that one. My opinion comes from wanting to avoid duplicate information that can go out of sync. 

https://github.com/llvm/llvm-project/pull/182360


More information about the cfe-commits mailing list