diff --git a/clang-tools-extra/clang-doc/assets/namespace-template.mustache b/clang-tools-extra/clang-doc/assets/namespace-template.mustache index f4a35cfe4c79a..614023b9f6723 100644 --- a/clang-tools-extra/clang-doc/assets/namespace-template.mustache +++ b/clang-tools-extra/clang-doc/assets/namespace-template.mustache @@ -97,8 +97,8 @@ {{/Records}} - {{/HasRecords}} + {{/HasRecords}} diff --git a/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp b/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp index ee8b844d1f7f1..dfc81df134596 100644 --- a/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp +++ b/clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp @@ -1,6 +1,7 @@ // RUN: rm -rf %t && mkdir -p %t // RUN: clang-doc --format=mustache --output=%t --executor=standalone %s // RUN: FileCheck %s < %t/html/MyNamespace/index.html +// RUN: FileCheck %s < %t/html/GlobalNamespace/index.html --check-prefix=CHECK-GLOBAL namespace MyNamespace { class Foo; @@ -13,3 +14,18 @@ namespace MyNamespace { // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: + +// COM: Check that the empty global namespace doesn't contain tag mismatches. +// CHECK-GLOBAL:
+// CHECK-GLOBAL-NEXT:
+// CHECK-GLOBAL-NEXT: +// CHECK-GLOBAL-NEXT:
+// CHECK-GLOBAL-NEXT:
+// CHECK-GLOBAL-EMPTY: +// CHECK-GLOBAL-NEXT:
+// CHECK-GLOBAL-NEXT:
+// CHECK-GLOBAL-NEXT: