Everywhere: Remove 'clang-format off' comments that are no longer needed

https://github.com/SerenityOS/serenity/pull/15654#issuecomment-1322554496
This commit is contained in:
Linus Groh 2022-11-27 12:12:02 +01:00
parent d26aabff04
commit babfc13c84
7 changed files with 1 additions and 21 deletions

View file

@ -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
{

View file

@ -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

View file

@ -30,10 +30,6 @@ requires(AK::Detail::IsIntegral<T>)
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 <utility>
# include <utility>
#endif
// clang-format on
using std::forward;
using std::move;

View file

@ -216,10 +216,8 @@ public:
other.exchange(ptr);
}
// clang-format off
private:
NonnullLockRefPtr() = delete;
// clang-format on
ALWAYS_INLINE T* as_ptr() const
{

View file

@ -183,12 +183,9 @@ static constexpr Array<Span<@type@ const>, @size@ + 1> @name@ { {
)~~~");
}
// clang-format off
// clang-format gets confused by the requires() clauses above, and formats this section very weirdly.
protected:
Vector<StorageType> m_storage;
HashMap<StorageType, size_t> m_storage_indices;
// clang-format on
};
class UniqueStringStorage : public UniqueStorage<String> {

View file

@ -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<typename T, size_t Size = 32>
// 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;

View file

@ -2540,8 +2540,6 @@ Optional<ECMA262Parser::PropertyEscape> 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 = [&]<typename... Ts>(Ts&&... terminators) {
auto start_token = m_parser_state.current_token;
size_t offset = 0;
@ -2554,7 +2552,6 @@ Optional<ECMA262Parser::PropertyEscape> 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);