-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Re-enable Clang-tidy checks in the CI #110026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This requires #99819 to be fixed, IIUC. |
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesFull diff: https://github.com/llvm/llvm-project/pull/110026.diff 1 Files Affected:
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 0e1d3506a99735..92e1a2b4553c84 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -1,6 +1,3 @@
-# TODO: Re-enable the tests once the CI is back under control
-return()
-
# The find_package changes these variables. This leaves the build in an odd
# state. Calling cmake a second time tries to write site config information in
# the system's libc++. Restoring these setting after testing fixes this issue.
|
bdbde1a
to
8afe133
Compare
f67c0b0
to
191a05b
Compare
You can test this locally with the following command:darker --check --diff -r 820403c4e04db1f4adc8528bec33d393a5be3856...6cb289b45a630f37bdbdb9ef59d3961fb572237b libcxx/test/libcxx/clang_tidy.gen.py View the diff from darker here.--- clang_tidy.gen.py 2024-11-29 20:03:37.000000 +0000
+++ clang_tidy.gen.py 2024-11-29 21:52:11.090798 +0000
@@ -13,14 +13,19 @@
# block Lit from interpreting a RUN/XFAIL/etc inside the generation script
# END.
import sys
sys.path.append(sys.argv[1])
-from libcxx.header_information import lit_header_restrictions, lit_header_undeprecations, public_headers
+from libcxx.header_information import (
+ lit_header_restrictions,
+ lit_header_undeprecations,
+ public_headers,
+)
for header in public_headers:
- print(f"""\
+ print(
+ f"""\
//--- {header}.sh.cpp
// REQUIRES: has-clang-tidy
// The GCC compiler flags are not always compatible with clang-tidy.
@@ -35,6 +40,7 @@
// 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
#include <{header}>
-""")
+"""
+ )
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
@@ -998,7 +998,6 @@ constexpr chrono::year operator ""y(unsigned lo | |||
# include <cstdint> | |||
# include <stdexcept> | |||
# include <string_view> | |||
# include <vector> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this have to be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It triggers a duplicate include warning with the one in the _LIBCPP_STD_VER <= 20
block below.
Now that we've gained control of our CI docker image again,
we can re-enable the clang-tidy tests.