================
@@ -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");
   }
   return llvm::Error::success();
 }
 
 llvm::Error HTMLGenerator::createResources(ClangDocContext &CDCtx) {
-  auto Err = SerializeIndex(CDCtx);
-  if (Err)
+  if (auto Err = SerializeIndex(CDCtx)) {
     return Err;
-  Err = GenIndex(CDCtx);
-  if (Err)
+  }
+
+  if (auto Err = GenIndex(CDCtx)) {
     return Err;
+  }
 
   for (const auto &FilePath : CDCtx.UserStylesheets) {
-    Err = CopyFile(FilePath, CDCtx.OutDirectory);
-    if (Err)
+    if (auto Err = CopyFile(FilePath, CDCtx.OutDirectory)) {
       return Err;
+    }
   }
+
   for (const auto &FilePath : CDCtx.FilesToCopy) {
-    Err = CopyFile(FilePath, CDCtx.OutDirectory);
-    if (Err)
+    if (auto Err = CopyFile(FilePath, CDCtx.OutDirectory)) {
       return Err;
+    }
   }
+
----------------
ilovepi wrote:

nit: Try to avoid unrelated white space chagnes. If your editor inserts these 
automatically, you may need to update your config. Also `git clang-format 
HEAD~` is your friend, but do be sure to use an up-to-date `clang-format`.

https://github.com/llvm/llvm-project/pull/93276
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to