[libcxx-commits] [libcxx] [libc++] Re-enable Clang-tidy checks in the CI (PR #110026)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 28 13:50:58 PST 2024
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/110026
>From 8afe133b426d6cb93ba4aae51bcefe8b96b5a09b Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 25 Sep 2024 14:54:43 -0400
Subject: [PATCH 1/2] [libc++] Re-enable Clang-tidy checks in the CI
---
libcxx/test/tools/clang_tidy_checks/CMakeLists.txt | 3 ---
1 file changed, 3 deletions(-)
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.
>From f67c0b0ab774a3a4bff7a1ec68024eddd2e10f46 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 28 Nov 2024 16:50:47 -0500
Subject: [PATCH 2/2] Fix a few clang-tidy issues that crept into the code base
while it was disabled
---
libcxx/include/ccomplex | 4 +++-
libcxx/include/chrono | 1 -
libcxx/include/ciso646 | 1 +
libcxx/include/cstdalign | 6 ++++--
libcxx/include/cstdbool | 6 ++++--
libcxx/include/ctgmath | 2 ++
6 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/libcxx/include/ccomplex b/libcxx/include/ccomplex
index d379c9e7f0174a..510a36fdddce5e 100644
--- a/libcxx/include/ccomplex
+++ b/libcxx/include/ccomplex
@@ -26,12 +26,14 @@
#if _LIBCPP_STD_VER >= 20
using __standard_header_ccomplex _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.") = void;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
using __use_standard_header_ccomplex = __standard_header_ccomplex;
#elif _LIBCPP_STD_VER >= 17
using __standard_header_ccomplex _LIBCPP_DEPRECATED_("Include <complex> instead.") = void;
-using __use_standard_header_ccomplex = __standard_header_ccomplex;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
+using __use_standard_header_ccomplex = __standard_header_ccomplex;
#endif
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 <cstdint>
# include <stdexcept>
# include <string_view>
-# include <vector>
#endif
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
diff --git a/libcxx/include/ciso646 b/libcxx/include/ciso646
index 5fcac79e38a7f2..d94407aba334b2 100644
--- a/libcxx/include/ciso646
+++ b/libcxx/include/ciso646
@@ -24,6 +24,7 @@
#if _LIBCPP_STD_VER >= 20
using __standard_header_ciso646 _LIBCPP_DEPRECATED_("removed in C++20. Include <version> instead.") = void;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
using __use_standard_header_ciso646 = __standard_header_ciso646;
#endif
diff --git a/libcxx/include/cstdalign b/libcxx/include/cstdalign
index e6a2a3c7177422..c36da3fe8dc4c2 100644
--- a/libcxx/include/cstdalign
+++ b/libcxx/include/cstdalign
@@ -43,12 +43,14 @@ Macros:
#if _LIBCPP_STD_VER >= 20
using __standard_header_cstdalign _LIBCPP_DEPRECATED_("removed in C++20.") = void;
-using __use_standard_header_cstdalign = __standard_header_cstdalign;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
+using __use_standard_header_cstdalign = __standard_header_cstdalign;
#elif _LIBCPP_STD_VER >= 17
using __standard_header_cstdalign _LIBCPP_DEPRECATED = void;
-using __use_standard_header_cstdalign = __standard_header_cstdalign;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
+using __use_standard_header_cstdalign = __standard_header_cstdalign;
#endif
diff --git a/libcxx/include/cstdbool b/libcxx/include/cstdbool
index 1d627258e10c09..5888859e71169c 100644
--- a/libcxx/include/cstdbool
+++ b/libcxx/include/cstdbool
@@ -31,12 +31,14 @@ Macros:
#if _LIBCPP_STD_VER >= 20
using __standard_header_cstdbool _LIBCPP_DEPRECATED_("removed in C++20.") = void;
-using __use_standard_header_cstdbool = __standard_header_cstdbool;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
+using __use_standard_header_cstdbool = __standard_header_cstdbool;
#elif _LIBCPP_STD_VER >= 17
using __standard_header_cstdbool _LIBCPP_DEPRECATED = void;
-using __use_standard_header_cstdbool = __standard_header_cstdbool;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
+using __use_standard_header_cstdbool = __standard_header_cstdbool;
#endif
diff --git a/libcxx/include/ctgmath b/libcxx/include/ctgmath
index 7dbe952f021b74..088627ba822c66 100644
--- a/libcxx/include/ctgmath
+++ b/libcxx/include/ctgmath
@@ -28,11 +28,13 @@
#if _LIBCPP_STD_VER >= 20
using __standard_header_ctgmath _LIBCPP_DEPRECATED_("removed in C++20. Include <cmath> and <complex> instead.") = void;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
using __use_standard_header_ctgmath = __standard_header_ctgmath;
#elif _LIBCPP_STD_VER >= 17
using __standard_header_ctgmath _LIBCPP_DEPRECATED_("Include <cmath> and <complex> instead.") = void;
+// NOLINTNEXTLINE(clang-diagnostic-deprecated-declarations)
using __use_standard_header_ctgmath = __standard_header_ctgmath;
#endif
More information about the libcxx-commits
mailing list