Skip to content

Commit

Permalink
[libc++] Run clang-tidy only once per header (llvm#121436)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
philnik777 authored Jan 2, 2025
1 parent 40ac34c commit 4075dda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libcxx/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Checks: >
bugprone-stringview-nullptr,
bugprone-use-after-move,
libcpp-*,
llvm-include-order,
llvm-namespace-comment,
Expand Down
3 changes: 1 addition & 2 deletions libcxx/test/libcxx/clang_tidy.gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
""")

0 comments on commit 4075dda

Please sign in to comment.