ast: Remove pointless deleted copy constructors

ast::Node has a deleted copy constructor, so the derived classes cannot be implicitly copied.

Change-Id: I57f74a4ab35dd00b3290b964cb6492f4fa4505a5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66602
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton 2021-10-15 17:40:39 +00:00 committed by Tint LUCI CQ
parent 4f3ff57c28
commit 2bd1321133
32 changed files with 0 additions and 96 deletions

View File

@ -48,9 +48,6 @@ class ArrayAccessorExpression
/// the index expression
Expression* const index;
private:
ArrayAccessorExpression(const ArrayAccessorExpression&) = delete;
};
} // namespace ast

View File

@ -48,9 +48,6 @@ class AssignmentStatement : public Castable<AssignmentStatement, Statement> {
/// right side expression
Expression* const rhs;
private:
AssignmentStatement(const AssignmentStatement&) = delete;
};
} // namespace ast

View File

@ -118,9 +118,6 @@ class BinaryExpression : public Castable<BinaryExpression, Expression> {
Expression* const lhs;
/// the right side expression
Expression* const rhs;
private:
BinaryExpression(const BinaryExpression&) = delete;
};
inline bool BinaryExpression::IsArithmetic() const {

View File

@ -49,9 +49,6 @@ class BitcastExpression : public Castable<BitcastExpression, Expression> {
ast::Type* const type;
/// the expression
Expression* const expr;
private:
BitcastExpression(const BitcastExpression&) = delete;
};
} // namespace ast

View File

@ -52,9 +52,6 @@ class BlockStatement : public Castable<BlockStatement, Statement> {
/// the statement list
StatementList const statements;
private:
BlockStatement(const BlockStatement&) = delete;
};
} // namespace ast

View File

@ -36,9 +36,6 @@ class BreakStatement : public Castable<BreakStatement, Statement> {
/// @param ctx the clone context
/// @return the newly cloned node
BreakStatement* Clone(CloneContext* ctx) const override;
private:
BreakStatement(const BreakStatement&) = delete;
};
} // namespace ast

View File

@ -49,9 +49,6 @@ class CallExpression : public Castable<CallExpression, Expression> {
IdentifierExpression* const func;
/// The arguments
ExpressionList const args;
private:
CallExpression(const CallExpression&) = delete;
};
} // namespace ast

View File

@ -41,9 +41,6 @@ class CallStatement : public Castable<CallStatement, Statement> {
/// The call expression
CallExpression* const expr;
private:
CallStatement(const CallStatement&) = delete;
};
} // namespace ast

View File

@ -56,9 +56,6 @@ class CaseStatement : public Castable<CaseStatement, Statement> {
/// The case body
BlockStatement* const body;
private:
CaseStatement(const CaseStatement&) = delete;
};
/// A list of case statements

View File

@ -33,9 +33,6 @@ class ConstructorExpression
ConstructorExpression(ProgramID pid, const Source& src);
/// Move constructor
ConstructorExpression(ConstructorExpression&&);
private:
ConstructorExpression(const ConstructorExpression&) = delete;
};
} // namespace ast

View File

@ -36,9 +36,6 @@ class ContinueStatement : public Castable<ContinueStatement, Statement> {
/// @param ctx the clone context
/// @return the newly cloned node
ContinueStatement* Clone(CloneContext* ctx) const override;
private:
ContinueStatement(const ContinueStatement&) = delete;
};
} // namespace ast

View File

@ -36,9 +36,6 @@ class DiscardStatement : public Castable<DiscardStatement, Statement> {
/// @param ctx the clone context
/// @return the newly cloned node
DiscardStatement* Clone(CloneContext* ctx) const override;
private:
DiscardStatement(const DiscardStatement&) = delete;
};
} // namespace ast

View File

@ -50,9 +50,6 @@ class ElseStatement : public Castable<ElseStatement, Statement> {
/// The else body
BlockStatement* const body;
private:
ElseStatement(const ElseStatement&) = delete;
};
/// A list of else statements

View File

@ -36,9 +36,6 @@ class Expression : public Castable<Expression, Node> {
Expression(ProgramID pid, const Source& src);
/// Move constructor
Expression(Expression&&);
private:
Expression(const Expression&) = delete;
};
/// A list of expressions

View File

