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:
parent
39d4065653
commit
9a56b25a31
|
@ -29,8 +29,6 @@ AccessorExpression::AccessorExpression(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, object, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, object, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
AccessorExpression::AccessorExpression(AccessorExpression&&) = default;
|
|
||||||
|
|
||||||
AccessorExpression::~AccessorExpression() = default;
|
AccessorExpression::~AccessorExpression() = default;
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -28,8 +28,8 @@ class AccessorExpression : public Castable<AccessorExpression, Expression> {
|
||||||
/// @param source the member accessor expression source
|
/// @param source the member accessor expression source
|
||||||
/// @param object the object
|
/// @param object the object
|
||||||
AccessorExpression(ProgramID pid, NodeID nid, const Source& source, const Expression* object);
|
AccessorExpression(ProgramID pid, NodeID nid, const Source& source, const Expression* object);
|
||||||
/// Move constructor
|
|
||||||
AccessorExpression(AccessorExpression&&);
|
/// Destructor
|
||||||
~AccessorExpression() override;
|
~AccessorExpression() override;
|
||||||
|
|
||||||
/// The object being accessed
|
/// The object being accessed
|
||||||
|
|
|
@ -25,8 +25,6 @@ Alias::Alias(ProgramID pid, NodeID nid, const Source& src, const Identifier* n,
|
||||||
TINT_ASSERT(AST, type);
|
TINT_ASSERT(AST, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
Alias::Alias(Alias&&) = default;
|
|
||||||
|
|
||||||
Alias::~Alias() = default;
|
Alias::~Alias() = default;
|
||||||
|
|
||||||
const Alias* Alias::Clone(CloneContext* ctx) const {
|
const Alias* Alias::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -32,8 +32,7 @@ class Alias final : public Castable<Alias, TypeDecl> {
|
||||||
/// @param name the symbol for the alias
|
/// @param name the symbol for the alias
|
||||||
/// @param subtype the alias'd type
|
/// @param subtype the alias'd type
|
||||||
Alias(ProgramID pid, NodeID nid, const Source& src, const Identifier* name, Type subtype);
|
Alias(ProgramID pid, NodeID nid, const Source& src, const Identifier* name, Type subtype);
|
||||||
/// Move constructor
|
|
||||||
Alias(Alias&&);
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Alias() override;
|
~Alias() override;
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,6 @@ AssignmentStatement::AssignmentStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, rhs, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, rhs, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
AssignmentStatement::AssignmentStatement(AssignmentStatement&&) = default;
|
|
||||||
|
|
||||||
AssignmentStatement::~AssignmentStatement() = default;
|
AssignmentStatement::~AssignmentStatement() = default;
|
||||||
|
|
||||||
const AssignmentStatement* AssignmentStatement::Clone(CloneContext* ctx) const {
|
const AssignmentStatement* AssignmentStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -34,8 +34,8 @@ class AssignmentStatement final : public Castable<AssignmentStatement, Statement
|
||||||
const Source& source,
|
const Source& source,
|
||||||
const Expression* lhs,
|
const Expression* lhs,
|
||||||
const Expression* rhs);
|
const Expression* rhs);
|
||||||
/// Move constructor
|
|
||||||
AssignmentStatement(AssignmentStatement&&);
|
/// Destructor
|
||||||
~AssignmentStatement() override;
|
~AssignmentStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -34,8 +34,6 @@ BinaryExpression::BinaryExpression(ProgramID pid,
|
||||||
TINT_ASSERT(AST, op != BinaryOp::kNone);
|
TINT_ASSERT(AST, op != BinaryOp::kNone);
|
||||||
}
|
}
|
||||||
|
|
||||||
BinaryExpression::BinaryExpression(BinaryExpression&&) = default;
|
|
||||||
|
|
||||||
BinaryExpression::~BinaryExpression() = default;
|
BinaryExpression::~BinaryExpression() = default;
|
||||||
|
|
||||||
const BinaryExpression* BinaryExpression::Clone(CloneContext* ctx) const {
|
const BinaryExpression* BinaryExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -31,7 +31,6 @@ BitcastExpression::BitcastExpression(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
BitcastExpression::BitcastExpression(BitcastExpression&&) = default;
|
|
||||||
BitcastExpression::~BitcastExpression() = default;
|
BitcastExpression::~BitcastExpression() = default;
|
||||||
|
|
||||||
const BitcastExpression* BitcastExpression::Clone(CloneContext* ctx) const {
|
const BitcastExpression* BitcastExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -34,8 +34,8 @@ class BitcastExpression final : public Castable<BitcastExpression, Expression> {
|
||||||
const Source& source,
|
const Source& source,
|
||||||
Type type,
|
Type type,
|
||||||
const Expression* expr);
|
const Expression* expr);
|
||||||
/// Move constructor
|
|
||||||
BitcastExpression(BitcastExpression&&);
|
/// Destructor
|
||||||
~BitcastExpression() override;
|
~BitcastExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -36,8 +36,6 @@ BlockStatement::BlockStatement(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockStatement::BlockStatement(BlockStatement&&) = default;
|
|
||||||
|
|
||||||
BlockStatement::~BlockStatement() = default;
|
BlockStatement::~BlockStatement() = default;
|
||||||
|
|
||||||
const BlockStatement* BlockStatement::Clone(CloneContext* ctx) const {
|
const BlockStatement* BlockStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -40,8 +40,8 @@ class BlockStatement final : public Castable<BlockStatement, Statement> {
|
||||||
const Source& source,
|
const Source& source,
|
||||||
utils::VectorRef<const Statement*> statements,
|
utils::VectorRef<const Statement*> statements,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
BlockStatement(BlockStatement&&);
|
/// Destructor
|
||||||
~BlockStatement() override;
|
~BlockStatement() override;
|
||||||
|
|
||||||
/// @returns true if the block has no statements
|
/// @returns true if the block has no statements
|
||||||
|
|
|
@ -29,8 +29,6 @@ BreakIfStatement::BreakIfStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, condition, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, condition, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
BreakIfStatement::BreakIfStatement(BreakIfStatement&&) = default;
|
|
||||||
|
|
||||||
BreakIfStatement::~BreakIfStatement() = default;
|
BreakIfStatement::~BreakIfStatement() = default;
|
||||||
|
|
||||||
const BreakIfStatement* BreakIfStatement::Clone(CloneContext* ctx) const {
|
const BreakIfStatement* BreakIfStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -32,8 +32,7 @@ class BreakIfStatement final : public Castable<BreakIfStatement, Statement> {
|
||||||
/// @param condition the if condition
|
/// @param condition the if condition
|
||||||
BreakIfStatement(ProgramID pid, NodeID nid, const Source& src, const Expression* condition);
|
BreakIfStatement(ProgramID pid, NodeID nid, const Source& src, const Expression* condition);
|
||||||
|
|
||||||
/// Move constructor
|
/// Destructor
|
||||||
BreakIfStatement(BreakIfStatement&&);
|
|
||||||
~BreakIfStatement() override;
|
~BreakIfStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext` `ctx`.
|
/// Clones this node and all transitive child nodes using the `CloneContext` `ctx`.
|
||||||
|
|
|
@ -23,8 +23,6 @@ namespace tint::ast {
|
||||||
BreakStatement::BreakStatement(ProgramID pid, NodeID nid, const Source& src)
|
BreakStatement::BreakStatement(ProgramID pid, NodeID nid, const Source& src)
|
||||||
: Base(pid, nid, src) {}
|
: Base(pid, nid, src) {}
|
||||||
|
|
||||||
BreakStatement::BreakStatement(BreakStatement&&) = default;
|
|
||||||
|
|
||||||
BreakStatement::~BreakStatement() = default;
|
BreakStatement::~BreakStatement() = default;
|
||||||
|
|
||||||
const BreakStatement* BreakStatement::Clone(CloneContext* ctx) const {
|
const BreakStatement* BreakStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -27,8 +27,8 @@ class BreakStatement final : public Castable<BreakStatement, Statement> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
BreakStatement(ProgramID pid, NodeID nid, const Source& src);
|
BreakStatement(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
BreakStatement(BreakStatement&&);
|
/// Destructor
|
||||||
~BreakStatement() override;
|
~BreakStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -219,6 +219,7 @@ struct TextureOverloadCase {
|
||||||
bool /* returns_value */);
|
bool /* returns_value */);
|
||||||
/// Copy constructor
|
/// Copy constructor
|
||||||
TextureOverloadCase(const TextureOverloadCase&);
|
TextureOverloadCase(const TextureOverloadCase&);
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~TextureOverloadCase();
|
~TextureOverloadCase();
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,6 @@ CallExpression::CallExpression(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CallExpression::CallExpression(CallExpression&&) = default;
|
|
||||||
|
|
||||||
CallExpression::~CallExpression() = default;
|
CallExpression::~CallExpression() = default;
|
||||||
|
|
||||||
const CallExpression* CallExpression::Clone(CloneContext* ctx) const {
|
const CallExpression* CallExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -43,8 +43,7 @@ class CallExpression final : public Castable<CallExpression, Expression> {
|
||||||
const IdentifierExpression* target,
|
const IdentifierExpression* target,
|
||||||
utils::VectorRef<const Expression*> args);
|
utils::VectorRef<const Expression*> args);
|
||||||
|
|
||||||
/// Move constructor
|
/// Destructor
|
||||||
CallExpression(CallExpression&&);
|
|
||||||
~CallExpression() override;
|
~CallExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -29,8 +29,6 @@ CallStatement::CallStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
CallStatement::CallStatement(CallStatement&&) = default;
|
|
||||||
|
|
||||||
CallStatement::~CallStatement() = default;
|
CallStatement::~CallStatement() = default;
|
||||||
|
|
||||||
const CallStatement* CallStatement::Clone(CloneContext* ctx) const {
|
const CallStatement* CallStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -29,8 +29,8 @@ class CallStatement final : public Castable<CallStatement, Statement> {
|
||||||
/// @param src the source of this node for the statement
|
/// @param src the source of this node for the statement
|
||||||
/// @param call the function
|
/// @param call the function
|
||||||
CallStatement(ProgramID pid, NodeID nid, const Source& src, const CallExpression* call);
|
CallStatement(ProgramID pid, NodeID nid, const Source& src, const CallExpression* call);
|
||||||
/// Move constructor
|
|
||||||
CallStatement(CallStatement&&);
|
/// Destructor
|
||||||
~CallStatement() override;
|
~CallStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -25,8 +25,6 @@ namespace tint::ast {
|
||||||
CaseSelector::CaseSelector(ProgramID pid, NodeID nid, const Source& src, const Expression* e)
|
CaseSelector::CaseSelector(ProgramID pid, NodeID nid, const Source& src, const Expression* e)
|
||||||
: Base(pid, nid, src), expr(e) {}
|
: Base(pid, nid, src), expr(e) {}
|
||||||
|
|
||||||
CaseSelector::CaseSelector(CaseSelector&&) = default;
|
|
||||||
|
|
||||||
CaseSelector::~CaseSelector() = default;
|
CaseSelector::~CaseSelector() = default;
|
||||||
|
|
||||||
const CaseSelector* CaseSelector::Clone(CloneContext* ctx) const {
|
const CaseSelector* CaseSelector::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -31,8 +31,8 @@ class CaseSelector final : public Castable<CaseSelector, Node> {
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
/// @param expr the selector expression, |nullptr| for a `default` selector
|
/// @param expr the selector expression, |nullptr| for a `default` selector
|
||||||
CaseSelector(ProgramID pid, NodeID nid, const Source& src, const Expression* expr = nullptr);
|
CaseSelector(ProgramID pid, NodeID nid, const Source& src, const Expression* expr = nullptr);
|
||||||
/// Move constructor
|
|
||||||
CaseSelector(CaseSelector&&);
|
/// Destructor
|
||||||
~CaseSelector() override;
|
~CaseSelector() override;
|
||||||
|
|
||||||
/// @returns true if this is a default statement
|
/// @returns true if this is a default statement
|
||||||
|
|
|
@ -37,8 +37,6 @@ CaseStatement::CaseStatement(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CaseStatement::CaseStatement(CaseStatement&&) = default;
|
|
||||||
|
|
||||||
CaseStatement::~CaseStatement() = default;
|
CaseStatement::~CaseStatement() = default;
|
||||||
|
|
||||||
bool CaseStatement::ContainsDefault() const {
|
bool CaseStatement::ContainsDefault() const {
|
||||||
|
|
|
@ -36,8 +36,8 @@ class CaseStatement final : public Castable<CaseStatement, Statement> {
|
||||||
const Source& src,
|
const Source& src,
|
||||||
utils::VectorRef<const CaseSelector*> selectors,
|
utils::VectorRef<const CaseSelector*> selectors,
|
||||||
const BlockStatement* body);
|
const BlockStatement* body);
|
||||||
/// Move constructor
|
|
||||||
CaseStatement(CaseStatement&&);
|
/// Destructor
|
||||||
~CaseStatement() override;
|
~CaseStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -33,8 +33,6 @@ CompoundAssignmentStatement::CompoundAssignmentStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, rhs, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, rhs, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
CompoundAssignmentStatement::CompoundAssignmentStatement(CompoundAssignmentStatement&&) = default;
|
|
||||||
|
|
||||||
CompoundAssignmentStatement::~CompoundAssignmentStatement() = default;
|
CompoundAssignmentStatement::~CompoundAssignmentStatement() = default;
|
||||||
|
|
||||||
const CompoundAssignmentStatement* CompoundAssignmentStatement::Clone(CloneContext* ctx) const {
|
const CompoundAssignmentStatement* CompoundAssignmentStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -37,8 +37,8 @@ class CompoundAssignmentStatement final : public Castable<CompoundAssignmentStat
|
||||||
const Expression* lhs,
|
const Expression* lhs,
|
||||||
const Expression* rhs,
|
const Expression* rhs,
|
||||||
BinaryOp op);
|
BinaryOp op);
|
||||||
/// Move constructor
|
|
||||||
CompoundAssignmentStatement(CompoundAssignmentStatement&&);
|
/// Destructor
|
||||||
~CompoundAssignmentStatement() override;
|
~CompoundAssignmentStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -33,8 +33,6 @@ Const::Const(ProgramID pid,
|
||||||
TINT_ASSERT(AST, init != nullptr);
|
TINT_ASSERT(AST, init != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Const::Const(Const&&) = default;
|
|
||||||
|
|
||||||
Const::~Const() = default;
|
Const::~Const() = default;
|
||||||
|
|
||||||
const char* Const::Kind() const {
|
const char* Const::Kind() const {
|
||||||
|
|
|
@ -48,9 +48,6 @@ class Const final : public Castable<Const, Variable> {
|
||||||
const Expression* initializer,
|
const Expression* initializer,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
Const(Const&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Const() override;
|
~Const() override;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, cond, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstAssert::ConstAssert(ConstAssert&&) = default;
|
|
||||||
|
|
||||||
ConstAssert::~ConstAssert() = default;
|
ConstAssert::~ConstAssert() = default;
|
||||||
|
|
||||||
const ConstAssert* ConstAssert::Clone(CloneContext* ctx) const {
|
const ConstAssert* ConstAssert::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -30,9 +30,6 @@ class ConstAssert final : public Castable<ConstAssert, Statement> {
|
||||||
/// @param condition the assertion condition
|
/// @param condition the assertion condition
|
||||||
ConstAssert(ProgramID pid, NodeID nid, const Source& source, const Expression* condition);
|
ConstAssert(ProgramID pid, NodeID nid, const Source& source, const Expression* condition);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
ConstAssert(ConstAssert&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~ConstAssert() override;
|
~ConstAssert() override;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ namespace tint::ast {
|
||||||
ContinueStatement::ContinueStatement(ProgramID pid, NodeID nid, const Source& src)
|
ContinueStatement::ContinueStatement(ProgramID pid, NodeID nid, const Source& src)
|
||||||
: Base(pid, nid, src) {}
|
: Base(pid, nid, src) {}
|
||||||
|
|
||||||
ContinueStatement::ContinueStatement(ContinueStatement&&) = default;
|
|
||||||
|
|
||||||
ContinueStatement::~ContinueStatement() = default;
|
ContinueStatement::~ContinueStatement() = default;
|
||||||
|
|
||||||
const ContinueStatement* ContinueStatement::Clone(CloneContext* ctx) const {
|
const ContinueStatement* ContinueStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -27,8 +27,8 @@ class ContinueStatement final : public Castable<ContinueStatement, Statement> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
ContinueStatement(ProgramID pid, NodeID nid, const Source& src);
|
ContinueStatement(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
ContinueStatement(ContinueStatement&&);
|
/// Destructor
|
||||||
~ContinueStatement() override;
|
~ContinueStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
namespace tint::ast {
|
namespace tint::ast {
|
||||||
|
|
||||||
|
DiagnosticControl::DiagnosticControl() = default;
|
||||||
|
|
||||||
DiagnosticControl::DiagnosticControl(builtin::DiagnosticSeverity sev, const Identifier* rule)
|
DiagnosticControl::DiagnosticControl(builtin::DiagnosticSeverity sev, const Identifier* rule)
|
||||||
: severity(sev), rule_name(rule) {
|
: severity(sev), rule_name(rule) {
|
||||||
TINT_ASSERT(AST, rule != nullptr);
|
TINT_ASSERT(AST, rule != nullptr);
|
||||||
|
@ -31,4 +33,6 @@ DiagnosticControl::DiagnosticControl(builtin::DiagnosticSeverity sev, const Iden
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DiagnosticControl::DiagnosticControl(DiagnosticControl&&) = default;
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -32,13 +32,16 @@ namespace tint::ast {
|
||||||
struct DiagnosticControl {
|
struct DiagnosticControl {
|
||||||
public:
|
public:
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
DiagnosticControl() {}
|
DiagnosticControl();
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// @param sev the diagnostic severity
|
/// @param sev the diagnostic severity
|
||||||
/// @param rule the diagnostic rule name
|
/// @param rule the diagnostic rule name
|
||||||
DiagnosticControl(builtin::DiagnosticSeverity sev, const Identifier* rule);
|
DiagnosticControl(builtin::DiagnosticSeverity sev, const Identifier* rule);
|
||||||
|
|
||||||
|
/// Move constructor
|
||||||
|
DiagnosticControl(DiagnosticControl&&);
|
||||||
|
|
||||||
/// The diagnostic severity control.
|
/// The diagnostic severity control.
|
||||||
builtin::DiagnosticSeverity severity;
|
builtin::DiagnosticSeverity severity;
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@ DiagnosticDirective::DiagnosticDirective(ProgramID pid,
|
||||||
DiagnosticControl&& dc)
|
DiagnosticControl&& dc)
|
||||||
: Base(pid, nid, src), control(std::move(dc)) {}
|
: Base(pid, nid, src), control(std::move(dc)) {}
|
||||||
|
|
||||||
DiagnosticDirective::DiagnosticDirective(DiagnosticDirective&&) = default;
|
|
||||||
|
|
||||||
DiagnosticDirective::~DiagnosticDirective() = default;
|
DiagnosticDirective::~DiagnosticDirective() = default;
|
||||||
|
|
||||||
const DiagnosticDirective* DiagnosticDirective::Clone(CloneContext* ctx) const {
|
const DiagnosticDirective* DiagnosticDirective::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -38,9 +38,6 @@ class DiagnosticDirective final : public Castable<DiagnosticDirective, Node> {
|
||||||
/// @param dc the diagnostic control
|
/// @param dc the diagnostic control
|
||||||
DiagnosticDirective(ProgramID pid, NodeID nid, const Source& src, DiagnosticControl&& dc);
|
DiagnosticDirective(ProgramID pid, NodeID nid, const Source& src, DiagnosticControl&& dc);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
DiagnosticDirective(DiagnosticDirective&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~DiagnosticDirective() override;
|
~DiagnosticDirective() override;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ namespace tint::ast {
|
||||||
DiscardStatement::DiscardStatement(ProgramID pid, NodeID nid, const Source& src)
|
DiscardStatement::DiscardStatement(ProgramID pid, NodeID nid, const Source& src)
|
||||||
: Base(pid, nid, src) {}
|
: Base(pid, nid, src) {}
|
||||||
|
|
||||||
DiscardStatement::DiscardStatement(DiscardStatement&&) = default;
|
|
||||||
|
|
||||||
DiscardStatement::~DiscardStatement() = default;
|
DiscardStatement::~DiscardStatement() = default;
|
||||||
|
|
||||||
const DiscardStatement* DiscardStatement::Clone(CloneContext* ctx) const {
|
const DiscardStatement* DiscardStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -27,8 +27,8 @@ class DiscardStatement final : public Castable<DiscardStatement, Statement> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
DiscardStatement(ProgramID pid, NodeID nid, const Source& src);
|
DiscardStatement(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
DiscardStatement(DiscardStatement&&);
|
/// Destructor
|
||||||
~DiscardStatement() override;
|
~DiscardStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -26,8 +26,6 @@ Enable::Enable(ProgramID pid,
|
||||||
utils::VectorRef<const Extension*> exts)
|
utils::VectorRef<const Extension*> exts)
|
||||||
: Base(pid, nid, src), extensions(std::move(exts)) {}
|
: Base(pid, nid, src), extensions(std::move(exts)) {}
|
||||||
|
|
||||||
Enable::Enable(Enable&&) = default;
|
|
||||||
|
|
||||||
Enable::~Enable() = default;
|
Enable::~Enable() = default;
|
||||||
|
|
||||||
bool Enable::HasExtension(builtin::Extension ext) const {
|
bool Enable::HasExtension(builtin::Extension ext) const {
|
||||||
|
|
|
@ -36,9 +36,8 @@ class Enable final : public Castable<Enable, Node> {
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
/// @param exts the extensions being enabled by this directive
|
/// @param exts the extensions being enabled by this directive
|
||||||
Enable(ProgramID pid, NodeID nid, const Source& src, utils::VectorRef<const Extension*> exts);
|
Enable(ProgramID pid, NodeID nid, const Source& src, utils::VectorRef<const Extension*> exts);
|
||||||
/// Move constructor
|
|
||||||
Enable(Enable&&);
|
|
||||||
|
|
||||||
|
/// Destructor
|
||||||
~Enable() override;
|
~Enable() override;
|
||||||
|
|
||||||
/// @param ext the extension to search for
|
/// @param ext the extension to search for
|
||||||
|
|
|
@ -20,8 +20,6 @@ namespace tint::ast {
|
||||||
|
|
||||||
Expression::Expression(ProgramID pid, NodeID nid, const Source& src) : Base(pid, nid, src) {}
|
Expression::Expression(ProgramID pid, NodeID nid, const Source& src) : Base(pid, nid, src) {}
|
||||||
|
|
||||||
Expression::Expression(Expression&&) = default;
|
|
||||||
|
|
||||||
Expression::~Expression() = default;
|
Expression::~Expression() = default;
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -33,8 +33,6 @@ class Expression : public Castable<Expression, Node> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
Expression(ProgramID pid, NodeID nid, const Source& src);
|
Expression(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
Expression(Expression&&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -26,8 +26,6 @@ namespace tint::ast {
|
||||||
Extension::Extension(ProgramID pid, NodeID nid, const Source& src, builtin::Extension ext)
|
Extension::Extension(ProgramID pid, NodeID nid, const Source& src, builtin::Extension ext)
|
||||||
: Base(pid, nid, src), name(ext) {}
|
: Base(pid, nid, src), name(ext) {}
|
||||||
|
|
||||||
Extension::Extension(Extension&&) = default;
|
|
||||||
|
|
||||||
Extension::~Extension() = default;
|
Extension::~Extension() = default;
|
||||||
|
|
||||||
const Extension* Extension::Clone(CloneContext* ctx) const {
|
const Extension* Extension::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -32,9 +32,8 @@ class Extension final : public Castable<Extension, Node> {
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
/// @param ext the extension
|
/// @param ext the extension
|
||||||
Extension(ProgramID pid, NodeID nid, const Source& src, builtin::Extension ext);
|
Extension(ProgramID pid, NodeID nid, const Source& src, builtin::Extension ext);
|
||||||
/// Move constructor
|
|
||||||
Extension(Extension&&);
|
|
||||||
|
|
||||||
|
/// Destructor
|
||||||
~Extension() override;
|
~Extension() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -48,8 +48,6 @@ ForLoopStatement::ForLoopStatement(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ForLoopStatement::ForLoopStatement(ForLoopStatement&&) = default;
|
|
||||||
|
|
||||||
ForLoopStatement::~ForLoopStatement() = default;
|
ForLoopStatement::~ForLoopStatement() = default;
|
||||||
|
|
||||||
const ForLoopStatement* ForLoopStatement::Clone(CloneContext* ctx) const {
|
const ForLoopStatement* ForLoopStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -41,8 +41,8 @@ class ForLoopStatement final : public Castable<ForLoopStatement, Statement> {
|
||||||
const Statement* continuing,
|
const Statement* continuing,
|
||||||
const BlockStatement* body,
|
const BlockStatement* body,
|
||||||
utils::VectorRef<const ast::Attribute*> attributes);
|
utils::VectorRef<const ast::Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
ForLoopStatement(ForLoopStatement&&);
|
/// Destructor
|
||||||
~ForLoopStatement() override;
|
~ForLoopStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -57,8 +57,6 @@ Function::Function(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Function::Function(Function&&) = default;
|
|
||||||
|
|
||||||
Function::~Function() = default;
|
Function::~Function() = default;
|
||||||
|
|
||||||
PipelineStage Function::PipelineStage() const {
|
PipelineStage Function::PipelineStage() const {
|
||||||
|
|
|
@ -59,9 +59,8 @@ class Function final : public Castable<Function, Node> {
|
||||||
const BlockStatement* body,
|
const BlockStatement* body,
|
||||||
utils::VectorRef<const Attribute*> attributes,
|
utils::VectorRef<const Attribute*> attributes,
|
||||||
utils::VectorRef<const Attribute*> return_type_attributes);
|
utils::VectorRef<const Attribute*> return_type_attributes);
|
||||||
/// Move constructor
|
|
||||||
Function(Function&&);
|
|
||||||
|
|
||||||
|
/// Destructor
|
||||||
~Function() override;
|
~Function() override;
|
||||||
|
|
||||||
/// @returns the functions pipeline stage or None if not set
|
/// @returns the functions pipeline stage or None if not set
|
||||||
|
|
|
@ -26,8 +26,6 @@ Identifier::Identifier(ProgramID pid, NodeID nid, const Source& src, Symbol sym)
|
||||||
TINT_ASSERT(AST, symbol.IsValid());
|
TINT_ASSERT(AST, symbol.IsValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
Identifier::Identifier(Identifier&&) = default;
|
|
||||||
|
|
||||||
Identifier::~Identifier() = default;
|
Identifier::~Identifier() = default;
|
||||||
|
|
||||||
const Identifier* Identifier::Clone(CloneContext* ctx) const {
|
const Identifier* Identifier::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -28,8 +28,8 @@ class Identifier : public Castable<Identifier, Node> {
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
/// @param sym the symbol for the identifier
|
/// @param sym the symbol for the identifier
|
||||||
Identifier(ProgramID pid, NodeID nid, const Source& src, Symbol sym);
|
Identifier(ProgramID pid, NodeID nid, const Source& src, Symbol sym);
|
||||||
/// Move constructor
|
|
||||||
Identifier(Identifier&&);
|
/// Destructor
|
||||||
~Identifier() override;
|
~Identifier() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -29,8 +29,6 @@ IdentifierExpression::IdentifierExpression(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL(AST, identifier, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL(AST, identifier, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
IdentifierExpression::IdentifierExpression(IdentifierExpression&&) = default;
|
|
||||||
|
|
||||||
IdentifierExpression::~IdentifierExpression() = default;
|
IdentifierExpression::~IdentifierExpression() = default;
|
||||||
|
|
||||||
const IdentifierExpression* IdentifierExpression::Clone(CloneContext* ctx) const {
|
const IdentifierExpression* IdentifierExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -36,8 +36,8 @@ class IdentifierExpression final : public Castable<IdentifierExpression, Express
|
||||||
NodeID nid,
|
NodeID nid,
|
||||||
const Source& src,
|
const Source& src,
|
||||||
const Identifier* identifier);
|
const Identifier* identifier);
|
||||||
/// Move constructor
|
|
||||||
IdentifierExpression(IdentifierExpression&&);
|
/// Destructor
|
||||||
~IdentifierExpression() override;
|
~IdentifierExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -46,8 +46,6 @@ IfStatement::IfStatement(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IfStatement::IfStatement(IfStatement&&) = default;
|
|
||||||
|
|
||||||
IfStatement::~IfStatement() = default;
|
IfStatement::~IfStatement() = default;
|
||||||
|
|
||||||
const IfStatement* IfStatement::Clone(CloneContext* ctx) const {
|
const IfStatement* IfStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -40,8 +40,8 @@ class IfStatement final : public Castable<IfStatement, Statement> {
|
||||||
const BlockStatement* body,
|
const BlockStatement* body,
|
||||||
const Statement* else_stmt,
|
const Statement* else_stmt,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
IfStatement(IfStatement&&);
|
/// Destructor
|
||||||
~IfStatement() override;
|
~IfStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -29,8 +29,6 @@ IncrementDecrementStatement::IncrementDecrementStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, lhs, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, lhs, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
IncrementDecrementStatement::IncrementDecrementStatement(IncrementDecrementStatement&&) = default;
|
|
||||||
|
|
||||||
IncrementDecrementStatement::~IncrementDecrementStatement() = default;
|
IncrementDecrementStatement::~IncrementDecrementStatement() = default;
|
||||||
|
|
||||||
const IncrementDecrementStatement* IncrementDecrementStatement::Clone(CloneContext* ctx) const {
|
const IncrementDecrementStatement* IncrementDecrementStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -34,8 +34,8 @@ class IncrementDecrementStatement final : public Castable<IncrementDecrementStat
|
||||||
const Source& src,
|
const Source& src,
|
||||||
const Expression* lhs,
|
const Expression* lhs,
|
||||||
bool inc);
|
bool inc);
|
||||||
/// Move constructor
|
|
||||||
IncrementDecrementStatement(IncrementDecrementStatement&&);
|
/// Destructor
|
||||||
~IncrementDecrementStatement() override;
|
~IncrementDecrementStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -30,8 +30,6 @@ IndexAccessorExpression::IndexAccessorExpression(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, idx, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, idx, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexAccessorExpression::IndexAccessorExpression(IndexAccessorExpression&&) = default;
|
|
||||||
|
|
||||||
IndexAccessorExpression::~IndexAccessorExpression() = default;
|
IndexAccessorExpression::~IndexAccessorExpression() = default;
|
||||||
|
|
||||||
const IndexAccessorExpression* IndexAccessorExpression::Clone(CloneContext* ctx) const {
|
const IndexAccessorExpression* IndexAccessorExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -33,8 +33,8 @@ class IndexAccessorExpression final : public Castable<IndexAccessorExpression, A
|
||||||
const Source& source,
|
const Source& source,
|
||||||
const Expression* obj,
|
const Expression* obj,
|
||||||
const Expression* idx);
|
const Expression* idx);
|
||||||
/// Move constructor
|
|
||||||
IndexAccessorExpression(IndexAccessorExpression&&);
|
/// Destructor
|
||||||
~IndexAccessorExpression() override;
|
~IndexAccessorExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -33,8 +33,6 @@ Let::Let(ProgramID pid,
|
||||||
TINT_ASSERT(AST, init != nullptr);
|
TINT_ASSERT(AST, init != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Let::Let(Let&&) = default;
|
|
||||||
|
|
||||||
Let::~Let() = default;
|
Let::~Let() = default;
|
||||||
|
|
||||||
const char* Let::Kind() const {
|
const char* Let::Kind() const {
|
||||||
|
|
|
@ -45,9 +45,6 @@ class Let final : public Castable<Let, Variable> {
|
||||||
const Expression* initializer,
|
const Expression* initializer,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
Let(Let&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Let() override;
|
~Let() override;
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,6 @@ LoopStatement::LoopStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, continuing, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, continuing, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoopStatement::LoopStatement(LoopStatement&&) = default;
|
|
||||||
|
|
||||||
LoopStatement::~LoopStatement() = default;
|
LoopStatement::~LoopStatement() = default;
|
||||||
|
|
||||||
const LoopStatement* LoopStatement::Clone(CloneContext* ctx) const {
|
const LoopStatement* LoopStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -33,8 +33,8 @@ class LoopStatement final : public Castable<LoopStatement, Statement> {
|
||||||
const Source& source,
|
const Source& source,
|
||||||
const BlockStatement* body,
|
const BlockStatement* body,
|
||||||
const BlockStatement* continuing);
|
const BlockStatement* continuing);
|
||||||
/// Move constructor
|
|
||||||
LoopStatement(LoopStatement&&);
|
/// Destructor
|
||||||
~LoopStatement() override;
|
~LoopStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -35,8 +35,6 @@ MemberAccessorExpression::MemberAccessorExpression(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MemberAccessorExpression::MemberAccessorExpression(MemberAccessorExpression&&) = default;
|
|
||||||
|
|
||||||
MemberAccessorExpression::~MemberAccessorExpression() = default;
|
MemberAccessorExpression::~MemberAccessorExpression() = default;
|
||||||
|
|
||||||
const MemberAccessorExpression* MemberAccessorExpression::Clone(CloneContext* ctx) const {
|
const MemberAccessorExpression* MemberAccessorExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -35,8 +35,8 @@ class MemberAccessorExpression final
|
||||||
const Source& source,
|
const Source& source,
|
||||||
const Expression* object,
|
const Expression* object,
|
||||||
const Identifier* member);
|
const Identifier* member);
|
||||||
/// Move constructor
|
|
||||||
MemberAccessorExpression(MemberAccessorExpression&&);
|
/// Destructor
|
||||||
~MemberAccessorExpression() override;
|
~MemberAccessorExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -21,8 +21,6 @@ namespace tint::ast {
|
||||||
Node::Node(ProgramID pid, NodeID nid, const Source& src)
|
Node::Node(ProgramID pid, NodeID nid, const Source& src)
|
||||||
: program_id(pid), node_id(nid), source(src) {}
|
: program_id(pid), node_id(nid), source(src) {}
|
||||||
|
|
||||||
Node::Node(Node&&) = default;
|
|
||||||
|
|
||||||
Node::~Node() = default;
|
Node::~Node() = default;
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -42,11 +42,10 @@ class Node : public Castable<Node, Cloneable> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the input source for the node
|
/// @param src the input source for the node
|
||||||
Node(ProgramID pid, NodeID nid, const Source& src);
|
Node(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
Node(Node&&);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Node(const Node&) = delete;
|
Node(const Node&) = delete;
|
||||||
|
Node(Node&&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -31,8 +31,6 @@ Override::Override(ProgramID pid,
|
||||||
utils::VectorRef<const Attribute*> attrs)
|
utils::VectorRef<const Attribute*> attrs)
|
||||||
: Base(pid, nid, src, n, ty, init, std::move(attrs)) {}
|
: Base(pid, nid, src, n, ty, init, std::move(attrs)) {}
|
||||||
|
|
||||||
Override::Override(Override&&) = default;
|
|
||||||
|
|
||||||
Override::~Override() = default;
|
Override::~Override() = default;
|
||||||
|
|
||||||
const char* Override::Kind() const {
|
const char* Override::Kind() const {
|
||||||
|
|
|
@ -48,9 +48,6 @@ class Override final : public Castable<Override, Variable> {
|
||||||
const Expression* initializer,
|
const Expression* initializer,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
Override(Override&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Override() override;
|
~Override() override;
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@ Parameter::Parameter(ProgramID pid,
|
||||||
utils::VectorRef<const Attribute*> attrs)
|
utils::VectorRef<const Attribute*> attrs)
|
||||||
: Base(pid, nid, src, n, ty, nullptr, std::move(attrs)) {}
|
: Base(pid, nid, src, n, ty, nullptr, std::move(attrs)) {}
|
||||||
|
|
||||||
Parameter::Parameter(Parameter&&) = default;
|
|
||||||
|
|
||||||
Parameter::~Parameter() = default;
|
Parameter::~Parameter() = default;
|
||||||
|
|
||||||
const char* Parameter::Kind() const {
|
const char* Parameter::Kind() const {
|
||||||
|
|
|
@ -47,9 +47,6 @@ class Parameter final : public Castable<Parameter, Variable> {
|
||||||
Type type,
|
Type type,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
Parameter(Parameter&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Parameter() override;
|
~Parameter() override;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ namespace tint::ast {
|
||||||
PhonyExpression::PhonyExpression(ProgramID pid, NodeID nid, const Source& src)
|
PhonyExpression::PhonyExpression(ProgramID pid, NodeID nid, const Source& src)
|
||||||
: Base(pid, nid, src) {}
|
: Base(pid, nid, src) {}
|
||||||
|
|
||||||
PhonyExpression::PhonyExpression(PhonyExpression&&) = default;
|
|
||||||
|
|
||||||
PhonyExpression::~PhonyExpression() = default;
|
PhonyExpression::~PhonyExpression() = default;
|
||||||
|
|
||||||
const PhonyExpression* PhonyExpression::Clone(CloneContext* ctx) const {
|
const PhonyExpression* PhonyExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -28,8 +28,8 @@ class PhonyExpression final : public Castable<PhonyExpression, Expression> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
PhonyExpression(ProgramID pid, NodeID nid, const Source& src);
|
PhonyExpression(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
PhonyExpression(PhonyExpression&&);
|
/// Destructor
|
||||||
~PhonyExpression() override;
|
~PhonyExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -31,8 +31,6 @@ ReturnStatement::ReturnStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, value, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, value, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnStatement::ReturnStatement(ReturnStatement&&) = default;
|
|
||||||
|
|
||||||
ReturnStatement::~ReturnStatement() = default;
|
ReturnStatement::~ReturnStatement() = default;
|
||||||
|
|
||||||
const ReturnStatement* ReturnStatement::Clone(CloneContext* ctx) const {
|
const ReturnStatement* ReturnStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -35,8 +35,8 @@ class ReturnStatement final : public Castable<ReturnStatement, Statement> {
|
||||||
/// @param src the source of this node
|
/// @param src the source of this node
|
||||||
/// @param value the return value
|
/// @param value the return value
|
||||||
ReturnStatement(ProgramID pid, NodeID nid, const Source& src, const Expression* value);
|
ReturnStatement(ProgramID pid, NodeID nid, const Source& src, const Expression* value);
|
||||||
/// Move constructor
|
|
||||||
ReturnStatement(ReturnStatement&&);
|
/// Destructor
|
||||||
~ReturnStatement() override;
|
~ReturnStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -31,8 +31,6 @@ namespace tint::ast {
|
||||||
|
|
||||||
Statement::Statement(ProgramID pid, NodeID nid, const Source& src) : Base(pid, nid, src) {}
|
Statement::Statement(ProgramID pid, NodeID nid, const Source& src) : Base(pid, nid, src) {}
|
||||||
|
|
||||||
Statement::Statement(Statement&&) = default;
|
|
||||||
|
|
||||||
Statement::~Statement() = default;
|
Statement::~Statement() = default;
|
||||||
|
|
||||||
const char* Statement::Name() const {
|
const char* Statement::Name() const {
|
||||||
|
|
|
@ -35,8 +35,6 @@ class Statement : public Castable<Statement, Node> {
|
||||||
/// @param nid the unique node identifier
|
/// @param nid the unique node identifier
|
||||||
/// @param src the source of the expression
|
/// @param src the source of the expression
|
||||||
Statement(ProgramID pid, NodeID nid, const Source& src);
|
Statement(ProgramID pid, NodeID nid, const Source& src);
|
||||||
/// Move constructor
|
|
||||||
Statement(Statement&&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -39,8 +39,6 @@ Struct::Struct(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Struct::Struct(Struct&&) = default;
|
|
||||||
|
|
||||||
Struct::~Struct() = default;
|
Struct::~Struct() = default;
|
||||||
|
|
||||||
const Struct* Struct::Clone(CloneContext* ctx) const {
|
const Struct* Struct::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -41,9 +41,8 @@ class Struct final : public Castable<Struct, TypeDecl> {
|
||||||
const Identifier* name,
|
const Identifier* name,
|
||||||
utils::VectorRef<const StructMember*> members,
|
utils::VectorRef<const StructMember*> members,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
Struct(Struct&&);
|
|
||||||
|
|
||||||
|
/// Destructor
|
||||||
~Struct() override;
|
~Struct() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -39,8 +39,6 @@ StructMember::StructMember(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StructMember::StructMember(StructMember&&) = default;
|
|
||||||
|
|
||||||
StructMember::~StructMember() = default;
|
StructMember::~StructMember() = default;
|
||||||
|
|
||||||
const StructMember* StructMember::Clone(CloneContext* ctx) const {
|
const StructMember* StructMember::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -43,9 +43,8 @@ class StructMember final : public Castable<StructMember, Node> {
|
||||||
const Identifier* name,
|
const Identifier* name,
|
||||||
Type type,
|
Type type,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
StructMember(StructMember&&);
|
|
||||||
|
|
||||||
|
/// Destructor
|
||||||
~StructMember() override;
|
~StructMember() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -41,8 +41,6 @@ SwitchStatement::SwitchStatement(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SwitchStatement::SwitchStatement(SwitchStatement&&) = default;
|
|
||||||
|
|
||||||
SwitchStatement::~SwitchStatement() = default;
|
SwitchStatement::~SwitchStatement() = default;
|
||||||
|
|
||||||
const SwitchStatement* SwitchStatement::Clone(CloneContext* ctx) const {
|
const SwitchStatement* SwitchStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -36,8 +36,8 @@ class SwitchStatement final : public Castable<SwitchStatement, Statement> {
|
||||||
const Expression* condition,
|
const Expression* condition,
|
||||||
utils::VectorRef<const CaseStatement*> body,
|
utils::VectorRef<const CaseStatement*> body,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
SwitchStatement(SwitchStatement&&);
|
/// Destructor
|
||||||
~SwitchStatement() override;
|
~SwitchStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -38,8 +38,6 @@ TemplatedIdentifier::TemplatedIdentifier(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TemplatedIdentifier::TemplatedIdentifier(TemplatedIdentifier&&) = default;
|
|
||||||
|
|
||||||
TemplatedIdentifier::~TemplatedIdentifier() = default;
|
TemplatedIdentifier::~TemplatedIdentifier() = default;
|
||||||
|
|
||||||
const TemplatedIdentifier* TemplatedIdentifier::Clone(CloneContext* ctx) const {
|
const TemplatedIdentifier* TemplatedIdentifier::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -41,8 +41,8 @@ class TemplatedIdentifier final : public Castable<TemplatedIdentifier, Identifie
|
||||||
const Symbol& sym,
|
const Symbol& sym,
|
||||||
utils::VectorRef<const Expression*> args,
|
utils::VectorRef<const Expression*> args,
|
||||||
utils::VectorRef<const Attribute*> attrs);
|
utils::VectorRef<const Attribute*> attrs);
|
||||||
/// Move constructor
|
|
||||||
TemplatedIdentifier(TemplatedIdentifier&&);
|
/// Destructor
|
||||||
~TemplatedIdentifier() override;
|
~TemplatedIdentifier() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext` `ctx`.
|
/// Clones this node and all transitive child nodes using the `CloneContext` `ctx`.
|
||||||
|
|
|
@ -28,8 +28,6 @@ TypeDecl::TypeDecl(ProgramID pid, NodeID nid, const Source& src, const Identifie
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TypeDecl::TypeDecl(TypeDecl&&) = default;
|
|
||||||
|
|
||||||
TypeDecl::~TypeDecl() = default;
|
TypeDecl::~TypeDecl() = default;
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -33,9 +33,8 @@ class TypeDecl : public Castable<TypeDecl, Node> {
|
||||||
/// @param src the source of this node for the import statement
|
/// @param src the source of this node for the import statement
|
||||||
/// @param name The name of the type
|
/// @param name The name of the type
|
||||||
TypeDecl(ProgramID pid, NodeID nid, const Source& src, const Identifier* name);
|
TypeDecl(ProgramID pid, NodeID nid, const Source& src, const Identifier* name);
|
||||||
/// Move constructor
|
|
||||||
TypeDecl(TypeDecl&&);
|
|
||||||
|
|
||||||
|
/// Destructor
|
||||||
~TypeDecl() override;
|
~TypeDecl() override;
|
||||||
|
|
||||||
/// The name of the type declaration
|
/// The name of the type declaration
|
||||||
|
|
|
@ -30,8 +30,6 @@ UnaryOpExpression::UnaryOpExpression(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, expr, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
UnaryOpExpression::UnaryOpExpression(UnaryOpExpression&&) = default;
|
|
||||||
|
|
||||||
UnaryOpExpression::~UnaryOpExpression() = default;
|
UnaryOpExpression::~UnaryOpExpression() = default;
|
||||||
|
|
||||||
const UnaryOpExpression* UnaryOpExpression::Clone(CloneContext* ctx) const {
|
const UnaryOpExpression* UnaryOpExpression::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -34,8 +34,8 @@ class UnaryOpExpression final : public Castable<UnaryOpExpression, Expression> {
|
||||||
const Source& source,
|
const Source& source,
|
||||||
UnaryOp op,
|
UnaryOp op,
|
||||||
const Expression* expr);
|
const Expression* expr);
|
||||||
/// Move constructor
|
|
||||||
UnaryOpExpression(UnaryOpExpression&&);
|
/// Destructor
|
||||||
~UnaryOpExpression() override;
|
~UnaryOpExpression() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -33,8 +33,6 @@ Var::Var(ProgramID pid,
|
||||||
declared_address_space(address_space),
|
declared_address_space(address_space),
|
||||||
declared_access(access) {}
|
declared_access(access) {}
|
||||||
|
|
||||||
Var::Var(Var&&) = default;
|
|
||||||
|
|
||||||
Var::~Var() = default;
|
Var::~Var() = default;
|
||||||
|
|
||||||
const char* Var::Kind() const {
|
const char* Var::Kind() const {
|
||||||
|
|
|
@ -61,9 +61,6 @@ class Var final : public Castable<Var, Variable> {
|
||||||
const Expression* initializer,
|
const Expression* initializer,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
Var(Var&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Var() override;
|
~Var() override;
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,6 @@ Variable::Variable(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, initializer, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, initializer, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variable::Variable(Variable&&) = default;
|
|
||||||
|
|
||||||
Variable::~Variable() = default;
|
Variable::~Variable() = default;
|
||||||
|
|
||||||
} // namespace tint::ast
|
} // namespace tint::ast
|
||||||
|
|
|
@ -58,9 +58,6 @@ class Variable : public Castable<Variable, Node> {
|
||||||
const Expression* initializer,
|
const Expression* initializer,
|
||||||
utils::VectorRef<const Attribute*> attributes);
|
utils::VectorRef<const Attribute*> attributes);
|
||||||
|
|
||||||
/// Move constructor
|
|
||||||
Variable(Variable&&);
|
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
~Variable() override;
|
~Variable() override;
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,6 @@ VariableDeclStatement::VariableDeclStatement(ProgramID pid,
|
||||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, variable, program_id);
|
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, variable, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
VariableDeclStatement::VariableDeclStatement(VariableDeclStatement&&) = default;
|
|
||||||
|
|
||||||
VariableDeclStatement::~VariableDeclStatement() = default;
|
VariableDeclStatement::~VariableDeclStatement() = default;
|
||||||
|
|
||||||
const VariableDeclStatement* VariableDeclStatement::Clone(CloneContext* ctx) const {
|
const VariableDeclStatement* VariableDeclStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -32,8 +32,8 @@ class VariableDeclStatement final : public Castable<VariableDeclStatement, State
|
||||||
NodeID nid,
|
NodeID nid,
|
||||||
const Source& source,
|
const Source& source,
|
||||||
const Variable* variable);
|
const Variable* variable);
|
||||||
/// Move constructor
|
|
||||||
VariableDeclStatement(VariableDeclStatement&&);
|
/// Destructor
|
||||||
~VariableDeclStatement() override;
|
~VariableDeclStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
|
@ -40,8 +40,6 @@ WhileStatement::WhileStatement(ProgramID pid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WhileStatement::WhileStatement(WhileStatement&&) = default;
|
|
||||||
|
|
||||||
WhileStatement::~WhileStatement() = default;
|
WhileStatement::~WhileStatement() = default;
|
||||||
|
|
||||||
const WhileStatement* WhileStatement::Clone(CloneContext* ctx) const {
|
const WhileStatement* WhileStatement::Clone(CloneContext* ctx) const {
|
||||||
|
|
|
@ -37,8 +37,8 @@ class WhileStatement final : public Castable<WhileStatement, Statement> {
|
||||||
const Expression* condition,
|
const Expression* condition,
|
||||||
const BlockStatement* body,
|
const BlockStatement* body,
|
||||||
utils::VectorRef<const ast::Attribute*> attributes);
|
utils::VectorRef<const ast::Attribute*> attributes);
|
||||||
/// Move constructor
|
|
||||||
WhileStatement(WhileStatement&&);
|
/// Destructor
|
||||||
~WhileStatement() override;
|
~WhileStatement() override;
|
||||||
|
|
||||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||||
|
|
Loading…
Reference in New Issue