[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 09:37:11 PDT 2024


================
@@ -131,12 +137,55 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) {
   return llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
 }
 
+void GetAssetFiles(clang::doc::ClangDocContext &CDCtx) {
+  std::error_code Code;
+  for (auto DirIt = llvm::sys::fs::directory_iterator(
+                std::string(UserAssetPath), Code),
+            dir_end = llvm::sys::fs::directory_iterator();
----------------
ilovepi wrote:

I'd probably initialize this the way other parts of the codebase do. see  https://github.com/llvm/llvm-project/blob/374f6554c3e409e4b9b5fd0ec90c5272768f5ab9/clang/lib/Lex/HeaderSearch.cpp#L1951 for a typical example.

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


More information about the cfe-commits mailing list