diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h index 4b888282c0..069ac05c85 100644 --- a/AK/NonnullRefPtr.h +++ b/AK/NonnullRefPtr.h @@ -210,10 +210,8 @@ public: return m_ptr == other; } - // clang-format off private: NonnullRefPtr() = delete; - // clang-format on ALWAYS_INLINE RETURNS_NONNULL T* as_nonnull_ptr() const { diff --git a/AK/Platform.h b/AK/Platform.h index a3def1f20e..e8104d208c 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -76,8 +76,6 @@ # define AK_OS_WINDOWS #endif -// FIXME: Remove clang-format suppression after https://github.com/llvm/llvm-project/issues/56602 resolved -// clang-format off #if defined(__ANDROID__) # define STR(x) __STR(x) # define __STR(x) #x @@ -89,7 +87,6 @@ # undef __STR # define AK_OS_ANDROID #endif -// clang-format on #if defined(__EMSCRIPTEN__) # define AK_OS_EMSCRIPTEN diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index d23d283aa2..0600889309 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -30,10 +30,6 @@ requires(AK::Detail::IsIntegral) return value && !((value) & (value - 1)); } -// HACK: clang-format does not format this correctly because of the requires clause above. -// Disabling formatting for that doesn't help either. -// -// clang-format off #ifndef AK_DONT_REPLACE_STD namespace std { // NOLINT(cert-dcl58-cpp) Names in std to aid tools @@ -60,9 +56,8 @@ constexpr T&& move(T& arg) } #else -#include +# include #endif -// clang-format on using std::forward; using std::move; diff --git a/Kernel/Library/NonnullLockRefPtr.h b/Kernel/Library/NonnullLockRefPtr.h index 685b6dfe8d..97140bb619 100644 --- a/Kernel/Library/NonnullLockRefPtr.h +++ b/Kernel/Library/NonnullLockRefPtr.h @@ -216,10 +216,8 @@ public: other.exchange(ptr); } - // clang-format off private: NonnullLockRefPtr() = delete; - // clang-format on ALWAYS_INLINE T* as_ptr() const { diff --git a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h index 300445b616..1c28e08bca 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h +++ b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h @@ -183,12 +183,9 @@ static constexpr Array, @size@ + 1> @name@ { { )~~~"); } - // clang-format off - // clang-format gets confused by the requires() clauses above, and formats this section very weirdly. protected: Vector m_storage; HashMap m_storage_indices; - // clang-format on }; class UniqueStringStorage : public UniqueStorage { diff --git a/Userland/Libraries/LibCore/SharedCircularQueue.h b/Userland/Libraries/LibCore/SharedCircularQueue.h index 4c571cd040..23a529bd91 100644 --- a/Userland/Libraries/LibCore/SharedCircularQueue.h +++ b/Userland/Libraries/LibCore/SharedCircularQueue.h @@ -41,12 +41,10 @@ namespace Core { // This class is designed to be transferred over IPC and mmap()ed into multiple processes' memory. // It is a synthetic pointer to the actual shared memory, which is abstracted away from the user. // FIXME: Make this independent of shared memory, so that we can move it to AK. -// clang-format off template // Size must be a power of two, which speeds up the modulus operations for indexing. requires(popcount(Size) == 1) class SharedSingleProducerCircularQueue final { - // clang-format on public: using ValueType = T; diff --git a/Userland/Libraries/LibRegex/RegexParser.cpp b/Userland/Libraries/LibRegex/RegexParser.cpp index b37a85651e..05881bf8ea 100644 --- a/Userland/Libraries/LibRegex/RegexParser.cpp +++ b/Userland/Libraries/LibRegex/RegexParser.cpp @@ -2540,8 +2540,6 @@ Optional ECMA262Parser::read_unicode_property_esc { consume(TokenType::LeftCurly, Error::InvalidPattern); - // Note: clang-format is disabled here because it doesn't handle templated lambdas yet. - // clang-format off auto read_until = [&](Ts&&... terminators) { auto start_token = m_parser_state.current_token; size_t offset = 0; @@ -2554,7 +2552,6 @@ Optional ECMA262Parser::read_unicode_property_esc return StringView { start_token.value().characters_without_null_termination(), offset }; }; - // clang-format on StringView property_type; StringView property_name = read_until("="sv, "}"sv);