@ -36,9 +36,6 @@ class FallthroughStatement : public Castable<FallthroughStatement, Statement> {
/// @param ctx the clone context
/// @return the newly cloned node
FallthroughStatement* Clone(CloneContext* ctx) const override;
private:
FallthroughStatement(const FallthroughStatement&) = delete;
};
} // namespace ast

View File

@ -59,9 +59,6 @@ class ForLoopStatement : public Castable<ForLoopStatement, Statement> {
/// The loop body block
BlockStatement* const body;
private:
ForLoopStatement(const ForLoopStatement&) = delete;
};
} // namespace ast

View File

@ -86,9 +86,6 @@ class Function : public Castable<Function, Node> {
/// The decorations attached to the function return type.
DecorationList const return_type_decorations;
private:
Function(const Function&) = delete;
};
/// A list of functions

View File

@ -40,9 +40,6 @@ class IdentifierExpression : public Castable<IdentifierExpression, Expression> {
/// The symbol for the identifier
Symbol const symbol;
private:
IdentifierExpression(const IdentifierExpression&) = delete;
};
} // namespace ast

View File

@ -54,9 +54,6 @@ class IfStatement : public Castable<IfStatement, Statement> {
/// The else statements
ElseStatementList const else_statements;
private:
IfStatement(const IfStatement&) = delete;
};
} // namespace ast

View File

@ -47,9 +47,6 @@ class LoopStatement : public Castable<LoopStatement, Statement> {
/// The continuing statements
BlockStatement* const continuing;
private:
LoopStatement(const LoopStatement&) = delete;
};
} // namespace ast

View File

@ -48,9 +48,6 @@ class MemberAccessorExpression
/// The member expression
IdentifierExpression* const member;
private:
MemberAccessorExpression(const MemberAccessorExpression&) = delete;
};
} // namespace ast

View File

@ -46,9 +46,6 @@ class ReturnStatement : public Castable<ReturnStatement, Statement> {
/// The value returned. May be null.
Expression* const value;
private:
ReturnStatement(const ReturnStatement&) = delete;
};
} // namespace ast

View File

@ -44,9 +44,6 @@ class ScalarConstructorExpression
/// The literal value
Literal* const literal;
private:
ScalarConstructorExpression(const ScalarConstructorExpression&) = delete;
};
} // namespace ast

View File

@ -37,9 +37,6 @@ class Statement : public Castable<Statement, Node> {
Statement(ProgramID pid, const Source& src);
/// Move constructor
Statement(Statement&&);
private:
Statement(const Statement&) = delete;
};
/// A list of statements

View File

@ -58,9 +58,6 @@ class Struct : public Castable<Struct, TypeDecl> {
/// The struct decorations
DecorationList const decorations;
private:
Struct(const Struct&) = delete;
};
} // namespace ast

View File

@ -59,9 +59,6 @@ class StructMember : public Castable<StructMember, Node> {
/// The decorations
DecorationList const decorations;
private:
StructMember(const StructMember&) = delete;
};
/// A list of struct members

View File

@ -51,8 +51,6 @@ class SwitchStatement : public Castable<SwitchStatement, Statement> {
/// The Switch body
CaseStatementList const body;
private:
SwitchStatement(const SwitchStatement&) = delete;
};

View File

@ -53,9 +53,6 @@ class TypeConstructorExpression
/// The values
ExpressionList const values;
private:
TypeConstructorExpression(const TypeConstructorExpression&) = delete;
};
} // namespace ast

View File

@ -37,10 +37,6 @@ class TypeDecl : public Castable<TypeDecl, Node> {
/// The name of the type declaration
Symbol const name;
private:
TypeDecl(const TypeDecl&) = delete;
TypeDecl& operator=(const TypeDecl&) = delete;
};
} // namespace ast

View File

@ -48,9 +48,6 @@ class UnaryOpExpression : public Castable<UnaryOpExpression, Expression> {
/// The expression
Expression* const expr;
private:
UnaryOpExpression(const UnaryOpExpression&) = delete;
};
} // namespace ast

View File

@ -152,9 +152,6 @@ class Variable : public Castable<Variable, Node> {
/// The declared access control
Access const declared_access;
private:
Variable(const Variable&) = delete;
};
/// A list of variables

View File

@ -44,9 +44,6 @@ class VariableDeclStatement
/// The variable
Variable* const variable;
private:
VariableDeclStatement(const VariableDeclStatement&) = delete;
};
} // namespace ast