[libcxx-commits] [libcxx] [libc++] Run clang-tidy only once per header (PR #121436)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 1 05:27:07 PST 2025
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/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.
>From 3596a1f4217c26de0f237c8e2681c8574b6d17d3 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 1 Jan 2025 14:25:35 +0100
Subject: [PATCH] [libc++] Run clang-tidy only once per header
---
libcxx/.clang-tidy | 2 ++
libcxx/test/libcxx/clang_tidy.gen.py | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
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