[clang] [docs] Enforce unambiguous toctree in clang/docs (PR #224101)
Scott Linder via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 10:51:18 PDT 2026
https://github.com/slinder1 created https://github.com/llvm/llvm-project/pull/224101
The rationale and methodology are the same as in
03511907c7a9908f7902e18d3789371a63bb91b1 just in `clang` this time.
Change-Id: I35182f658b713ffdcccbe8b9e8ac079e6335649d
>From 79accb569e1e9a941ab0d057050e8e06e7e64f4d Mon Sep 17 00:00:00 2001
From: Scott Linder <Scott.Linder at amd.com>
Date: Wed, 16 Sep 2026 13:07:16 -0400
Subject: [PATCH] [docs] Enforce unambiguous toctree in clang/docs
The rationale and methodology are the same as in
03511907c7a9908f7902e18d3789371a63bb91b1 just in `clang` this time.
Change-Id: I35182f658b713ffdcccbe8b9e8ac079e6335649d
---
clang/docs/conf.py | 1 +
clang/docs/index.md | 140 ++++++++++++++++++++++++++++++++++----------
2 files changed, 109 insertions(+), 32 deletions(-)
diff --git a/clang/docs/conf.py b/clang/docs/conf.py
index 122b3f50878a1..1098b6ea70631 100644
--- a/clang/docs/conf.py
+++ b/clang/docs/conf.py
@@ -30,6 +30,7 @@
"sphinx.ext.mathjax",
"sphinx.ext.graphviz",
"llvm_sphinx.ext.ghlinks",
+ "llvm_sphinx.ext.checks",
]
import sphinx
diff --git a/clang/docs/index.md b/clang/docs/index.md
index bb2ba828637af..a05210b8e73a0 100644
--- a/clang/docs/index.md
+++ b/clang/docs/index.md
@@ -7,16 +7,9 @@
```
```{toctree}
-:maxdepth: 1
+:hidden:
ReleaseNotes
-```
-
-# Using Clang as a Compiler
-
-```{toctree}
-:maxdepth: 1
-
UsersManual
Toolchain
LanguageExtensions
@@ -52,7 +45,6 @@ BoundsSafetyAdoptionGuide
BoundsSafetyImplPlans
ControlFlowIntegrity
LTOVisibility
-PointerAuthentication
SafeStack
ShadowCallStack
StructureProtection
@@ -71,17 +63,9 @@ APINotes
DebuggingCoroutines
AMDGPUSupport
RISCVSupport
-CXXTypeAwareAllocators
CIR/index
CommandGuide/index
FAQ
-```
-
-# Using Clang as a Library
-
-```{toctree}
-:maxdepth: 1
-
Tooling
ExternalClangExamples
IntroductionToTheClangAST
@@ -97,13 +81,6 @@ LibASTImporter
HowToSetupToolingForLLVM
JSONCompilationDatabase
RefactoringEngine
-```
-
-# Using Clang Tools
-
-```{toctree}
-:maxdepth: 1
-
ClangTools
ClangCheck
ClangFormat
@@ -113,13 +90,6 @@ ClangNVLinkWrapper
ClangOffloadBundler
ClangRepl
ClangSYCLLinker
-```
-
-# Design Documents
-
-```{toctree}
-:maxdepth: 1
-
Maintainers
InternalsManual
DriverInternals
@@ -127,12 +97,118 @@ Multilib
OffloadingDesign
PCHInternals
ItaniumMangleAbiTags
-ControlFlowIntegrityDesign
HardwareAssistedAddressSanitizerDesign
ConstantInterpreter
LLVMExceptionHandlingCodeGen
```
+* {doc}`ReleaseNotes`
+
+# Using Clang as a Compiler
+
+* {doc}`UsersManual`
+* {doc}`Toolchain`
+* {doc}`LanguageExtensions`
+* {doc}`ClangCommandLineReference`
+* {doc}`AttributeReference`
+* {doc}`DiagnosticsReference`
+* {doc}`AMDGPUBuiltinReference`
+* {doc}`WarningSuppressionMappings`
+* {doc}`CrossCompilation`
+* {doc}`ClangStaticAnalyzer`
+* {doc}`ThreadSafetyAnalysis`
+* {doc}`LifetimeSafety`
+* {doc}`SafeBuffers`
+* {doc}`ScalableStaticAnalysis/index`
+* {doc}`DataFlowAnalysisIntro`
+* {doc}`FunctionEffectAnalysis`
+* {doc}`AddressSanitizer`
+* {doc}`HardwareAssistedAddressSanitizer`
+* {doc}`ThreadSanitizer`
+* {doc}`MemorySanitizer`
+* {doc}`UndefinedBehaviorSanitizer`
+* {doc}`DataFlowSanitizer`
+* {doc}`LeakSanitizer`
+* {doc}`TypeSanitizer`
+* {doc}`RealtimeSanitizer`
+* {doc}`SanitizerCoverage`
+* {doc}`SanitizerStats`
+* {doc}`SanitizerSpecialCaseList`
+* {doc}`AllocToken`
+* {doc}`OverflowBehaviorTypes`
+* {doc}`BoundsSafety`
+* {doc}`BoundsSafetyAdoptionGuide`
+* {doc}`BoundsSafetyImplPlans`
+* {doc}`ControlFlowIntegrity`
+* {doc}`LTOVisibility`
+* {doc}`PointerAuthentication`
+* {doc}`SafeStack`
+* {doc}`ShadowCallStack`
+* {doc}`StructureProtection`
+* {doc}`SourceBasedCodeCoverage`
+* {doc}`StandardCPlusPlusModules`
+* {doc}`Modules`
+* {doc}`MSVCCompatibility`
+* {doc}`MisExpect`
+* {doc}`OpenCLSupport`
+* {doc}`OpenMPSupport`
+* {doc}`SYCLSupport`
+* {doc}`HIPSupport`
+* {doc}`HLSL/HLSLDocs`
+* {doc}`ThinLTO`
+* {doc}`APINotes`
+* {doc}`DebuggingCoroutines`
+* {doc}`AMDGPUSupport`
+* {doc}`RISCVSupport`
+* {doc}`CXXTypeAwareAllocators`
+* {doc}`CIR/index`
+* {doc}`CommandGuide/index`
+* {doc}`FAQ`
+
+# Using Clang as a Library
+
+* {doc}`Tooling`
+* {doc}`ExternalClangExamples`
+* {doc}`IntroductionToTheClangAST`
+* {doc}`LibTooling`
+* {doc}`LibClang`
+* {doc}`LibFormat`
+* {doc}`ClangPlugins`
+* {doc}`RAVFrontendAction`
+* {doc}`LibASTMatchersTutorial`
+* {doc}`LibASTMatchers`
+* {doc}`ClangTransformerTutorial`
+* {doc}`LibASTImporter`
+* {doc}`HowToSetupToolingForLLVM`
+* {doc}`JSONCompilationDatabase`
+* {doc}`RefactoringEngine`
+
+# Using Clang Tools
+
+* {doc}`ClangTools`
+* {doc}`ClangCheck`
+* {doc}`ClangFormat`
+* {doc}`ClangFormatStyleOptions`
+* {doc}`ClangLinkerWrapper`
+* {doc}`ClangNVLinkWrapper`
+* {doc}`ClangOffloadBundler`
+* {doc}`ClangRepl`
+* {doc}`ClangSYCLLinker`
+
+# Design Documents
+
+* {doc}`Maintainers`
+* {doc}`InternalsManual`
+* {doc}`DriverInternals`
+* {doc}`Multilib`
+* {doc}`OffloadingDesign`
+* {doc}`PCHInternals`
+* {doc}`ItaniumMangleAbiTags`
+* {doc}`ControlFlowIntegrityDesign`
+* {doc}`HardwareAssistedAddressSanitizerDesign`
+* {doc}`ConstantInterpreter`
+* {doc}`LLVMExceptionHandlingCodeGen`
+
# Indices and tables
- {ref}`genindex`
More information about the cfe-commits
mailing list