diff --git a/AK/RefCounted.h b/AK/RefCounted.h index e954692b058..5d98811b0c4 100644 --- a/AK/RefCounted.h +++ b/AK/RefCounted.h @@ -25,6 +25,7 @@ constexpr auto call_will_be_destroyed_if_present(const T* object) -> decltype(co return {}; } +// NOLINTNEXTLINE(cert-dcl50-cpp) variadic argument used to implement "is detected" pattern constexpr auto call_will_be_destroyed_if_present(...) -> FalseType { return {}; @@ -37,6 +38,7 @@ constexpr auto call_one_ref_left_if_present(const T* object) -> decltype(const_c return {}; } +// NOLINTNEXTLINE(cert-dcl50-cpp) variadic argument used to implement "is detected" pattern constexpr auto call_one_ref_left_if_present(...) -> FalseType { return {}; diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 9a8928d6413..a361b42fd0d 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -21,7 +21,7 @@ constexpr auto round_up_to_power_of_two(T value, U power_of_two) requires(IsInte // // clang-format off #ifndef AK_DONT_REPLACE_STD -namespace std { +namespace std { // NOLINT(cert-dcl58-cpp) Names in std to aid tools // NOTE: These are in the "std" namespace since some compilers and static analyzers rely on it. diff --git a/AK/Types.h b/AK/Types.h index 6f998375088..8610a69e0da 100644 --- a/AK/Types.h +++ b/AK/Types.h @@ -61,7 +61,7 @@ constexpr u64 TiB = KiB * KiB * KiB * KiB; constexpr u64 PiB = KiB * KiB * KiB * KiB * KiB; constexpr u64 EiB = KiB * KiB * KiB * KiB * KiB * KiB; -namespace std { +namespace std { //NOLINT(cert-dcl58-cpp) nullptr_t must be in ::std:: for some analysis tools using nullptr_t = decltype(nullptr); } diff --git a/Kernel/Heap/kmalloc.h b/Kernel/Heap/kmalloc.h index 5aa0e21a31e..2b24b39e7db 100644 --- a/Kernel/Heap/kmalloc.h +++ b/Kernel/Heap/kmalloc.h @@ -28,7 +28,7 @@ private: // The C++ standard specifies that the nothrow allocation tag should live in the std namespace. // Otherwise, `new (std::nothrow)` calls wouldn't get resolved. -namespace std { +namespace std { // NOLINT(cert-dcl58-cpp) These declarations must be in ::std and we are not using struct nothrow_t { explicit nothrow_t() = default; }; diff --git a/Kernel/Library/ThreadSafeRefCounted.h b/Kernel/Library/ThreadSafeRefCounted.h index 802dd8574a2..93d23a4dca3 100644 --- a/Kernel/Library/ThreadSafeRefCounted.h +++ b/Kernel/Library/ThreadSafeRefCounted.h @@ -22,6 +22,7 @@ constexpr auto call_will_be_destroyed_if_present(const T* object) -> decltype(co return {}; } +// NOLINTNEXTLINE(cert-dcl50-cpp) variadic argument used to implement "is detected" pattern constexpr auto call_will_be_destroyed_if_present(...) -> FalseType { return {}; @@ -34,6 +35,7 @@ constexpr auto call_one_ref_left_if_present(const T* object) -> decltype(const_c return {}; } +// NOLINTNEXTLINE(cert-dcl50-cpp) variadic argument used to implement "is detected" pattern constexpr auto call_one_ref_left_if_present(...) -> FalseType { return {};