From d1398203f9602438222824dfcf21e7fcfb02c822 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 7 Dec 2020 14:53:14 +0000 Subject: [PATCH] Remove more unused AST setters Bug: tint:390 Change-Id: Ia15414e73ba921c0880556f4d43af783f1d497ea Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35005 Reviewed-by: dan sinclair Commit-Queue: Ben Clayton --- src/ast/array_accessor_expression.h | 3 --- src/ast/function.h | 3 --- src/ast/sint_literal.h | 3 --- src/ast/struct.h | 3 --- src/ast/uint_literal.h | 3 --- 5 files changed, 15 deletions(-) diff --git a/src/ast/array_accessor_expression.h b/src/ast/array_accessor_expression.h index 73cbdacc34..9738767739 100644 --- a/src/ast/array_accessor_expression.h +++ b/src/ast/array_accessor_expression.h @@ -46,9 +46,6 @@ class ArrayAccessorExpression /// @returns the array Expression* array() const { return array_; } - /// Sets the index expression - /// @param idx_expr the index expression - void set_idx_expr(Expression* idx_expr) { idx_expr_ = idx_expr; } /// @returns the index expression Expression* idx_expr() const { return idx_expr_; } diff --git a/src/ast/function.h b/src/ast/function.h index dbe02e056b..e4bf327e42 100644 --- a/src/ast/function.h +++ b/src/ast/function.h @@ -165,9 +165,6 @@ class Function : public Castable { /// @returns true if `name` is an ancestor entry point of this function bool HasAncestorEntryPoint(const std::string& name) const; - /// Sets the return type of the function - /// @param type the return type - void set_return_type(type::Type* type) { return_type_ = type; } /// @returns the function return type. type::Type* return_type() const { return return_type_; } /// @returns a pointer to the last statement of the function or nullptr if diff --git a/src/ast/sint_literal.h b/src/ast/sint_literal.h index 5a18406281..9cba513665 100644 --- a/src/ast/sint_literal.h +++ b/src/ast/sint_literal.h @@ -31,9 +31,6 @@ class SintLiteral : public Castable { SintLiteral(type::Type* type, int32_t value); ~SintLiteral() override; - /// Updates the literals value - /// @param val the value to set - void set_value(int32_t val) { value_ = val; } /// @returns the int literal value int32_t value() const { return value_; } diff --git a/src/ast/struct.h b/src/ast/struct.h index ab49a0fa6e..5dc31a4f4c 100644 --- a/src/ast/struct.h +++ b/src/ast/struct.h @@ -60,9 +60,6 @@ class Struct : public Castable { /// @returns the struct decorations const StructDecorationList& decorations() const { return decorations_; } - /// Sets the struct members - /// @param members the members to set - void set_members(StructMemberList members) { members_ = std::move(members); } /// @returns the members const StructMemberList& members() const { return members_; } diff --git a/src/ast/uint_literal.h b/src/ast/uint_literal.h index 662fdd61b7..822fa8d599 100644 --- a/src/ast/uint_literal.h +++ b/src/ast/uint_literal.h @@ -31,9 +31,6 @@ class UintLiteral : public Castable { UintLiteral(type::Type* type, uint32_t value); ~UintLiteral() override; - /// Updates the literals value - /// @param val the value to set - void set_value(uint32_t val) { value_ = val; } /// @returns the uint literal value uint32_t value() const { return value_; }