Skip to content

Commit

Permalink
Revert "Use wildcards in NOLINT clang-tidy suppressions to shorten th…
Browse files Browse the repository at this point in the history
…eir lines"

This reverts commit d15bbe9.
  • Loading branch information
laurynas-biveinis committed Oct 19, 2023
1 parent d15bbe9 commit 325bf7c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion heap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ template <typename T>

inline void free_aligned(void* ptr) noexcept {
#ifndef _MSC_VER
// NOLINTNEXTLINE(*-no-malloc,cppcoreguidelines-owning-memory)
// NOLINTNEXTLINE(cppcoreguidelines-no-malloc,cppcoreguidelines-owning-memory,hicpp-no-malloc)
free(ptr);
#else
_aligned_free(ptr);
Expand Down
4 changes: 2 additions & 2 deletions in_fake_critical_section.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class [[nodiscard]] in_fake_critical_section final {
in_fake_critical_section &operator=(in_fake_critical_section &&) = delete;

// Return nothing as we never chain assignments for now.
// NOLINTNEXTLINE(*-assignment-signature,misc-unconventional-assign-operator)
// NOLINTNEXTLINE(cppcoreguidelines-c-copy-assignment-signature,misc-unconventional-assign-operator)
constexpr void operator=(T new_value) noexcept { value = new_value; }

// NOLINTNEXTLINE(*-assignment-signature,misc-unconventional-assign-operator)
// NOLINTNEXTLINE(cppcoreguidelines-c-copy-assignment-signature,misc-unconventional-assign-operator)
constexpr void operator=(in_fake_critical_section<T> new_value) noexcept {
value = new_value;
}
Expand Down
6 changes: 3 additions & 3 deletions test_heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
void* operator new(std::size_t count) {
unodb::test::allocation_failure_injector::maybe_fail();
while (true) {
// NOLINTNEXTLINE(*-no-malloc,cppcoreguidelines-owning-memory)
// NOLINTNEXTLINE(cppcoreguidelines-no-malloc,cppcoreguidelines-owning-memory,hicpp-no-malloc)
void* const result = malloc(count);
if (UNODB_DETAIL_LIKELY(result != nullptr)) return result;
// LCOV_EXCL_START
Expand All @@ -31,13 +31,13 @@ void* operator new(std::size_t count) {
}

void operator delete(void* ptr) noexcept {
// NOLINTNEXTLINE(*-no-malloc,cppcoreguidelines-owning-memory)
// NOLINTNEXTLINE(cppcoreguidelines-no-malloc,cppcoreguidelines-owning-memory,hicpp-no-malloc)
free(ptr);
}

UNODB_DETAIL_DISABLE_CLANG_WARNING("-Wmissing-prototypes")
void operator delete(void* ptr, std::size_t) noexcept {
// NOLINTNEXTLINE(*-no-malloc,cppcoreguidelines-owning-memory)
// NOLINTNEXTLINE(cppcoreguidelines-no-malloc,cppcoreguidelines-owning-memory,hicpp-no-malloc)
free(ptr);
}
UNODB_DETAIL_RESTORE_CLANG_WARNINGS()
Expand Down
2 changes: 1 addition & 1 deletion thread_sync.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class [[nodiscard]] thread_sync final {
bool flag{false};
};

// NOLINTNEXTLINE(*-non-const-global-variables,*-statically-constructed-objects)
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables,fuchsia-statically-constructed-objects)
inline std::array<thread_sync, 6> thread_syncs;

} // namespace unodb::detail
Expand Down

0 comments on commit 325bf7c

Please sign in to comment.