[libcxx-commits] [PATCH] D141971: [libc++] Document how to build and run clang-tidy checks
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 10 07:18:54 PST 2023
philnik updated this revision to Diff 504138.
philnik marked 2 inline comments as done.
philnik added a comment.
Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141971/new/
https://reviews.llvm.org/D141971
Files:
libcxx/docs/TestingLibcxx.rst
Index: libcxx/docs/TestingLibcxx.rst
===================================================================
--- libcxx/docs/TestingLibcxx.rst
+++ 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
=============
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141971.504138.patch
Type: text/x-patch
Size: 1330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230310/4e7f5358/attachment.bin>
More information about the libcxx-commits
mailing list