[clang-tools-extra] Clang doc async (PR #93276)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri May 24 10:11:40 PDT 2024


================
@@ -1049,31 +1047,33 @@ static llvm::Error CopyFile(StringRef FilePath, StringRef OutDirectory) {
   std::error_code FileErr = llvm::sys::fs::copy_file(PathRead, PathWrite);
   if (FileErr != OK) {
     return llvm::createStringError(llvm::inconvertibleErrorCode(),
-                                   "error creating file " +
-                                       llvm::sys::path::filename(FilePath) +
-                                       ": " + FileErr.message() + "\n");
+                                   "error creating file " + FilePath + ": " +
+                                       FileErr.message() + "\n");
----------------
ilovepi wrote:

I'm a little unclear on why we're not using the `llvm::sys::path` here anymore? Is `FilePath` actually a `URL` or something equivalent that isn't platform dependent? For example, if it's a real file system path, I'd worry that things like the `/` would be wrong if this was Windows vs. Linux. 


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


More information about the cfe-commits mailing list