[all-commits] [llvm/llvm-project] 9f5246: [clang][docs] Generate diagnostics reference as Ma...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Tue Sep 8 13:44:00 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f5246879112eb81a925e02beb1822a4287e81df
      https://github.com/llvm/llvm-project/commit/9f5246879112eb81a925e02beb1822a4287e81df
  Author: Reid Kleckner <rkleckner at nvidia.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M clang/docs/CMakeLists.txt
    M clang/include/clang/Basic/DiagnosticDocs.td
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/test/TableGen/DiagnosticDocs.inc
    A clang/test/TableGen/diag-docs-determinism.td
    M clang/test/TableGen/emit-diag-docs.td
    M clang/utils/TableGen/ClangDiagnosticsEmitter.cpp

  Log Message:
  -----------
  [clang][docs] Generate diagnostics reference as Markdown (#221361)

Generate Clang's diagnostics reference from MyST Markdown rather than
reStructuredText. Update diagnostic-group documentation to use native MyST
roles and references, and have the TableGen emitter produce MyST list tables
for diagnostic alternatives.

The new list-table emission code is more verbose, but it is conceptually
simpler, since it's just tracking nested indentation as it emits table cells.

Here's a sample of the table markdown output:
```
* - {warning}`warning:` {diagtext}`They say` 
  - :::{list-table}
    :widths: auto

    * - {diagtext}`good`
    * - {diagtext}`bad`
    :::
  -  
  - :::{list-table}
    :widths: auto

    * - {diagtext}`food`
    * - {diagtext}`forests`
    :::
  -  {diagtext}`are` 
  - :::{list-table}
    :widths: auto

    * - {diagtext}`good`
    * - {diagtext}`bad`
    :::
  -  {diagtext}`according to` {placeholder}`D`
```

See clang/test/TableGen/emit-diag-docs.td for examples of how it looks.

Tracking issue: #201242 

Assisted-By: Codex & Claude



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list