Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tcmalloc/testing/aligned_new_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ TYPED_TEST_P(AlignedNew, ArraySizeCheckSampling) {
// track of the true size of arrays so that the proper number of destructors
// can be invoked.
struct NonTrivial {
virtual ~NonTrivial() {}
virtual ~NonTrivial() = default;

TypeParam p;
};

static_assert(!std::is_trivially_destructible<NonTrivial>::value,
static_assert(!std::is_trivially_destructible_v<NonTrivial>,
"NonTrivial should have a nontrivial destructor.");

// The HeapLeakChecker initializes malloc hooks which we call prior to looking
Expand Down
2 changes: 1 addition & 1 deletion tcmalloc/testing/tcmalloc_large_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class NoErrnoRegionFactory final : public AddressRegionFactory {
public:
explicit NoErrnoRegionFactory(AddressRegionFactory* underlying)
: underlying_(underlying) {}
~NoErrnoRegionFactory() override {}
~NoErrnoRegionFactory() override = default;

AddressRegion* Create(void* start, size_t size, UsageHint hint) override {
AddressRegion* underlying_region = underlying_->Create(start, size, hint);
Expand Down
4 changes: 2 additions & 2 deletions tcmalloc/testing/tcmalloc_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ TEST(TCMallocTest, NothrowSizedDelete) {

TEST(TCMallocTest, NothrowSizedDeleteArray) {
struct Foo {
~Foo() {}
~Foo() = default;
double a;
};
// Foo should correspond to a size class used by new, but not by malloc,
Expand All @@ -521,7 +521,7 @@ TEST(TCMallocTest, NothrowSizedDeleteArray) {
static_assert(sizeof(Foo) == 8, "Unexpected size for Foo");
// With a non-trivially destructible type, we expect the compiler to insert a
// size cookie so it can invoke sized delete[].
static_assert(!std::is_trivially_destructible<Foo>::value,
static_assert(!std::is_trivially_destructible_v<Foo>,
"Foo should not be trivially destructable, for sized delete[]");

static constexpr int kNum = 100;
Expand Down
Loading