[libcxx-commits] [libcxx] 4075dda - [libc++] Run clang-tidy only once per header (#121436)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 2 08:30:52 PST 2025


Author: Nikolas Klauser
Date: 2025-01-02T17:30:48+01:00
New Revision: 4075ddad7183e6f0b66e2c8cc7a03b461a8038e6

URL: https://github.com/llvm/llvm-project/commit/4075ddad7183e6f0b66e2c8cc7a03b461a8038e6
DIFF: https://github.com/llvm/llvm-project/commit/4075ddad7183e6f0b66e2c8cc7a03b461a8038e6.diff

LOG: [libc++] Run clang-tidy only once per header (#121436)

There doesn't seem to be much of a reason to run clang-tidy twice per
headers, and running it only once makes the test a few seconds faster.

Added: 
    

Modified: 
    libcxx/.clang-tidy
    libcxx/test/libcxx/clang_tidy.gen.py

Removed: 
    


################################################################################
diff  --git a/libcxx/.clang-tidy b/libcxx/.clang-tidy
index f986e2100ca6b1..ebbfab03792651 100644
--- a/libcxx/.clang-tidy
+++ b/libcxx/.clang-tidy
@@ -5,6 +5,8 @@ Checks: >
   bugprone-stringview-nullptr,
   bugprone-use-after-move,
 
+  libcpp-*,
+
   llvm-include-order,
   llvm-namespace-comment,
 

diff  --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 0db9c0d14b196e..06f277e901d335 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -33,8 +33,7 @@
 {lit_header_undeprecations.get(header, '')}
 
 // TODO: run clang-tidy with modules enabled once they are supported
-// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --checks='-*,libcpp-*' --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- %{{compile_flags}} -fno-modules
-// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy -- -Wweak-vtables %{{compile_flags}} -fno-modules
+// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- -Wweak-vtables %{{compile_flags}} -fno-modules
 
 #include <{header}>
 """)


        


More information about the libcxx-commits mailing list