https://github.com/evelez7 created 
https://github.com/llvm/llvm-project/pull/171899

This adds a "homepage" so that a URL can point at `/` instead of needing
to land at `/GlobalNamespace/`. The index homepage just lists the
top-level namespaces. The idea is derived from the Markdown backend's index
file.

In the future, this could serve as a separate page for listing all
top-level entities. The "GlobalNamespace" index can be bypassed so that
we just ingest whatever children it has and list them instead, similar
to Doxygen's namespace page.

>From 5224012aef454f3cf7a9723754043c6bd2b5bff8 Mon Sep 17 00:00:00 2001
From: Erick Velez <[email protected]>
Date: Fri, 14 Nov 2025 21:43:34 -0800
Subject: [PATCH] [clang-doc] Add a top-level index.html page

This adds a "homepage" so that a URL can point at `/` instead of needing
to land at `/GlobalNamespace/`. The index homepage just lists the
top-level namespaces. The idea is derived from the Markdown backend's index
file.

In the future, this could serve as a separate page for listing all
top-level entities. The "GlobalNamespace" index can be bypassed so that
we just ingest whatever children it has and list them instead, similar
to Doxygen's namespace page.
---
 clang-tools-extra/clang-doc/Generators.cpp    |  4 ++
 clang-tools-extra/clang-doc/HTMLGenerator.cpp | 12 ++++
 clang-tools-extra/clang-doc/JSONGenerator.cpp | 55 +++++++++++++++-
 .../clang-doc/assets/index-template.mustache  | 41 ++++++++++++
 clang-tools-extra/clang-doc/support/Utils.cpp |  3 +
 .../clang-doc/tool/CMakeLists.txt             |  1 +
 clang-tools-extra/test/clang-doc/index.cpp    | 63 +++++++++++++++++++
 .../test/clang-doc/json/class-requires.cpp    |  1 -
 .../test/clang-doc/json/class.cpp             |  1 -
 .../clang-doc/json/compound-constraints.cpp   | 11 ----
 .../test/clang-doc/json/function-requires.cpp |  2 -
 .../test/clang-doc/json/namespace.cpp         |  1 -
 .../test/clang-doc/namespace.cpp              |  2 +-
 13 files changed, 179 insertions(+), 18 deletions(-)
 create mode 100644 clang-tools-extra/clang-doc/assets/index-template.mustache
 create mode 100644 clang-tools-extra/test/clang-doc/index.cpp

