From 3d437893c3b8431a35f5edb65409f0d0fb0e2d95 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 2 Dec 2024 14:26:28 -0500 Subject: [PATCH] [libc++] Re-enable Clang-tidy checks in the CI (#110026) Now that we've gained control of our CI docker image again, we can re-enable the clang-tidy tests. --- libcxx/include/chrono | 1 - libcxx/test/libcxx/clang_tidy.gen.py | 3 ++- libcxx/test/tools/clang_tidy_checks/CMakeLists.txt | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 42da1b4ab97562..1545490d9b6c64 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -998,7 +998,6 @@ constexpr chrono::year operator ""y(unsigned lo # include # include # include -# include #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py index 5e84fbbb9913f3..0db9c0d14b196e 100644 --- a/libcxx/test/libcxx/clang_tidy.gen.py +++ b/libcxx/test/libcxx/clang_tidy.gen.py @@ -15,7 +15,7 @@ import sys sys.path.append(sys.argv[1]) -from libcxx.header_information import lit_header_restrictions, public_headers +from libcxx.header_information import lit_header_restrictions, lit_header_undeprecations, public_headers for header in public_headers: print(f"""\ @@ -30,6 +30,7 @@ // UNSUPPORTED: clang-17 {lit_header_restrictions.get(header, '')} +{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 diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt index efe63e0f625f2e..05c44e49b448cd 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.