diff --git a/BUILD.gn b/BUILD.gn index 0eaa74c3be..a904e713b3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -253,6 +253,8 @@ source_set("libtint_core_src") { "src/ast/continue_statement.h", "src/ast/decorated_variable.cc", "src/ast/decorated_variable.h", + "src/ast/discard_statement.cc", + "src/ast/discard_statement.h", "src/ast/else_statement.cc", "src/ast/else_statement.h", "src/ast/entry_point.cc", diff --git a/src/validator_impl.cc b/src/validator_impl.cc index 71ff6d447d..547ad14d93 100644 --- a/src/validator_impl.cc +++ b/src/validator_impl.cc @@ -65,8 +65,8 @@ bool ValidatorImpl::ValidateStatement(const ast::Statement& stmt) { } bool ValidatorImpl::ValidateAssign(const ast::AssignmentStatement& a) { - auto lhs_result_type = a.lhs()->result_type()->UnwrapAliasPtrAlias(); - auto rhs_result_type = a.rhs()->result_type()->UnwrapAliasPtrAlias(); + auto* lhs_result_type = a.lhs()->result_type()->UnwrapAliasPtrAlias(); + auto* rhs_result_type = a.rhs()->result_type()->UnwrapAliasPtrAlias(); if (lhs_result_type != rhs_result_type) { // TODO(sarahM0): figur out what should be the error number. set_error(a.source(), "v-000x: invalid assignment of '" + diff --git a/src/validator_test.cc b/src/validator_test.cc index 9966ab072e..2d91d7842d 100644 --- a/src/validator_test.cc +++ b/src/validator_test.cc @@ -123,10 +123,10 @@ TEST_F(ValidatorTest, AssignIncompatibleTypes_Fail) { ast::Variable var("a", ast::StorageClass::kPrivate, &i32); auto lhs = std::make_unique("a"); - auto lhs_ptr = lhs.get(); + auto* lhs_ptr = lhs.get(); auto rhs = std::make_unique( std::make_unique(&f32, 2.3f)); - auto rhs_ptr = rhs.get(); + auto* rhs_ptr = rhs.get(); ast::AssignmentStatement assign(Source{12, 34}, std::move(lhs), std::move(rhs));