[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Thu May 29 09:27:40 PDT 2025


================
@@ -284,10 +284,7 @@ Example usage for a project using a compile commands database:
       {UserStylesheets.begin(), UserStylesheets.end()}};
 
   if (Format == "html") {
-    if (auto Err = getHtmlAssetFiles(argv[0], CDCtx)) {
-      llvm::errs() << toString(std::move(Err)) << "\n";
-      return 1;
-    }
+    ExitOnErr(getHtmlAssetFiles(argv[0], CDCtx));
   }
----------------
ilovepi wrote:

I think you may need to rebase your patch, since we've landed experimental `mustache` support. There should be a similar `if (format == "mustache")` section if you look at the current main.

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


More information about the cfe-commits mailing list