[clang-tools-extra] [clang-doc] Add a Mustache Markdown generator (PR #177221)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 11:55:11 PST 2026


================
@@ -814,9 +888,12 @@ static Error serializeIndex(const ClangDocContext &CDCtx, StringRef RootDir) {
   for (auto &Idx : IndexCopy.Children) {
     if (Idx.Children.empty())
       continue;
-    std::string TypeStr = infoTypeToString(Idx.RefType);
     json::Value IdxVal = Object();
     auto &IdxObj = *IdxVal.getAsObject();
+    auto TypeStr = infoTypeToString(Idx.RefType);
+    if (Markdown)
+      TypeStr.at(0) = toUppercase(TypeStr.at(0));
+    IdxObj["Type"] = TypeStr;
----------------
ilovepi wrote:

Can we just assign to the json and manipulate that? its minor, but it would avoid a copy.

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


More information about the cfe-commits mailing list