Commit 064c3833 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Refactor torque compiler to use default members.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I9f76c7d530b22a030c9969dfee821e0896c358fb
Reviewed-on: https://chromium-review.googlesource.com/1224171
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55989}
parent 5e16d3ba
......@@ -90,7 +90,7 @@ struct AstNode {
};
AstNode(Kind kind, SourcePosition pos) : kind(kind), pos(pos) {}
virtual ~AstNode() {}
virtual ~AstNode() = default;
const Kind kind;
SourcePosition pos;
......
......@@ -24,7 +24,7 @@ class Generic;
class Declarable {
public:
virtual ~Declarable() {}
virtual ~Declarable() = default;
enum Kind {
kVariable,
kParameter,
......
......@@ -219,7 +219,7 @@ class Declarations::ScopedGenericScopeChainSnapshot {
ScopedGenericScopeChainSnapshot(Declarations* declarations,
const SpecializationKey& key)
: restorer_(declarations->generic_declaration_scopes_[key.first]) {}
~ScopedGenericScopeChainSnapshot() {}
~ScopedGenericScopeChainSnapshot() = default;
private:
ScopeChain::ScopedSnapshotRestorer restorer_;
......
......@@ -29,7 +29,7 @@ DECLARE_CONTEXTUAL_VARIABLE(CurrentSourcePosition, SourcePosition)
class SourceFileMap : public ContextualClass<SourceFileMap> {
public:
SourceFileMap() {}
SourceFileMap() = default;
static const std::string& GetSource(SourceId source) {
return Get().sources_[source.id_];
}
......
......@@ -44,7 +44,7 @@ class TypeBase {
kUnionType,
kStructType
};
virtual ~TypeBase() {}
virtual ~TypeBase() = default;
bool IsAbstractType() const { return kind() == Kind::kAbstractType; }
bool IsFunctionPointerType() const {
return kind() == Kind::kFunctionPointerType;
......@@ -344,7 +344,7 @@ inline std::ostream& operator<<(std::ostream& os, const Type& t) {
class VisitResult {
public:
VisitResult() {}
VisitResult() = default;
VisitResult(const Type* type, const std::string& value)
: type_(type), value_(value), declarable_{} {}
VisitResult(const Type* type, const Value* declarable);
......
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