[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

Erick Velez via cfe-commits cfe-commits at lists.llvm.org
Fri May 30 07:46:53 PDT 2025


================
@@ -0,0 +1,13 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: clang-doc --format=mustache --output=%t --executor=standalone %s 
+// RUN: FileCheck %s < %t/MyNamespace/index.html
+
+namespace MyNamespace {
+  class Foo;
+}
+
+// CHECK:       <ul class="class-container">
+// CHECK-NEXT:    <li id="{{[0-9A-F]*}}" style="max-height: 40px;">
+// CHECK-NEXT:        <a href="Foo.html"><pre><code class="language-cpp code-clang-doc" >class Foo</code></pre></a>
+// CHECK-NEXT:    </li>
+// CHECK-NEXT: </ul>
----------------
evelez7 wrote:

Yes, a separate namespace generates a new folder and index.html. Any records declared inside of that namespace get put in the same folder as a separate HTML file. So this test also generates an empty `GlobalNamespace/index.html` since nested namespaces aren't rendered.

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


More information about the cfe-commits mailing list