Generating clang-tidy documentation

llvm-project/README.txt at main · llvm/llvm-project · GitHub says that “to generate documentation in HTML format from files in clang-tools-extra/docs, build the docs-clang-tools-html target”. How? I can build clang-tidy, but

cd $LLVM_ROOT
mkdir build
cd build
cmake $LLVM_ROOT/llvm/ -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -G Ninja
cmake --build $LLVM_ROOT/build --target docs-clang-tools-html

ends with

ninja: error: unknown target 'docs-clang-tools-html'

Adding -DLLVM_ENABLE_SPHINX=ON to your first cmake command will enable the “docs-clang-tools-html” target.

For reference, the documentation for LLVM_ENABLE_SPHINX is here.

Yes, that works - thanks!