tint/ast: Remove move-constructors for AST nodes

These are not used, as the nodes are constructed with a block allocator and always passed by pointer.

Reduces the Tint binary a bit:
7,759,776 -> 7,758,800
Makes some files have 100% code coverage which didn't before.

Bug: tint:1833
Change-Id: Iff4652deba92663677cc53e9506a829d0a4c12bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/124180
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2023-03-15 14:09:40 +00:00 committed by Dawn LUCI CQ
parent 39d4065653
commit 9a56b25a31
96 changed files with 71 additions and 194 deletions

View File

@ -29,8 +29,6 @@ AccessorExpression::AccessorExpression(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, object, program_id);
}
AccessorExpression::AccessorExpression(AccessorExpression&&) = default;
AccessorExpression::~AccessorExpression() = default;
} // namespace tint::ast

View File

@ -28,8 +28,8 @@ class AccessorExpression : public Castable<AccessorExpression, Expression> {
/// @param source the member accessor expression source
/// @param object the object
AccessorExpression(ProgramID pid, NodeID nid, const Source& source, const Expression* object);
/// Move constructor
AccessorExpression(AccessorExpression&&);
/// Destructor
~AccessorExpression() override;
/// The object being accessed

View File

@ -25,8 +25,6 @@ Alias::Alias(ProgramID pid, NodeID nid, const Source& src, const Identifier* n,
TINT_ASSERT(AST, type);
}
Alias::Alias(Alias&&) = default;
Alias::~Alias() = default;
const Alias* Alias::Clone(CloneContext* ctx) const {

View File

@ -32,8 +32,7 @@ class Alias final : public Castable<Alias, TypeDecl> {
/// @param name the symbol for the alias
/// @param subtype the alias'd type
Alias(ProgramID pid, NodeID nid, const Source& src, const Identifier* name, Type subtype);
/// Move constructor
Alias(Alias&&);
/// Destructor
~Alias() override;

View File

@ -32,8 +32,6 @@ AssignmentStatement::AssignmentStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, rhs, program_id);
}
AssignmentStatement::AssignmentStatement(AssignmentStatement&&) = default;
AssignmentStatement::~AssignmentStatement() = default;
const AssignmentStatement* AssignmentStatement::Clone(CloneContext* ctx) const {

View File

@ -34,8 +34,8 @@ class AssignmentStatement final : public Castable<AssignmentStatement, Statement
const Source& source,
const Expression* lhs,
const Expression* rhs);
/// Move constructor
AssignmentStatement(AssignmentStatement&&);
/// Destructor
~AssignmentStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -34,8 +34,6 @@ BinaryExpression::BinaryExpression(ProgramID pid,
TINT_ASSERT(AST, op != BinaryOp::kNone);
}
BinaryExpression::BinaryExpression(BinaryExpression&&) = default;
BinaryExpression::~BinaryExpression() = default;
const BinaryExpression* BinaryExpression::Clone(CloneContext* ctx) const {

View File

@ -31,7 +31,6 @@ BitcastExpression::BitcastExpression(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
}
BitcastExpression::BitcastExpression(BitcastExpression&&) = default;
BitcastExpression::~BitcastExpression() = default;
const BitcastExpression* BitcastExpression::Clone(CloneContext* ctx) const {

View File

@ -34,8 +34,8 @@ class BitcastExpression final : public Castable<BitcastExpression, Expression> {
const Source& source,
Type type,
const Expression* expr);
/// Move constructor
BitcastExpression(BitcastExpression&&);
/// Destructor
~BitcastExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -36,8 +36,6 @@ BlockStatement::BlockStatement(ProgramID pid,
}
}
BlockStatement::BlockStatement(BlockStatement&&) = default;
BlockStatement::~BlockStatement() = default;
const BlockStatement* BlockStatement::Clone(CloneContext* ctx) const {

View File

@ -40,8 +40,8 @@ class BlockStatement final : public Castable<BlockStatement, Statement> {
const Source& source,
utils::VectorRef<const Statement*> statements,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
BlockStatement(BlockStatement&&);
/// Destructor
~BlockStatement() override;
/// @returns true if the block has no statements

View File

@ -29,8 +29,6 @@ BreakIfStatement::BreakIfStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, condition, program_id);
}
BreakIfStatement::BreakIfStatement(BreakIfStatement&&) = default;
BreakIfStatement::~BreakIfStatement() = default;
const BreakIfStatement* BreakIfStatement::Clone(CloneContext* ctx) const {

View File

@ -32,8 +32,7 @@ class BreakIfStatement final : public Castable<BreakIfStatement, Statement> {
/// @param condition the if condition
BreakIfStatement(ProgramID pid, NodeID nid, const Source& src, const Expression* condition);
/// Move constructor
BreakIfStatement(BreakIfStatement&&);
/// Destructor
~BreakIfStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext` `ctx`.

View File

@ -23,8 +23,6 @@ namespace tint::ast {
BreakStatement::BreakStatement(ProgramID pid, NodeID nid, const Source& src)
: Base(pid, nid, src) {}
BreakStatement::BreakStatement(BreakStatement&&) = default;
BreakStatement::~BreakStatement() = default;
const BreakStatement* BreakStatement::Clone(CloneContext* ctx) const {

View File

@ -27,8 +27,8 @@ class BreakStatement final : public Castable<BreakStatement, Statement> {
/// @param nid the unique node identifier
/// @param src the source of this node
BreakStatement(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
BreakStatement(BreakStatement&&);
/// Destructor
~BreakStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -219,6 +219,7 @@ struct TextureOverloadCase {
bool /* returns_value */);
/// Copy constructor
TextureOverloadCase(const TextureOverloadCase&);
/// Destructor
~TextureOverloadCase();

View File

@ -36,8 +36,6 @@ CallExpression::CallExpression(ProgramID pid,
}
}
CallExpression::CallExpression(CallExpression&&) = default;
CallExpression::~CallExpression() = default;
const CallExpression* CallExpression::Clone(CloneContext* ctx) const {

View File

@ -43,8 +43,7 @@ class CallExpression final : public Castable<CallExpression, Expression> {
const IdentifierExpression* target,
utils::VectorRef<const Expression*> args);
/// Move constructor
CallExpression(CallExpression&&);
/// Destructor
~CallExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -29,8 +29,6 @@ CallStatement::CallStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
}
CallStatement::CallStatement(CallStatement&&) = default;
CallStatement::~CallStatement() = default;
const CallStatement* CallStatement::Clone(CloneContext* ctx) const {

View File

@ -29,8 +29,8 @@ class CallStatement final : public Castable<CallStatement, Statement> {
/// @param src the source of this node for the statement
/// @param call the function
CallStatement(ProgramID pid, NodeID nid, const Source& src, const CallExpression* call);
/// Move constructor
CallStatement(CallStatement&&);
/// Destructor
~CallStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -25,8 +25,6 @@ namespace tint::ast {
CaseSelector::CaseSelector(ProgramID pid, NodeID nid, const Source& src, const Expression* e)
: Base(pid, nid, src), expr(e) {}
CaseSelector::CaseSelector(CaseSelector&&) = default;
CaseSelector::~CaseSelector() = default;
const CaseSelector* CaseSelector::Clone(CloneContext* ctx) const {

View File

@ -31,8 +31,8 @@ class CaseSelector final : public Castable<CaseSelector, Node> {
/// @param src the source of this node
/// @param expr the selector expression, |nullptr| for a `default` selector
CaseSelector(ProgramID pid, NodeID nid, const Source& src, const Expression* expr = nullptr);
/// Move constructor
CaseSelector(CaseSelector&&);
/// Destructor
~CaseSelector() override;
/// @returns true if this is a default statement

View File

@ -37,8 +37,6 @@ CaseStatement::CaseStatement(ProgramID pid,
}
}
CaseStatement::CaseStatement(CaseStatement&&) = default;
CaseStatement::~CaseStatement() = default;
bool CaseStatement::ContainsDefault() const {

View File

@ -36,8 +36,8 @@ class CaseStatement final : public Castable<CaseStatement, Statement> {
const Source& src,
utils::VectorRef<const CaseSelector*> selectors,
const BlockStatement* body);
/// Move constructor
CaseStatement(CaseStatement&&);
/// Destructor
~CaseStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -33,8 +33,6 @@ CompoundAssignmentStatement::CompoundAssignmentStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, rhs, program_id);
}
CompoundAssignmentStatement::CompoundAssignmentStatement(CompoundAssignmentStatement&&) = default;
CompoundAssignmentStatement::~CompoundAssignmentStatement() = default;
const CompoundAssignmentStatement* CompoundAssignmentStatement::Clone(CloneContext* ctx) const {

View File

@ -37,8 +37,8 @@ class CompoundAssignmentStatement final : public Castable<CompoundAssignmentStat
const Expression* lhs,
const Expression* rhs,
BinaryOp op);
/// Move constructor
CompoundAssignmentStatement(CompoundAssignmentStatement&&);
/// Destructor
~CompoundAssignmentStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -33,8 +33,6 @@ Const::Const(ProgramID pid,
TINT_ASSERT(AST, init != nullptr);
}
Const::Const(Const&&) = default;
Const::~Const() = default;
const char* Const::Kind() const {

View File

@ -48,9 +48,6 @@ class Const final : public Castable<Const, Variable> {
const Expression* initializer,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Const(Const&&);
/// Destructor
~Const() override;

View File

@ -26,8 +26,6 @@ ConstAssert::ConstAssert(ProgramID pid, NodeID nid, const Source& src, const Exp
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, cond, program_id);
}
ConstAssert::ConstAssert(ConstAssert&&) = default;
ConstAssert::~ConstAssert() = default;
const ConstAssert* ConstAssert::Clone(CloneContext* ctx) const {

View File

@ -30,9 +30,6 @@ class ConstAssert final : public Castable<ConstAssert, Statement> {
/// @param condition the assertion condition
ConstAssert(ProgramID pid, NodeID nid, const Source& source, const Expression* condition);
/// Move constructor
ConstAssert(ConstAssert&&);
/// Destructor
~ConstAssert() override;

View File

@ -23,8 +23,6 @@ namespace tint::ast {
ContinueStatement::ContinueStatement(ProgramID pid, NodeID nid, const Source& src)
: Base(pid, nid, src) {}
ContinueStatement::ContinueStatement(ContinueStatement&&) = default;
ContinueStatement::~ContinueStatement() = default;
const ContinueStatement* ContinueStatement::Clone(CloneContext* ctx) const {

View File

@ -27,8 +27,8 @@ class ContinueStatement final : public Castable<ContinueStatement, Statement> {
/// @param nid the unique node identifier
/// @param src the source of this node
ContinueStatement(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
ContinueStatement(ContinueStatement&&);
/// Destructor
~ContinueStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -22,6 +22,8 @@
namespace tint::ast {
DiagnosticControl::DiagnosticControl() = default;
DiagnosticControl::DiagnosticControl(builtin::DiagnosticSeverity sev, const Identifier* rule)
: severity(sev), rule_name(rule) {
TINT_ASSERT(AST, rule != nullptr);
@ -31,4 +33,6 @@ DiagnosticControl::DiagnosticControl(builtin::DiagnosticSeverity sev, const Iden
}
}
DiagnosticControl::DiagnosticControl(DiagnosticControl&&) = default;
} // namespace tint::ast

View File

@ -32,13 +32,16 @@ namespace tint::ast {
struct DiagnosticControl {
public:
/// Default constructor.
DiagnosticControl() {}
DiagnosticControl();
/// Constructor
/// @param sev the diagnostic severity
/// @param rule the diagnostic rule name
DiagnosticControl(builtin::DiagnosticSeverity sev, const Identifier* rule);
/// Move constructor
DiagnosticControl(DiagnosticControl&&);
/// The diagnostic severity control.
builtin::DiagnosticSeverity severity;

View File

@ -26,8 +26,6 @@ DiagnosticDirective::DiagnosticDirective(ProgramID pid,
DiagnosticControl&& dc)
: Base(pid, nid, src), control(std::move(dc)) {}
DiagnosticDirective::DiagnosticDirective(DiagnosticDirective&&) = default;
DiagnosticDirective::~DiagnosticDirective() = default;
const DiagnosticDirective* DiagnosticDirective::Clone(CloneContext* ctx) const {

View File

@ -38,9 +38,6 @@ class DiagnosticDirective final : public Castable<DiagnosticDirective, Node> {
/// @param dc the diagnostic control
DiagnosticDirective(ProgramID pid, NodeID nid, const Source& src, DiagnosticControl&& dc);
/// Move constructor
DiagnosticDirective(DiagnosticDirective&&);
/// Destructor
~DiagnosticDirective() override;

View File

@ -23,8 +23,6 @@ namespace tint::ast {
DiscardStatement::DiscardStatement(ProgramID pid, NodeID nid, const Source& src)
: Base(pid, nid, src) {}
DiscardStatement::DiscardStatement(DiscardStatement&&) = default;
DiscardStatement::~DiscardStatement() = default;
const DiscardStatement* DiscardStatement::Clone(CloneContext* ctx) const {

View File

@ -27,8 +27,8 @@ class DiscardStatement final : public Castable<DiscardStatement, Statement> {
/// @param nid the unique node identifier
/// @param src the source of this node
DiscardStatement(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
DiscardStatement(DiscardStatement&&);
/// Destructor
~DiscardStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -26,8 +26,6 @@ Enable::Enable(ProgramID pid,
utils::VectorRef<const Extension*> exts)
: Base(pid, nid, src), extensions(std::move(exts)) {}
Enable::Enable(Enable&&) = default;
Enable::~Enable() = default;
bool Enable::HasExtension(builtin::Extension ext) const {

View File

@ -36,9 +36,8 @@ class Enable final : public Castable<Enable, Node> {
/// @param src the source of this node
/// @param exts the extensions being enabled by this directive
Enable(ProgramID pid, NodeID nid, const Source& src, utils::VectorRef<const Extension*> exts);
/// Move constructor
Enable(Enable&&);
/// Destructor
~Enable() override;
/// @param ext the extension to search for

View File

@ -20,8 +20,6 @@ namespace tint::ast {
Expression::Expression(ProgramID pid, NodeID nid, const Source& src) : Base(pid, nid, src) {}
Expression::Expression(Expression&&) = default;
Expression::~Expression() = default;
} // namespace tint::ast

View File

@ -33,8 +33,6 @@ class Expression : public Castable<Expression, Node> {
/// @param nid the unique node identifier
/// @param src the source of this node
Expression(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
Expression(Expression&&);
};
} // namespace tint::ast

View File

@ -26,8 +26,6 @@ namespace tint::ast {
Extension::Extension(ProgramID pid, NodeID nid, const Source& src, builtin::Extension ext)
: Base(pid, nid, src), name(ext) {}
Extension::Extension(Extension&&) = default;
Extension::~Extension() = default;
const Extension* Extension::Clone(CloneContext* ctx) const {

View File

@ -32,9 +32,8 @@ class Extension final : public Castable<Extension, Node> {
/// @param src the source of this node
/// @param ext the extension
Extension(ProgramID pid, NodeID nid, const Source& src, builtin::Extension ext);
/// Move constructor
Extension(Extension&&);
/// Destructor
~Extension() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -48,8 +48,6 @@ ForLoopStatement::ForLoopStatement(ProgramID pid,
}
}
ForLoopStatement::ForLoopStatement(ForLoopStatement&&) = default;
ForLoopStatement::~ForLoopStatement() = default;
const ForLoopStatement* ForLoopStatement::Clone(CloneContext* ctx) const {

View File

@ -41,8 +41,8 @@ class ForLoopStatement final : public Castable<ForLoopStatement, Statement> {
const Statement* continuing,
const BlockStatement* body,
utils::VectorRef<const ast::Attribute*> attributes);
/// Move constructor
ForLoopStatement(ForLoopStatement&&);
/// Destructor
~ForLoopStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -57,8 +57,6 @@ Function::Function(ProgramID pid,
}
}
Function::Function(Function&&) = default;
Function::~Function() = default;
PipelineStage Function::PipelineStage() const {

View File

@ -59,9 +59,8 @@ class Function final : public Castable<Function, Node> {
const BlockStatement* body,
utils::VectorRef<const Attribute*> attributes,
utils::VectorRef<const Attribute*> return_type_attributes);
/// Move constructor
Function(Function&&);
/// Destructor
~Function() override;
/// @returns the functions pipeline stage or None if not set

View File

@ -26,8 +26,6 @@ Identifier::Identifier(ProgramID pid, NodeID nid, const Source& src, Symbol sym)
TINT_ASSERT(AST, symbol.IsValid());
}
Identifier::Identifier(Identifier&&) = default;
Identifier::~Identifier() = default;
const Identifier* Identifier::Clone(CloneContext* ctx) const {

View File

@ -28,8 +28,8 @@ class Identifier : public Castable<Identifier, Node> {
/// @param src the source of this node
/// @param sym the symbol for the identifier
Identifier(ProgramID pid, NodeID nid, const Source& src, Symbol sym);
/// Move constructor
Identifier(Identifier&&);
/// Destructor
~Identifier() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -29,8 +29,6 @@ IdentifierExpression::IdentifierExpression(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL(AST, identifier, program_id);
}
IdentifierExpression::IdentifierExpression(IdentifierExpression&&) = default;
IdentifierExpression::~IdentifierExpression() = default;
const IdentifierExpression* IdentifierExpression::Clone(CloneContext* ctx) const {

View File

@ -36,8 +36,8 @@ class IdentifierExpression final : public Castable<IdentifierExpression, Express
NodeID nid,
const Source& src,
const Identifier* identifier);
/// Move constructor
IdentifierExpression(IdentifierExpression&&);
/// Destructor
~IdentifierExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -46,8 +46,6 @@ IfStatement::IfStatement(ProgramID pid,
}
}
IfStatement::IfStatement(IfStatement&&) = default;
IfStatement::~IfStatement() = default;
const IfStatement* IfStatement::Clone(CloneContext* ctx) const {

View File

@ -40,8 +40,8 @@ class IfStatement final : public Castable<IfStatement, Statement> {
const BlockStatement* body,
const Statement* else_stmt,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
IfStatement(IfStatement&&);
/// Destructor
~IfStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -29,8 +29,6 @@ IncrementDecrementStatement::IncrementDecrementStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, lhs, program_id);
}
IncrementDecrementStatement::IncrementDecrementStatement(IncrementDecrementStatement&&) = default;
IncrementDecrementStatement::~IncrementDecrementStatement() = default;
const IncrementDecrementStatement* IncrementDecrementStatement::Clone(CloneContext* ctx) const {

View File

@ -34,8 +34,8 @@ class IncrementDecrementStatement final : public Castable<IncrementDecrementStat
const Source& src,
const Expression* lhs,
bool inc);
/// Move constructor
IncrementDecrementStatement(IncrementDecrementStatement&&);
/// Destructor
~IncrementDecrementStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -30,8 +30,6 @@ IndexAccessorExpression::IndexAccessorExpression(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, idx, program_id);
}
IndexAccessorExpression::IndexAccessorExpression(IndexAccessorExpression&&) = default;
IndexAccessorExpression::~IndexAccessorExpression() = default;
const IndexAccessorExpression* IndexAccessorExpression::Clone(CloneContext* ctx) const {

View File

@ -33,8 +33,8 @@ class IndexAccessorExpression final : public Castable<IndexAccessorExpression, A
const Source& source,
const Expression* obj,
const Expression* idx);
/// Move constructor
IndexAccessorExpression(IndexAccessorExpression&&);
/// Destructor
~IndexAccessorExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -33,8 +33,6 @@ Let::Let(ProgramID pid,
TINT_ASSERT(AST, init != nullptr);
}
Let::Let(Let&&) = default;
Let::~Let() = default;
const char* Let::Kind() const {

View File

@ -45,9 +45,6 @@ class Let final : public Castable<Let, Variable> {
const Expression* initializer,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Let(Let&&);
/// Destructor
~Let() override;

View File

@ -31,8 +31,6 @@ LoopStatement::LoopStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, continuing, program_id);
}
LoopStatement::LoopStatement(LoopStatement&&) = default;
LoopStatement::~LoopStatement() = default;
const LoopStatement* LoopStatement::Clone(CloneContext* ctx) const {

View File

@ -33,8 +33,8 @@ class LoopStatement final : public Castable<LoopStatement, Statement> {
const Source& source,
const BlockStatement* body,
const BlockStatement* continuing);
/// Move constructor
LoopStatement(LoopStatement&&);
/// Destructor
~LoopStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -35,8 +35,6 @@ MemberAccessorExpression::MemberAccessorExpression(ProgramID pid,
}
}
MemberAccessorExpression::MemberAccessorExpression(MemberAccessorExpression&&) = default;
MemberAccessorExpression::~MemberAccessorExpression() = default;
const MemberAccessorExpression* MemberAccessorExpression::Clone(CloneContext* ctx) const {

View File

@ -35,8 +35,8 @@ class MemberAccessorExpression final
const Source& source,
const Expression* object,
const Identifier* member);
/// Move constructor
MemberAccessorExpression(MemberAccessorExpression&&);
/// Destructor
~MemberAccessorExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -21,8 +21,6 @@ namespace tint::ast {
Node::Node(ProgramID pid, NodeID nid, const Source& src)
: program_id(pid), node_id(nid), source(src) {}
Node::Node(Node&&) = default;
Node::~Node() = default;
} // namespace tint::ast

View File

@ -42,11 +42,10 @@ class Node : public Castable<Node, Cloneable> {
/// @param nid the unique node identifier
/// @param src the input source for the node
Node(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
Node(Node&&);
private:
Node(const Node&) = delete;
Node(Node&&) = delete;
};
} // namespace tint::ast

View File

@ -31,8 +31,6 @@ Override::Override(ProgramID pid,
utils::VectorRef<const Attribute*> attrs)
: Base(pid, nid, src, n, ty, init, std::move(attrs)) {}
Override::Override(Override&&) = default;
Override::~Override() = default;
const char* Override::Kind() const {

View File

@ -48,9 +48,6 @@ class Override final : public Castable<Override, Variable> {
const Expression* initializer,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Override(Override&&);
/// Destructor
~Override() override;

View File

@ -30,8 +30,6 @@ Parameter::Parameter(ProgramID pid,
utils::VectorRef<const Attribute*> attrs)
: Base(pid, nid, src, n, ty, nullptr, std::move(attrs)) {}
Parameter::Parameter(Parameter&&) = default;
Parameter::~Parameter() = default;
const char* Parameter::Kind() const {

View File

@ -47,9 +47,6 @@ class Parameter final : public Castable<Parameter, Variable> {
Type type,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Parameter(Parameter&&);
/// Destructor
~Parameter() override;

View File

@ -23,8 +23,6 @@ namespace tint::ast {
PhonyExpression::PhonyExpression(ProgramID pid, NodeID nid, const Source& src)
: Base(pid, nid, src) {}
PhonyExpression::PhonyExpression(PhonyExpression&&) = default;
PhonyExpression::~PhonyExpression() = default;
const PhonyExpression* PhonyExpression::Clone(CloneContext* ctx) const {

View File

@ -28,8 +28,8 @@ class PhonyExpression final : public Castable<PhonyExpression, Expression> {
/// @param nid the unique node identifier
/// @param src the source of this node
PhonyExpression(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
PhonyExpression(PhonyExpression&&);
/// Destructor
~PhonyExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -31,8 +31,6 @@ ReturnStatement::ReturnStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, value, program_id);
}
ReturnStatement::ReturnStatement(ReturnStatement&&) = default;
ReturnStatement::~ReturnStatement() = default;
const ReturnStatement* ReturnStatement::Clone(CloneContext* ctx) const {

View File

@ -35,8 +35,8 @@ class ReturnStatement final : public Castable<ReturnStatement, Statement> {
/// @param src the source of this node
/// @param value the return value
ReturnStatement(ProgramID pid, NodeID nid, const Source& src, const Expression* value);
/// Move constructor
ReturnStatement(ReturnStatement&&);
/// Destructor
~ReturnStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -31,8 +31,6 @@ namespace tint::ast {
Statement::Statement(ProgramID pid, NodeID nid, const Source& src) : Base(pid, nid, src) {}
Statement::Statement(Statement&&) = default;
Statement::~Statement() = default;
const char* Statement::Name() const {

View File

@ -35,8 +35,6 @@ class Statement : public Castable<Statement, Node> {
/// @param nid the unique node identifier
/// @param src the source of the expression
Statement(ProgramID pid, NodeID nid, const Source& src);
/// Move constructor
Statement(Statement&&);
};
} // namespace tint::ast

View File

@ -39,8 +39,6 @@ Struct::Struct(ProgramID pid,
}
}
Struct::Struct(Struct&&) = default;
Struct::~Struct() = default;
const Struct* Struct::Clone(CloneContext* ctx) const {

View File

@ -41,9 +41,8 @@ class Struct final : public Castable<Struct, TypeDecl> {
const Identifier* name,
utils::VectorRef<const StructMember*> members,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Struct(Struct&&);
/// Destructor
~Struct() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -39,8 +39,6 @@ StructMember::StructMember(ProgramID pid,
}
}
StructMember::StructMember(StructMember&&) = default;
StructMember::~StructMember() = default;
const StructMember* StructMember::Clone(CloneContext* ctx) const {

View File

@ -43,9 +43,8 @@ class StructMember final : public Castable<StructMember, Node> {
const Identifier* name,
Type type,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
StructMember(StructMember&&);
/// Destructor
~StructMember() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -41,8 +41,6 @@ SwitchStatement::SwitchStatement(ProgramID pid,
}
}
SwitchStatement::SwitchStatement(SwitchStatement&&) = default;
SwitchStatement::~SwitchStatement() = default;
const SwitchStatement* SwitchStatement::Clone(CloneContext* ctx) const {

View File

@ -36,8 +36,8 @@ class SwitchStatement final : public Castable<SwitchStatement, Statement> {
const Expression* condition,
utils::VectorRef<const CaseStatement*> body,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
SwitchStatement(SwitchStatement&&);
/// Destructor
~SwitchStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -38,8 +38,6 @@ TemplatedIdentifier::TemplatedIdentifier(ProgramID pid,
}
}
TemplatedIdentifier::TemplatedIdentifier(TemplatedIdentifier&&) = default;
TemplatedIdentifier::~TemplatedIdentifier() = default;
const TemplatedIdentifier* TemplatedIdentifier::Clone(CloneContext* ctx) const {

View File

@ -41,8 +41,8 @@ class TemplatedIdentifier final : public Castable<TemplatedIdentifier, Identifie
const Symbol& sym,
utils::VectorRef<const Expression*> args,
utils::VectorRef<const Attribute*> attrs);
/// Move constructor
TemplatedIdentifier(TemplatedIdentifier&&);
/// Destructor
~TemplatedIdentifier() override;
/// Clones this node and all transitive child nodes using the `CloneContext` `ctx`.

View File

@ -28,8 +28,6 @@ TypeDecl::TypeDecl(ProgramID pid, NodeID nid, const Source& src, const Identifie
}
}
TypeDecl::TypeDecl(TypeDecl&&) = default;
TypeDecl::~TypeDecl() = default;
} // namespace tint::ast

View File

@ -33,9 +33,8 @@ class TypeDecl : public Castable<TypeDecl, Node> {
/// @param src the source of this node for the import statement
/// @param name The name of the type
TypeDecl(ProgramID pid, NodeID nid, const Source& src, const Identifier* name);
/// Move constructor
TypeDecl(TypeDecl&&);
/// Destructor
~TypeDecl() override;
/// The name of the type declaration

View File

@ -30,8 +30,6 @@ UnaryOpExpression::UnaryOpExpression(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
}
UnaryOpExpression::UnaryOpExpression(UnaryOpExpression&&) = default;
UnaryOpExpression::~UnaryOpExpression() = default;
const UnaryOpExpression* UnaryOpExpression::Clone(CloneContext* ctx) const {

View File

@ -34,8 +34,8 @@ class UnaryOpExpression final : public Castable<UnaryOpExpression, Expression> {
const Source& source,
UnaryOp op,
const Expression* expr);
/// Move constructor
UnaryOpExpression(UnaryOpExpression&&);
/// Destructor
~UnaryOpExpression() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -33,8 +33,6 @@ Var::Var(ProgramID pid,
declared_address_space(address_space),
declared_access(access) {}
Var::Var(Var&&) = default;
Var::~Var() = default;
const char* Var::Kind() const {

View File

@ -61,9 +61,6 @@ class Var final : public Castable<Var, Variable> {
const Expression* initializer,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Var(Var&&);
/// Destructor
~Var() override;

View File

@ -36,8 +36,6 @@ Variable::Variable(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, initializer, program_id);
}
Variable::Variable(Variable&&) = default;
Variable::~Variable() = default;
} // namespace tint::ast

View File

@ -58,9 +58,6 @@ class Variable : public Castable<Variable, Node> {
const Expression* initializer,
utils::VectorRef<const Attribute*> attributes);
/// Move constructor
Variable(Variable&&);
/// Destructor
~Variable() override;

View File

@ -29,8 +29,6 @@ VariableDeclStatement::VariableDeclStatement(ProgramID pid,
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, variable, program_id);
}
VariableDeclStatement::VariableDeclStatement(VariableDeclStatement&&) = default;
VariableDeclStatement::~VariableDeclStatement() = default;
const VariableDeclStatement* VariableDeclStatement::Clone(CloneContext* ctx) const {

View File

@ -32,8 +32,8 @@ class VariableDeclStatement final : public Castable<VariableDeclStatement, State
NodeID nid,
const Source& source,
const Variable* variable);
/// Move constructor
VariableDeclStatement(VariableDeclStatement&&);
/// Destructor
~VariableDeclStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`

View File

@ -40,8 +40,6 @@ WhileStatement::WhileStatement(ProgramID pid,
}
}
WhileStatement::WhileStatement(WhileStatement&&) = default;
WhileStatement::~WhileStatement() = default;
const WhileStatement* WhileStatement::Clone(CloneContext* ctx) const {

View File

@ -37,8 +37,8 @@ class WhileStatement final : public Castable<WhileStatement, Statement> {
const Expression* condition,
const BlockStatement* body,
utils::VectorRef<const ast::Attribute*> attributes);
/// Move constructor
WhileStatement(WhileStatement&&);
/// Destructor
~WhileStatement() override;
/// Clones this node and all transitive child nodes using the `CloneContext`