Fix Tint ninja build
Rebasing I saw chromium style issue with auto pointers and a missing BUILD.gn file.
Change-Id: I7666595664b5eb95f681b3d2edd1d84df7d6fe63
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25848
Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 0eaa74c..a904e71 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -253,6 +253,8 @@
"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 71ff6d4..547ad14 100644
--- a/src/validator_impl.cc
+++ b/src/validator_impl.cc
@@ -65,8 +65,8 @@
}
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 9966ab0..2d91d78 100644
--- a/src/validator_test.cc
+++ b/src/validator_test.cc
@@ -123,10 +123,10 @@
ast::Variable var("a", ast::StorageClass::kPrivate, &i32);
auto lhs = std::make_unique<ast::IdentifierExpression>("a");
- auto lhs_ptr = lhs.get();
+ auto* lhs_ptr = lhs.get();
auto rhs = std::make_unique<ast::ScalarConstructorExpression>(
std::make_unique<ast::FloatLiteral>(&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));