diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -101,6 +101,27 @@ - clang-query - clang-tidy +Enabling clang-tidy checks +-------------------------- + +We have libc++-specific clang-tidy checks, which have to be compiled before running +clang-tidy. Because of that, there are some additional requirements other than just +having a recent clang-tidy version installed on the system. + +To compile clang-tidy checks, `-DLIBCXX_ENABLE_CLANG_TIDY=On` has to be passed to the +CMake invocation used to compile libc++. For the CMake invocation and compiling libc++ +to succeed, the clang-tidy headers and binaries have to be available on the system. +Here is an overview, which packages are required on a given system: + +============ ================================ +platform required packages +============ ================================ +Debian-based clang-tidy llvm-dev libclang-dev +============ ================================ + +With the listed packages installed, the clang-tidy checks should compile and the +clang-tidy checks will get executed when running the libc++ tests. + Writing Tests -------------