[libc-commits] [libc] [libc][docs] Add search, filters, and drawers to dashboard (PR #241976)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Thu Nov 12 09:57:42 PST 2026
https://github.com/kaladron updated https://github.com/llvm/llvm-project/pull/241976
>From 1e13d7a7e8dfbca98d30c93b26819de255a9ecb1 Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Thu, 12 Nov 2026 17:29:16 +0000
Subject: [PATCH 1/2] [libc][docs] Add search, filters, and drawers to
dashboard
With 82 headers on headers/index.html, finding a specific symbol or
inspecting which functions, macros, types, or global variables remain
unimplemented requires opening individual header pages one by one.
Add expandable detail drawers to each header row with category and
precision breakdowns plus clickable missing and implemented symbol
chips linked to cppreference.com and Open Group specifications, and
add client-side search, standard/status filtering, sorting, and
expand/collapse controls in status.js.
Assisted-by: Automated tooling, human reviewed.
---
libc/docs/_static/status.css | 37 ++++++-
libc/docs/_static/status.js | 78 +++++++++++++++
libc/docs/conf.py | 1 +
libc/utils/docgen/docgen.py | 160 ++++++++++++++++++++++++++++++-
libc/utils/docgen/docgen_test.py | 4 +
5 files changed, 273 insertions(+), 7 deletions(-)
create mode 100644 libc/docs/_static/status.js
diff --git a/libc/docs/_static/status.css b/libc/docs/_static/status.css
index 66795308a1325..dc8e400d4688e 100644
--- a/libc/docs/_static/status.css
+++ b/libc/docs/_static/status.css
@@ -6,6 +6,8 @@
--hc-blue-border: rgba(9, 105, 218, 0.3);
--hc-blue-text: #0969da;
--hc-purple-text: #6639ba;
+ --hc-amber-bg: rgba(217, 119, 6, 0.1);
+ --hc-amber-border: rgba(180, 83, 9, 0.45);
--hc-amber-text: #b45309;
--hc-muted-text: #57606a;
--hc-track-bg: rgba(175, 184, 193, 0.38);
@@ -19,6 +21,8 @@ body[data-theme="dark"] {
--hc-blue-border: rgba(88, 166, 255, 0.4);
--hc-blue-text: #58a6ff;
--hc-purple-text: #a371f7;
+ --hc-amber-bg: rgba(210, 153, 34, 0.15);
+ --hc-amber-border: rgba(210, 153, 34, 0.5);
--hc-amber-text: #e3b341;
--hc-muted-text: #8b949e;
--hc-track-bg: rgba(110, 118, 129, 0.4);
@@ -33,6 +37,8 @@ body[data-theme="dark"] {
--hc-blue-border: rgba(88, 166, 255, 0.4);
--hc-blue-text: #58a6ff;
--hc-purple-text: #a371f7;
+ --hc-amber-bg: rgba(210, 153, 34, 0.15);
+ --hc-amber-border: rgba(210, 153, 34, 0.5);
--hc-amber-text: #e3b341;
--hc-muted-text: #8b949e;
--hc-track-bg: rgba(110, 118, 129, 0.4);
@@ -254,8 +260,10 @@ body[data-theme="dark"] {
.header-card > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; gap: 12px; user-select: none; }
.header-card > summary::-webkit-details-marker { display: none; }
.header-card:has(.hc-drawer) > summary { cursor: pointer; }
-.header-card > summary:focus-visible, .hc-page-link:focus-visible { outline: 2px solid var(--hc-blue-text); outline-offset: 2px; }
-.hc-header-title-col { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 240px; flex-shrink: 0; }
+.header-card > summary:focus-visible, .hc-page-link:focus-visible, .hc-btn:focus-visible, .hc-toggle-btn:focus-visible, .hc-input:focus-visible { outline: 2px solid var(--hc-blue-text); outline-offset: 2px; }
+.hc-chevron { display: inline-block; font-size: 0.75rem; color: var(--color-foreground-muted, #57606a); transition: transform 0.15s ease; flex-shrink: 0; }
+.header-card[open] > summary .hc-chevron { transform: rotate(90deg); }
+.hc-header-title-col { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 250px; flex-shrink: 0; }
.hc-thermometer-col { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 10px; }
.hc-thermometer-col .hc-progress-track { flex: 1; height: 10px; }
.hc-row-pct { font-size: 0.85rem; font-weight: 700; width: 48px; text-align: right; }
@@ -263,6 +271,31 @@ body[data-theme="dark"] {
.hc-action-col { display: flex; align-items: center; flex-shrink: 0; }
.hc-page-link { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border: 1px solid var(--color-background-border, #d0d7de); border-radius: 4px; font-size: 0.76rem; font-weight: 500; text-decoration: none; color: var(--color-foreground-secondary, #57606a); background: var(--color-background-primary, #fff); white-space: nowrap; }
.hc-page-link:hover { border-color: var(--hc-blue-border); color: var(--hc-blue-text); text-decoration: none; }
+.dashboard-controls { background: var(--color-background-secondary, #f6f8fa); border: 1px solid var(--color-background-border, #e1e4e8); border-radius: 8px; padding: 14px 16px; margin: 14px 0 16px 0; display: flex; flex-direction: column; gap: 10px; }
+.hc-ctrl-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
+.hc-search-wrap { flex: 2; min-width: 220px; }
+.hc-search-wrap .hc-input { width: 100%; box-sizing: border-box; }
+.hc-ctrl-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
+.hc-ctrl-lbl { font-size: 0.82rem; font-weight: 600; color: var(--color-foreground-muted, #57606a); }
+.hc-input, .hc-btn { padding: 6px 10px; border: 1px solid var(--color-background-border, #d0d7de); border-radius: 6px; font-size: 0.86rem; background: var(--color-background-primary, #fff); color: var(--color-foreground-primary, #24292f); min-height: 34px; }
+.hc-btn { cursor: pointer; font-weight: 500; }
+.hc-toggle-btn { padding: 4px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 500; border: 1px solid var(--color-background-border, #d0d7de); background: var(--color-background-primary, #fff); color: var(--color-foreground-primary, #24292f); cursor: pointer; min-height: 30px; }
+.hc-toggle-btn[aria-pressed="true"] { background: var(--hc-blue-text); color: #fff; border-color: var(--hc-blue-text); font-weight: 600; }
+body[data-theme="dark"] .hc-toggle-btn[aria-pressed="true"] { color: #0d1117; }
+ at media (prefers-color-scheme: dark) { body:not([data-theme="light"]) .hc-toggle-btn[aria-pressed="true"] { color: #0d1117; } }
+.hc-filter-count { font-size: 0.8rem; color: var(--color-foreground-muted, #57606a); }
+.hc-drawer { padding: 14px; border-top: 1px solid var(--color-background-border, #e1e4e8); background: var(--color-background-primary, #fff); border-radius: 0 0 6px 6px; }
+.hc-drawer .hc-grid-cards { margin: 0 0 12px 0; }
+.hc-drawer .hc-mini-card { background: var(--color-background-secondary, #f6f8fa); padding: 8px 10px; }
+.hc-drawer-prec { margin-bottom: 12px; }
+.hc-chip-row { margin: 8px 0; font-size: 0.8rem; line-height: 1.7; }
+.hc-chip-lbl { font-weight: 700; margin-right: 4px; }
+.hc-chip-missing, .hc-chip-impl { display: inline-block; border-radius: 4px; padding: 1px 6px; margin: 2px; font-family: var(--font-stack--monospace, monospace); font-size: 0.75rem; text-decoration: none; line-height: 1.4; }
+.hc-chip-missing { background: var(--hc-amber-bg); border: 1px solid var(--hc-amber-border); color: var(--hc-amber-text); }
+.hc-chip-impl { background: var(--hc-green-bg); border: 1px solid var(--hc-green-border); color: var(--hc-green-text); }
+a.hc-chip-missing:hover, a.hc-chip-impl:hover { text-decoration: underline; }
+.hc-chip-more { font-size: 0.76rem; color: var(--color-foreground-muted, #57606a); margin-left: 4px; }
+.hc-drawer-foot { margin-top: 10px; text-align: right; }
@media (max-width: 640px) {
.header-card > summary { flex-wrap: wrap; padding: 9px 12px; gap: 8px; }
.hc-header-title-col { width: auto; flex: 1 1 auto; min-width: 0; }
diff --git a/libc/docs/_static/status.js b/libc/docs/_static/status.js
new file mode 100644
index 0000000000000..43d1e178b21e5
--- /dev/null
+++ b/libc/docs/_static/status.js
@@ -0,0 +1,78 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+let currentStd = "all";
+let currentStatus = "all";
+
+function filterHeaders() {
+ const searchEl = document.getElementById("header-search");
+ const query = searchEl ? searchEl.value.toLowerCase().trim() : "";
+ const cards = document.querySelectorAll(".header-card");
+ let visible = 0;
+ cards.forEach((card) => {
+ const name = (card.dataset.name || "").toLowerCase();
+ const stem = (card.dataset.stem || "").toLowerCase();
+ const stds = (card.dataset.standard || "").split(" ");
+ const status = card.dataset.status || "";
+ const syms = (card.dataset.symbols || "").toLowerCase();
+ const matchQ = !query || name.includes(query) || stem.includes(query) ||
+ syms.includes(query);
+ const matchStd = currentStd === "all" || stds.includes(currentStd);
+ const matchStatus = currentStatus === "all" || status === currentStatus;
+ const show = matchQ && matchStd && matchStatus;
+ card.style.display = show ? "" : "none";
+ if (show)
+ visible++;
+ });
+ const countEl = document.getElementById("filter-count");
+ if (countEl)
+ countEl.textContent = `Showing ${visible} of ${cards.length} headers`;
+}
+
+function setStandardFilter(val, btn) {
+ currentStd = val;
+ document.querySelectorAll(".filter-btn")
+ .forEach((b) => b.setAttribute("aria-pressed", String(b === btn)));
+ filterHeaders();
+}
+
+function setStatusFilter(val, btn) {
+ currentStatus = val;
+ document.querySelectorAll(".status-btn")
+ .forEach((b) => b.setAttribute("aria-pressed", String(b === btn)));
+ filterHeaders();
+}
+
+function sortHeaders() {
+ const list = document.getElementById("headers-list");
+ const sel = document.getElementById("sort-select");
+ if (!list || !sel)
+ return;
+ const mode = sel.value;
+ const cards = Array.from(list.querySelectorAll(".header-card"));
+ cards.sort((a, b) => {
+ const byName = (a.dataset.name || "").localeCompare(b.dataset.name || "");
+ if (mode === "pct-desc")
+ return parseFloat(b.dataset.pct) - parseFloat(a.dataset.pct) || byName;
+ if (mode === "pct-asc")
+ return parseFloat(a.dataset.pct) - parseFloat(b.dataset.pct) || byName;
+ if (mode === "missing-desc")
+ return (parseInt(b.dataset.missing, 10) -
+ parseInt(a.dataset.missing, 10) ||
+ byName);
+ return byName;
+ });
+ cards.forEach((c) => list.appendChild(c));
+}
+
+function toggleAllDetails(expand) {
+ document.querySelectorAll(".header-card").forEach((d) => {
+ if (d.style.display !== "none")
+ d.open = expand;
+ });
+}
diff --git a/libc/docs/conf.py b/libc/docs/conf.py
index b02b62bf9a706..a8c59448b0f9b 100644
--- a/libc/docs/conf.py
+++ b/libc/docs/conf.py
@@ -96,6 +96,7 @@
html_title="The LLVM C Library",
local_static_path=["_static"],
extra_css_files=["status.css"],
+ extra_js_files=["status.js"],
)
# Add any paths that contain custom themes here, relative to this directory.
diff --git a/libc/utils/docgen/docgen.py b/libc/utils/docgen/docgen.py
index 94b34b0be1b60..607e1feb2318d 100755
--- a/libc/utils/docgen/docgen.py
+++ b/libc/utils/docgen/docgen.py
@@ -521,6 +521,102 @@ def _std_card_html(title: str, imp: int, tot: int, tone: str) -> str:
)
+def _chip_html(
+ header: Header, api: Dict, name: str, kind: str, item: Dict, is_missing: bool
+) -> str:
+ cls = "hc-chip-missing" if is_missing else "hc-chip-impl"
+ esc = html.escape(name)
+ cdef = str(item.get("c-definition") or "")
+ url, title = "", ""
+ if api.get("standard") == "c23" and _C_SECTION_RE.match(cdef):
+ url = cppreference_url(header, name, kind, item, api)
+ title = f"{name} on cppreference.com"
+ if not url:
+ url = posix_url(header, name, kind, item)
+ title = f"{name} in POSIX"
+ if url:
+ href = html.escape(url, quote=True)
+ esc_t = html.escape(title, quote=True)
+ return (
+ f'<a class="{cls}" href="{href}" target="_blank" rel="noopener" '
+ f'title="{esc_t}">{esc}</a>'
+ )
+ return f'<span class="{cls}">{esc}</span>'
+
+
+def _chip_group_html(
+ header: Header, api: Dict, entries: List, label: str, tone: str, is_missing: bool
+) -> str:
+ if not entries:
+ return ""
+ chips = "".join(
+ _chip_html(header, api, n, k, it, is_missing) for n, k, it in entries[:16]
+ )
+ rem = len(entries) - 16
+ more = f'<span class="hc-chip-more">+{rem} more...</span>' if rem > 0 else ""
+ return (
+ f'<div class="hc-chip-row"><span class="hc-chip-lbl" '
+ f'style="color:var(--hc-{tone}-text)">{label} ({len(entries)}):</span>'
+ f"{chips}{more}</div>"
+ )
+
+
+def _toolbar_html(total_headers: int) -> str:
+ std_btns = "".join(
+ f'<button type="button" class="filter-btn hc-toggle-btn" '
+ f'aria-pressed="{"true" if v == "all" else "false"}" '
+ f"onclick=\"setStandardFilter('{v}', this)\">{lbl}</button>"
+ for v, lbl in (
+ ("all", "All Headers"),
+ ("c23", "C23 Standard"),
+ ("posix", "POSIX.1-2024"),
+ ("ext", "Extensions"),
+ )
+ )
+ st_btns = "".join(
+ f'<button type="button" class="status-btn hc-toggle-btn" '
+ f'aria-pressed="{"true" if v == "all" else "false"}" '
+ f"onclick=\"setStatusFilter('{v}', this)\">{lbl}</button>"
+ for v, lbl in (
+ ("all", "All"),
+ ("complete", "Complete (100%)"),
+ ("inprogress", "In Progress (1\u201399%)"),
+ ("planned", "Planned (0%)"),
+ )
+ )
+ return (
+ '<div class="dashboard-controls" role="region" '
+ 'aria-label="Filter and sort headers"><div class="hc-ctrl-row">'
+ '<div class="hc-search-wrap"><label for="header-search" class="hc-sr-only">'
+ "Search headers or symbols</label>"
+ '<input type="search" id="header-search" class="hc-input" '
+ 'aria-label="Search headers or symbols" '
+ 'placeholder="Search headers (stdio, sys/stat) or symbols (printf, errno)..." '
+ 'oninput="filterHeaders()"></div>'
+ '<div class="hc-ctrl-grp"><label for="sort-select" class="hc-ctrl-lbl">'
+ 'Sort:</label><select id="sort-select" class="hc-input" '
+ 'onchange="sortHeaders()">'
+ '<option value="name-asc">Header Name (A\u2013Z)</option>'
+ '<option value="pct-desc">Completion % (High \u2192 Low)</option>'
+ '<option value="pct-asc">Completion % (Low \u2192 High)</option>'
+ '<option value="missing-desc">Most Missing Items</option></select></div>'
+ '<div class="hc-ctrl-grp">'
+ '<button type="button" class="hc-btn" onclick="toggleAllDetails(true)">'
+ "Expand All</button>"
+ '<button type="button" class="hc-btn" onclick="toggleAllDetails(false)">'
+ "Collapse All</button></div></div>"
+ '<div class="hc-ctrl-row">'
+ '<div class="hc-ctrl-grp" role="group" aria-label="Filter by standard">'
+ f'<span class="hc-ctrl-lbl">Standard:</span>{std_btns}</div>'
+ '<div class="hc-ctrl-grp" role="group" '
+ 'aria-label="Filter by implementation status">'
+ f'<span class="hc-ctrl-lbl">Status:</span>{st_btns}</div></div>'
+ '<div id="filter-count" class="hc-filter-count" role="status" '
+ 'aria-live="polite" aria-atomic="true">'
+ f"Showing {total_headers} of {total_headers} headers</div></div>"
+ )
+
+
def generate_index_md():
headers_data = []
totals = {
@@ -563,7 +659,11 @@ def generate_index_md():
"```{raw} html\n"
f'<div class="hc-grid-standards">{c23_card}{pos_card}</div>'
f'<div class="hc-grid-cards">{cat_cards}</div>\n```\n\n'
- "## All Headers\n\n```{raw} html\n"
+ "## All Headers\n\n"
+ "Filter, search, or click any header to inspect category breakdowns, "
+ "precision coverage, and missing or implemented symbols.\n\n"
+ "```{raw} html\n"
+ f"{_toolbar_html(len(headers_data))}"
'<div id="headers-list" class="hc-headers-list">'
)
for hdr, api, stats in headers_data:
@@ -589,6 +689,51 @@ def generate_index_md():
for v in ((fd or {}).get("variants") or {}).values()
if v
]
+ missing, impl_syms = [], []
+ sym_sources = [
+ (
+ "family",
+ api.get("families") or {},
+ lambda n, d: hdr.evaluate_family(n, d)["implemented"],
+ ),
+ ("function", api.get("functions") or {}, lambda n, _: hdr.implements_fn(n)),
+ ("macro", api.get("macros") or {}, lambda n, _: hdr.implements_macro(n)),
+ ("type", api.get("types") or {}, lambda n, _: hdr.implements_type(n)),
+ ("object", api.get("objects") or {}, lambda n, _: hdr.implements_object(n)),
+ ]
+ for kind, entries, check_fn in sym_sources:
+ for name in sorted(entries.keys()):
+ item = entries[name] or {}
+ (impl_syms if check_fn(name, item) else missing).append(
+ (name, kind, item)
+ )
+
+ mini_cards = "".join(
+ _mini_card_html(
+ hdr.name, title, stats[k]["implemented"], stats[k]["total"], c
+ )
+ for k, title, c in (
+ ("families", "Base Families", "green"),
+ ("raw_functions", "Functions", "green"),
+ ("macros", "Macros", "blue"),
+ ("types", "Types", "purple"),
+ ("objects", "Global Variables", "amber"),
+ )
+ if stats[k]["total"]
+ )
+ prec_block = (
+ '<div class="hc-drawer-prec">'
+ '<div class="hc-subcard-title">Precision Coverage</div>'
+ f'{_precision_grid_html(hdr.name, stats["precisions"])}</div>'
+ if stats["precisions"]
+ else ""
+ )
+ miss_html = _chip_group_html(
+ hdr, api, missing, "Missing Symbols", "amber", True
+ )
+ impl_html = _chip_group_html(
+ hdr, api, impl_syms, "Implemented Symbols", "green", False
+ )
stem = html.escape(hdr.stem, quote=True)
hname = html.escape(hdr.name, quote=True)
syms_attr = html.escape(" ".join(syms).lower(), quote=True)
@@ -598,16 +743,21 @@ def generate_index_md():
f'data-standard="{" ".join(std_tags)}" data-status="{status_attr}" '
f'data-pct="{pct:.2f}" data-missing="{tot - imp}" '
f'data-symbols="{syms_attr}"><summary>'
- f'<div class="hc-header-title-col"><code class="hc-sym"><{hname}>'
- f"</code>{_header_pills_html(stats, short=True)}</div>"
+ '<div class="hc-header-title-col">'
+ '<span class="hc-chevron" aria-hidden="true">▸</span>'
+ f'<code class="hc-sym"><{hname}></code>'
+ f"{_header_pills_html(stats, short=True)}</div>"
f'<div class="hc-thermometer-col">{bar}'
f'<span class="hc-row-pct">{pct:.1f}%</span>'
f'<span class="hc-row-frac">({imp}/{tot})</span></div>'
f'<div class="hc-action-col"><a class="hc-page-link" href="{stem}.html" '
f'onclick="event.stopPropagation();" '
f'aria-label="Open {hname} status page">'
- 'Page <span aria-hidden="true">↗</span></a></div>'
- "</summary></details>"
+ 'Page <span aria-hidden="true">↗</span></a></div></summary>'
+ f'<div class="hc-drawer"><div class="hc-grid-cards">{mini_cards}</div>'
+ f"{prec_block}{miss_html}{impl_html}"
+ f'<div class="hc-drawer-foot"><a class="hc-page-link" href="{stem}.html">'
+ f"View full <{hname}> page →</a></div></div></details>"
)
stems = "\n".join(hdr.stem for hdr, _, _ in headers_data)
print(f"</div>\n```\n\n```{{toctree}}\n:hidden: true\n:maxdepth: 1\n\n{stems}\n```")
diff --git a/libc/utils/docgen/docgen_test.py b/libc/utils/docgen/docgen_test.py
index a34c63b6cd7c7..212f335a62b31 100644
--- a/libc/utils/docgen/docgen_test.py
+++ b/libc/utils/docgen/docgen_test.py
@@ -405,6 +405,10 @@ def test_index_output_generation(self):
self.assertIn('data-stem="stdio"', out)
self.assertIn('data-stem="arpa/inet"', out)
self.assertIn("acosf128", out)
+ self.assertIn('class="dashboard-controls"', out)
+ self.assertIn('class="hc-chip-missing"', out)
+ self.assertIn('class="hc-chip-impl"', out)
+ self.assertIn('href="https://en.cppreference.com/w/c/io/clearerr"', out)
self.assertIn("```{toctree}\n:hidden: true", out)
>From 74bbf4553e8fbdd8822b63a3ab13610cb62f030c Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Thu, 12 Nov 2026 17:57:29 +0000
Subject: [PATCH 2/2] [libc][docs] Title generated headers index page as
Headers
Title generated headers/index.md as Headers so the left navigation
sidebar does not repeat Implementation Status beneath the Implementation
Status section caption, and keep docgen_list in alphabetical order in
libc/docs/CMakeLists.txt.
Assisted-by: Automated tooling, human reviewed.
---
libc/docs/CMakeLists.txt | 4 ++--
libc/utils/docgen/docgen.py | 2 +-
libc/utils/docgen/docgen_test.py | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index 6d67aef96091d..8fc99dbe4ba6a 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -40,11 +40,11 @@ if(LLVM_ENABLE_SPHINX)
monetary
mqueue
ndbm
- netdb
- nl_types
net/if
+ netdb
netinet/in
netinet/tcp
+ nl_types
poll
pthread
pwd
diff --git a/libc/utils/docgen/docgen.py b/libc/utils/docgen/docgen.py
index 607e1feb2318d..e1a98267732c0 100755
--- a/libc/utils/docgen/docgen.py
+++ b/libc/utils/docgen/docgen.py
@@ -648,7 +648,7 @@ def generate_index_md():
)
)
print(
- "(implementation_status)=\n\n(headers_index)=\n\n# Implementation Status\n\n"
+ "(implementation_status)=\n\n(headers_index)=\n\n# Headers\n\n"
f"Live symbol coverage across {len(headers_data)} headers ({n_c23} C23 "
f"standard headers, {n_posix} POSIX.1-2024 headers, and extensions), verified "
"directly against LLVM-libc source files, header generation specifications, "
diff --git a/libc/utils/docgen/docgen_test.py b/libc/utils/docgen/docgen_test.py
index 212f335a62b31..839808160372e 100644
--- a/libc/utils/docgen/docgen_test.py
+++ b/libc/utils/docgen/docgen_test.py
@@ -398,6 +398,7 @@ def test_index_output_generation(self):
out = buf.getvalue()
self.assertIn("(implementation_status)=", out)
self.assertIn("(headers_index)=", out)
+ self.assertIn("# Headers\n", out)
self.assertIn("C23 Standard Completeness", out)
self.assertIn("POSIX.1-2024 Completeness", out)
self.assertIn("Global Variables", out)
@@ -410,6 +411,7 @@ def test_index_output_generation(self):
self.assertIn('class="hc-chip-impl"', out)
self.assertIn('href="https://en.cppreference.com/w/c/io/clearerr"', out)
self.assertIn("```{toctree}\n:hidden: true", out)
+ self.assertIn("\npoll\npthread\npwd\n", out)
if __name__ == "__main__":
More information about the libc-commits
mailing list