diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/docs/TestingLibcxx.rst @@ -122,6 +122,26 @@ modifying files on your local machine will also modify what the Docker container sees. This is useful for editing source files as you're testing your code in the Docker container. +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. + +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 =============