diff --git a/clang-tools-extra/clang-doc/Generators.cpp 
b/clang-tools-extra/clang-doc/Generators.cpp
index d6c1cc948ce30..fafe41eebb779 100644
--- a/clang-tools-extra/clang-doc/Generators.cpp
+++ b/clang-tools-extra/clang-doc/Generators.cpp
@@ -164,6 +164,10 @@ Error MustacheGenerator::generateDocumentation(
 
 Expected<std::string> MustacheGenerator::getInfoTypeStr(Object *Info,
                                                         StringRef Filename) {
+  // Checking for a USR ensures that only the special top-level index file is
+  // caught here, since it is not an Info.
+  if (Filename == "index" && !Info->get("USR"))
+    return "index";
   auto StrValue = (*Info)["InfoType"];
   if (StrValue.kind() != json::Value::Kind::String)
     return createStringError("JSON file '%s' does not contain key: 
'InfoType'.",
diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp 
b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
index 77b287476423e..3fc89311749ad 100644
--- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
@@ -29,6 +29,8 @@ static std::unique_ptr<MustacheTemplateFile> 
NamespaceTemplate = nullptr;
 
 static std::unique_ptr<MustacheTemplateFile> RecordTemplate = nullptr;
 
+static std::unique_ptr<MustacheTemplateFile> IndexTemplate = nullptr;
+
 class HTMLGenerator : public MustacheGenerator {
 public:
   static const char *Format;
@@ -60,6 +62,8 @@ Error HTMLGenerator::setupTemplateFiles(const ClangDocContext 
&CDCtx) {
       ConvertToNative(CDCtx.MustacheTemplates.lookup("namespace-template"));
   std::string ClassFilePath =
       ConvertToNative(CDCtx.MustacheTemplates.lookup("class-template"));
+  std::string IndexFilePath =
+      ConvertToNative(CDCtx.MustacheTemplates.lookup("index-template"));
   std::string CommentFilePath =
       ConvertToNative(CDCtx.MustacheTemplates.lookup("comment-template"));
   std::string FunctionFilePath =
@@ -83,6 +87,9 @@ Error HTMLGenerator::setupTemplateFiles(const ClangDocContext 
&CDCtx) {
   if (Error Err = setupTemplate(RecordTemplate, ClassFilePath, Partials))
     return Err;
 
+  if (Error Err = setupTemplate(IndexTemplate, IndexFilePath, Partials))
+    return Err;
+
   return Error::success();
 }
 
@@ -130,6 +137,11 @@ Error HTMLGenerator::generateDocForJSON(json::Value &JSON, 
raw_fd_ostream &OS,
       return Err;
     assert(RecordTemplate && "RecordTemplate is nullptr.");
     RecordTemplate->render(JSON, OS);
+  } else if (ObjTypeStr == "index") {
+    if (auto Err = setupTemplateResources(CDCtx, JSON, RelativeRootPath))
+      return Err;
+    assert(IndexTemplate && "IndexTemplate is nullptr.");
+    IndexTemplate->render(JSON, OS);
   }
   return Error::success();
 }
diff --git a/clang-tools-extra/clang-doc/JSONGenerator.cpp 
b/clang-tools-extra/clang-doc/JSONGenerator.cpp
index 83fa556782793..c90d39db42f55 100644
--- a/clang-tools-extra/clang-doc/JSONGenerator.cpp
+++ b/clang-tools-extra/clang-doc/JSONGenerator.cpp
@@ -318,7 +318,8 @@ serializeCommonAttributes(const Info &I, json::Object &Obj,
 }
 
 static void serializeReference(const Reference &Ref, Object &ReferenceObj) {
-  ReferenceObj["Path"] = Ref.Path;
+  if (!Ref.Path.empty())
+    ReferenceObj["Path"] = Ref.Path;
   ReferenceObj["Name"] = Ref.Name;
   ReferenceObj["QualName"] = Ref.QualName;
   ReferenceObj["USR"] = toHex(toStringRef(Ref.USR));
@@ -647,6 +648,55 @@ static SmallString<16> determineFileName(Info *I, 
SmallString<128> &Path) {
   return FileName;
 }
 
+// Creates a JSON file above the global namespace directory.
+// An index can be used to create the top-level HTML index page or the Markdown
+// index file.
+static Error serializeIndex(const ClangDocContext &CDCtx, StringRef RootDir) {
+  if (CDCtx.Idx.Children.empty())
+    return Error::success();
+
+  json::Value ObjVal = Object();
+  Object &Obj = *ObjVal.getAsObject();
+  if (!CDCtx.ProjectName.empty())
+    Obj["ProjectName"] = CDCtx.ProjectName;
+
+  auto IndexCopy = CDCtx.Idx;
+  IndexCopy.sort();
+  json::Value IndexArray = json::Array();
+  auto &IndexArrayRef = *IndexArray.getAsArray();
+
+  if (IndexCopy.Children.empty()) {
+    // If the index is empty, default to displaying the global namespace.
+    IndexCopy.Children.emplace_back(GlobalNamespaceID, "",
+                                    InfoType::IT_namespace, "GlobalNamespace");
+  } else {
+    IndexArrayRef.reserve(CDCtx.Idx.Children.size());
+  }
+
+  for (auto &Idx : IndexCopy.Children) {
+    if (!Idx.Children.empty()) {
+      std::string TypeStr = infoTypeToString(Idx.RefType);
+      // MD output expects a capitalized type string
+      TypeStr[0] = toUppercase(TypeStr[0]);
+      json::Value IdxVal = Object();
+      auto &IdxObj = *IdxVal.getAsObject();
+      serializeReference(Idx, IdxObj);
+      IndexArrayRef.push_back(IdxVal);
+    }
+  }
+  Obj["Index"] = IndexArray;
+
+  SmallString<128> IndexFilePath(RootDir);
+  sys::path::append(IndexFilePath, "/json/index.json");
+  std::error_code FileErr;
+  raw_fd_ostream RootOS(IndexFilePath, FileErr, sys::fs::OF_Text);
+  if (FileErr)
+    return createFileError(
+        "cannot open file " + IndexFilePath, FileErr);
+  RootOS << llvm::formatv("{0:2}", ObjVal);
+  return Error::success();
+}
+
 Error JSONGenerator::generateDocumentation(
     StringRef RootDir, llvm::StringMap<std::unique_ptr<doc::Info>> Infos,
     const ClangDocContext &CDCtx, std::string DirName) {
@@ -685,6 +735,9 @@ Error JSONGenerator::generateDocumentation(
         return Err;
   }
 
+  if (auto Err = serializeIndex(CDCtx, RootDir))
+    return Err;
+
   return Error::success();
 }
 
diff --git a/clang-tools-extra/clang-doc/assets/index-template.mustache 
b/clang-tools-extra/clang-doc/assets/index-template.mustache
new file mode 100644
index 0000000000000..de64da4d709ee
--- /dev/null
+++ b/clang-tools-extra/clang-doc/assets/index-template.mustache
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+{{>HeadPartial}}
+<body>
+    {{>NavbarPartial}}
+    <main>
+        <div class="container">
+            <div class="sidebar">
+                <h2>{{ProjectName}}</h2>
+                <ul>
+                    <li class="sidebar-section">
+                        <a class="sidebar-item" 
href="#Namespaces">Namespaces</a>
+                    </li>
+                    <li>
+                        <ul>
+                            {{#Index}}
+                            <li class="sidebar-item-container">
+                                <a class="sidebar-item" 
href="#{{Name}}">{{Name}}</a>
+                            </li>
+                            {{/Index}}
+                        </ul>
+                    </li>
+                </ul>
+            </div>
+            <div class="resizer" id="resizer"></div>
+            <div class="content">
+                <section id="Index" class="section-container">
+                    <h2>Index</h2>
+                    {{#Index}}
+                    <div>
+                        <a 
href="{{#Path}}{{Path}}/{{/Path}}{{Name}}/index.html">
+                            <pre><code class="language-cpp 
code-clang-doc">namespace {{Name}}</code></pre>
+                        </a>
+                    </div>
+                    {{/Index}}
+                </section>
+            </div>
+        </div>
+    </main>
+</body>
+</html>
diff --git a/clang-tools-extra/clang-doc/support/Utils.cpp 
b/clang-tools-extra/clang-doc/support/Utils.cpp
index d0fd6f45b8a02..e0d92d23b045e 100644
--- a/clang-tools-extra/clang-doc/support/Utils.cpp
+++ b/clang-tools-extra/clang-doc/support/Utils.cpp
@@ -60,6 +60,8 @@ void getHtmlFiles(StringRef AssetsPath, 
clang::doc::ClangDocContext &CDCtx) {
       appendPathPosix(AssetsPath, "head-template.mustache");
   SmallString<128> NavbarTemplate =
       appendPathPosix(AssetsPath, "navbar-template.mustache");
+  SmallString<128> IndexTemplate =
+      appendPathPosix(AssetsPath, "index-template.mustache");
 
   CDCtx.MustacheTemplates.insert(
       {"namespace-template", NamespaceTemplate.c_str()});
@@ -70,4 +72,5 @@ void getHtmlFiles(StringRef AssetsPath, 
clang::doc::ClangDocContext &CDCtx) {
   CDCtx.MustacheTemplates.insert({"comment-template", 
CommentTemplate.c_str()});
   CDCtx.MustacheTemplates.insert({"head-template", HeadTemplate.c_str()});
   CDCtx.MustacheTemplates.insert({"navbar-template", NavbarTemplate.c_str()});
+  CDCtx.MustacheTemplates.insert({"index-template", IndexTemplate.c_str()});
 }
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt 
b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index c8b4162a0e716..6d8665379e750 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -33,6 +33,7 @@ set(assets
   template.mustache
   head-template.mustache
   navbar-template.mustache
+  index-template.mustache
 )
 
 set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
diff --git a/clang-tools-extra/test/clang-doc/index.cpp 
b/clang-tools-extra/test/clang-doc/index.cpp
new file mode 100644
index 0000000000000..e6662455c6657
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/index.cpp
@@ -0,0 +1,63 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: clang-doc --format=html --output=%t --executor=standalone %s
+// RUN: FileCheck %s < %t/json/index.json -check-prefix=CHECK-JSON
+// RUN: FileCheck %s < %t/html/index.html -check-prefix=CHECK-HTML
+
+class Foo {};
+
+namespace inner {
+  class Bar {};
+}
+
+{
+// CHECK-JSON:       "Index": [
+// CHECK-JSON-NEXT:    {
+// CHECK-JSON-NEXT:      "Name": "GlobalNamespace",
+// CHECK-JSON-NEXT:      "QualName": "GlobalNamespace",
+// CHECK-JSON-NEXT:      "USR": "0000000000000000000000000000000000000000"
+// CHECK-JSON-NEXT:    },
+// CHECK-JSON-NEXT:    {
+// CHECK-JSON-NEXT:      "Name": "inner",
+// CHECK-JSON-NEXT:      "QualName": "inner",
+// CHECK-JSON-NEXT:      "USR": "96AD5C6626E13385428E4BF18C3523B9AF6508B8"
+// CHECK-JSON-NEXT:    }
+// CHECK-JSON-NEXT:  ]
+
+// CHECK-HTML:         <main>
+// CHECK-HTML-NEXT:        <div class="container">
+// CHECK-HTML-NEXT:            <div class="sidebar">
+// CHECK-HTML-NEXT:                <h2></h2>
+// CHECK-HTML-NEXT:                <ul>
+// CHECK-HTML-NEXT:                    <li class="sidebar-section">
+// CHECK-HTML-NEXT:                        <a class="sidebar-item" 
href="#Namespaces">Namespaces</a>
+// CHECK-HTML-NEXT:                    </li>
+// CHECK-HTML-NEXT:                    <li>
+// CHECK-HTML-NEXT:                        <ul>
+// CHECK-HTML-NEXT:                            <li 
class="sidebar-item-container">
+// CHECK-HTML-NEXT:                                <a class="sidebar-item" 
href="#GlobalNamespace">GlobalNamespace</a>
+// CHECK-HTML-NEXT:                            </li>
+// CHECK-HTML-NEXT:                            <li 
class="sidebar-item-container">
+// CHECK-HTML-NEXT:                                <a class="sidebar-item" 
href="#inner">inner</a>
+// CHECK-HTML-NEXT:                            </li>
+// CHECK-HTML-NEXT:                        </ul>
+// CHECK-HTML-NEXT:                    </li>
+// CHECK-HTML-NEXT:                </ul>
+// CHECK-HTML-NEXT:            </div>
+// CHECK-HTML-NEXT:            <div class="resizer" id="resizer"></div>
+// CHECK-HTML-NEXT:            <div class="content">
+// CHECK-HTML-NEXT:                <section id="Index" 
class="section-container">
+// CHECK-HTML-NEXT:                    <h2>Index</h2>
+// CHECK-HTML-NEXT:                    <div>
+// CHECK-HTML-NEXT:                        <a 
href="GlobalNamespace/index.html">
+// CHECK-HTML-NEXT:                            <pre><code class="language-cpp 
code-clang-doc">namespace GlobalNamespace</code></pre>
+// CHECK-HTML-NEXT:                        </a>
+// CHECK-HTML-NEXT:                    </div>
+// CHECK-HTML-NEXT:                    <div>
+// CHECK-HTML-NEXT:                        <a href="inner/index.html">
+// CHECK-HTML-NEXT:                            <pre><code class="language-cpp 
code-clang-doc">namespace inner</code></pre>
+// CHECK-HTML-NEXT:                        </a>
+// CHECK-HTML-NEXT:                    </div>
+// CHECK-HTML-NEXT:                </section>
+// CHECK-HTML-NEXT:            </div>
+// CHECK-HTML-NEXT:        </div>
+// CHECK-HTML-NEXT:    </main>
diff --git a/clang-tools-extra/test/clang-doc/json/class-requires.cpp 
b/clang-tools-extra/test/clang-doc/json/class-requires.cpp
index 4e5ec3a5729cd..de9aff285dcb9 100644
--- a/clang-tools-extra/test/clang-doc/json/class-requires.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class-requires.cpp
@@ -23,7 +23,6 @@ struct MyClass;
 // CHECK-NEXT:        "End": true,
 // CHECK-NEXT:        "Expression": "Addable<T>",
 // CHECK-NEXT:        "Name": "Addable",
-// CHECK-NEXT:        "Path": "",
 // CHECK-NEXT:        "QualName": "Addable",
 // CHECK-NEXT:        "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:      }
diff --git a/clang-tools-extra/test/clang-doc/json/class.cpp 
b/clang-tools-extra/test/clang-doc/json/class.cpp
index d57e8a990c3fe..e62489d4e67ca 100644
--- a/clang-tools-extra/test/clang-doc/json/class.cpp
+++ b/clang-tools-extra/test/clang-doc/json/class.cpp
@@ -95,7 +95,6 @@ struct MyClass {
 // CHECK-NEXT:        ],
 // CHECK-NEXT:        "Reference": {
 // CHECK-NEXT:          "Name": "friendFunction",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "friendFunction",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
diff --git a/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp 
b/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
index 5b15a88d562de..afaad8f5d6775 100644
--- a/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
+++ b/clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
@@ -32,7 +32,6 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "Incrementable<T>",
 // CHECK-NEXT:          "Name": "Incrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Incrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
@@ -40,7 +39,6 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:          "End": true,
 // CHECK-NEXT:          "Expression": "Decrementable<T>",
 // CHECK-NEXT:          "Name": "Decrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Decrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        }
@@ -51,7 +49,6 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "Incrementable<T>",
 // CHECK-NEXT:          "Name": "Incrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Incrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
@@ -59,7 +56,6 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:          "End": true,
 // CHECK-NEXT:          "Expression": "Decrementable<T>",
 // CHECK-NEXT:          "Name": "Decrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Decrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        }
@@ -70,21 +66,18 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "Incrementable<T>",
 // CHECK-NEXT:          "Name": "Incrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Incrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "Decrementable<T>",
 // CHECK-NEXT:          "Name": "Decrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Decrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "PreIncrementable<T>",
 // CHECK-NEXT:          "Name": "PreIncrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "PreIncrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
@@ -92,7 +85,6 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:          "End": true,
 // CHECK-NEXT:          "Expression": "PreDecrementable<T>",
 // CHECK-NEXT:          "Name": "PreDecrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "PreDecrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        }
@@ -103,14 +95,12 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "Incrementable<T>",
 // CHECK-NEXT:          "Name": "Incrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Incrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
 // CHECK-NEXT:        {
 // CHECK-NEXT:          "Expression": "Decrementable<T>",
 // CHECK-NEXT:          "Name": "Decrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "Decrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        },
@@ -118,7 +108,6 @@ template<typename T> requires (Incrementable<T> && 
Decrementable<T>) || PreIncre
 // CHECK-NEXT:          "End": true,
 // CHECK-NEXT:          "Expression": "PreIncrementable<T>",
 // CHECK-NEXT:          "Name": "PreIncrementable",
-// CHECK-NEXT:          "Path": "",
 // CHECK-NEXT:          "QualName": "PreIncrementable",
 // CHECK-NEXT:          "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:        }
diff --git a/clang-tools-extra/test/clang-doc/json/function-requires.cpp 
b/clang-tools-extra/test/clang-doc/json/function-requires.cpp
index 8ba6adc66a54b..0c2459df45f91 100644
--- a/clang-tools-extra/test/clang-doc/json/function-requires.cpp
+++ b/clang-tools-extra/test/clang-doc/json/function-requires.cpp
@@ -37,7 +37,6 @@ template<Incrementable T> Incrementable auto incrementTwo(T 
t);
 // CHECK-NEXT:            "End": true,
 // CHECK-NEXT:            "Expression": "Incrementable<T>",
 // CHECK-NEXT:            "Name": "Incrementable",
-// CHECK-NEXT:            "Path": "",
 // CHECK-NEXT:            "QualName": "Incrementable",
 // CHECK-NEXT:            "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:          }
@@ -73,7 +72,6 @@ template<Incrementable T> Incrementable auto incrementTwo(T 
t);
 // CHECK-NEXT:            "End": true,
 // CHECK-NEXT:            "Expression": "Incrementable<T>",
 // CHECK-NEXT:            "Name": "Incrementable",
-// CHECK-NEXT:            "Path": "",
 // CHECK-NEXT:            "QualName": "Incrementable",
 // CHECK-NEXT:            "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:          }
diff --git a/clang-tools-extra/test/clang-doc/json/namespace.cpp 
b/clang-tools-extra/test/clang-doc/json/namespace.cpp
index c1370d9fe379f..200246e87b516 100644
--- a/clang-tools-extra/test/clang-doc/json/namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/json/namespace.cpp
@@ -80,7 +80,6 @@ typedef int MyTypedef;
 // CHECK-NEXT:     {
 // CHECK-NEXT:       "End": true,
 // CHECK-NEXT:       "Name": "NestedNamespace",
-// CHECK-NEXT:       "Path": "",
 // CHECK-NEXT:       "QualName": "NestedNamespace",
 // CHECK-NEXT:       "USR": "{{[0-9A-F]*}}"
 // CHECK-NEXT:     }
diff --git a/clang-tools-extra/test/clang-doc/namespace.cpp 
b/clang-tools-extra/test/clang-doc/namespace.cpp
index 8580ea6739a21..79b1ab8833261 100644
--- a/clang-tools-extra/test/clang-doc/namespace.cpp
+++ b/clang-tools-extra/test/clang-doc/namespace.cpp
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t && mkdir -p %t
 // RUN: clang-doc --format=html --output=%t --executor=standalone %s
 // RUN: clang-doc --format=md --output=%t --executor=standalone %s
-// RUN: FileCheck %s < %t/@nonymous_namespace/AnonClass.md 
-check-prefix=MD-ANON-CLASS-LINE
+// run: filecheck %s < %t/@nonymous_namespace/anonclass.md 
-check-prefix=md-anon-class-line
 // RUN: FileCheck %s < %t/@nonymous_namespace/AnonClass.md 
-check-prefix=MD-ANON-CLASS
 // RUN: FileCheck %s < %t/@nonymous_namespace/index.md 
-check-prefix=MD-ANON-INDEX-LINE
 // RUN: FileCheck %s < %t/@nonymous_namespace/index.md 
-check-prefix=MD-ANON-INDEX

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to