Commit 5c1b36e6 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[clang-tidy] Use explicit default

See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: I1e971f57831bbf901c79ff4894a951b8dbe615e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219410
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68080}
parent 34ab998f
......@@ -201,8 +201,6 @@ auto seal(const typename implement<C>::type* x) -> const C* {
// Configuration
struct ConfigImpl {
ConfigImpl() {}
~ConfigImpl() {}
};
template <>
......@@ -375,7 +373,7 @@ ValTypeImpl* valtype_f64 = new ValTypeImpl(F64);
ValTypeImpl* valtype_anyref = new ValTypeImpl(ANYREF);
ValTypeImpl* valtype_funcref = new ValTypeImpl(FUNCREF);
ValType::~ValType() {}
ValType::~ValType() = default;
void ValType::operator delete(void*) {}
......@@ -417,7 +415,7 @@ struct ExternTypeImpl {
ExternKind kind;
explicit ExternTypeImpl(ExternKind kind) : kind(kind) {}
virtual ~ExternTypeImpl() {}
virtual ~ExternTypeImpl() = default;
};
template <>
......@@ -455,8 +453,6 @@ struct FuncTypeImpl : ExternTypeImpl {
: ExternTypeImpl(EXTERN_FUNC),
params(std::move(params)),
results(std::move(results)) {}
~FuncTypeImpl() override {}
};
template <>
......@@ -464,7 +460,7 @@ struct implement<FuncType> {
using type = FuncTypeImpl;
};
FuncType::~FuncType() {}
FuncType::~FuncType() = default;
auto FuncType::make(ownvec<ValType>&& params, ownvec<ValType>&& results)
-> own<FuncType> {
......@@ -510,7 +506,7 @@ struct GlobalTypeImpl : ExternTypeImpl {
content(std::move(content)),
mutability(mutability) {}
~GlobalTypeImpl() override {}
~GlobalTypeImpl() override = default;
};
template <>
......@@ -518,7 +514,7 @@ struct implement<GlobalType> {
using type = GlobalTypeImpl;
};
GlobalType::~GlobalType() {}
GlobalType::~GlobalType() = default;
auto GlobalType::make(own<ValType>&& content, Mutability mutability)
-> own<GlobalType> {
......@@ -563,7 +559,7 @@ struct TableTypeImpl : ExternTypeImpl {
element(std::move(element)),
limits(limits) {}
~TableTypeImpl() override {}
~TableTypeImpl() override = default;
};
template <>
......@@ -571,7 +567,7 @@ struct implement<TableType> {
using type = TableTypeImpl;
};
TableType::~TableType() {}
TableType::~TableType() = default;
auto TableType::make(own<ValType>&& element, Limits limits) -> own<TableType> {
return element ? own<TableType>(seal<TableType>(
......@@ -609,7 +605,7 @@ struct MemoryTypeImpl : ExternTypeImpl {
explicit MemoryTypeImpl(Limits limits)
: ExternTypeImpl(EXTERN_MEMORY), limits(limits) {}
~MemoryTypeImpl() override {}
~MemoryTypeImpl() override = default;
};
template <>
......@@ -617,7 +613,7 @@ struct implement<MemoryType> {
using type = MemoryTypeImpl;
};
MemoryType::~MemoryType() {}
MemoryType::~MemoryType() = default;
auto MemoryType::make(Limits limits) -> own<MemoryType> {
return own<MemoryType>(
......@@ -655,8 +651,6 @@ struct ImportTypeImpl {
: module(std::move(module)),
name(std::move(name)),
type(std::move(type)) {}
~ImportTypeImpl() {}
};
template <>
......@@ -697,8 +691,6 @@ struct ExportTypeImpl {
ExportTypeImpl(Name& name, // NOLINT(runtime/references)
own<ExternType>& type) // NOLINT(runtime/references)
: name(std::move(name)), type(std::move(type)) {}
~ExportTypeImpl() {}
};
template <>
......@@ -767,7 +759,7 @@ class RefImpl {
}
private:
RefImpl() {}
RefImpl() = default;
i::Address* location() const {
return reinterpret_cast<i::Address*>(val_.address());
......@@ -813,8 +805,6 @@ struct FrameImpl {
func_offset(func_offset),
module_offset(module_offset) {}
~FrameImpl() {}
own<Instance> instance;
uint32_t func_index;
size_t func_offset;
......@@ -854,7 +844,7 @@ struct implement<Trap> {
using type = RefImpl<Trap, i::JSReceiver>;
};
Trap::~Trap() {}
Trap::~Trap() = default;
auto Trap::copy() const -> own<Trap> { return impl(this)->copy(); }
......@@ -941,7 +931,7 @@ struct implement<Foreign> {
using type = RefImpl<Foreign, i::JSReceiver>;
};
Foreign::~Foreign() {}
Foreign::~Foreign() = default;
auto Foreign::copy() const -> own<Foreign> { return impl(this)->copy(); }
......@@ -962,7 +952,7 @@ struct implement<Module> {
using type = RefImpl<Module, i::WasmModuleObject>;
};
Module::~Module() {}
Module::~Module() = default;
auto Module::copy() const -> own<Module> { return impl(this)->copy(); }
......@@ -1106,7 +1096,7 @@ struct implement<Extern> {
using type = RefImpl<Extern, i::JSReceiver>;
};
Extern::~Extern() {}
Extern::~Extern() = default;
auto Extern::copy() const -> own<Extern> { return impl(this)->copy(); }
......@@ -1177,7 +1167,7 @@ struct implement<Func> {
using type = RefImpl<Func, i::JSFunction>;
};
Func::~Func() {}
Func::~Func() = default;
auto Func::copy() const -> own<Func> { return impl(this)->copy(); }
......@@ -1662,7 +1652,7 @@ struct implement<Global> {
using type = RefImpl<Global, i::WasmGlobalObject>;
};
Global::~Global() {}
Global::~Global() = default;
auto Global::copy() const -> own<Global> { return impl(this)->copy(); }
......@@ -1754,7 +1744,7 @@ struct implement<Table> {
using type = RefImpl<Table, i::WasmTableObject>;
};
Table::~Table() {}
Table::~Table() = default;
auto Table::copy() const -> own<Table> { return impl(this)->copy(); }
......@@ -1873,7 +1863,7 @@ struct implement<Memory> {
using type = RefImpl<Memory, i::WasmMemoryObject>;
};
Memory::~Memory() {}
Memory::~Memory() = default;
auto Memory::copy() const -> own<Memory> { return impl(this)->copy(); }
......@@ -1941,7 +1931,7 @@ struct implement<Instance> {
using type = RefImpl<Instance, i::WasmInstanceObject>;
};
Instance::~Instance() {}
Instance::~Instance() = default;
auto Instance::copy() const -> own<Instance> { return impl(this)->copy(); }
......
......@@ -43,7 +43,7 @@ class StoreImpl {
private:
friend own<Store> Store::make(Engine*);
StoreImpl() {}
StoreImpl() = default;
v8::Isolate::CreateParams create_params_;
v8::Isolate* isolate_ = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment