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>
This commit is contained in:
parent
e8c12f32f9
commit
e018cefdce
2
BUILD.gn
2
BUILD.gn
|
@ -253,6 +253,8 @@ source_set("libtint_core_src") {
|
||||||
"src/ast/continue_statement.h",
|
"src/ast/continue_statement.h",
|
||||||
"src/ast/decorated_variable.cc",
|
"src/ast/decorated_variable.cc",
|
||||||
"src/ast/decorated_variable.h",
|
"src/ast/decorated_variable.h",
|
||||||
|
"src/ast/discard_statement.cc",
|
||||||
|
"src/ast/discard_statement.h",
|
||||||
"src/ast/else_statement.cc",
|
"src/ast/else_statement.cc",
|
||||||
"src/ast/else_statement.h",
|
"src/ast/else_statement.h",
|
||||||
"src/ast/entry_point.cc",
|
"src/ast/entry_point.cc",
|
||||||
|
|
|
@ -65,8 +65,8 @@ bool ValidatorImpl::ValidateStatement(const ast::Statement& stmt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ValidatorImpl::ValidateAssign(const ast::AssignmentStatement& a) {
|
bool ValidatorImpl::ValidateAssign(const ast::AssignmentStatement& a) {
|
||||||
auto lhs_result_type = a.lhs()->result_type()->UnwrapAliasPtrAlias();
|
auto* lhs_result_type = a.lhs()->result_type()->UnwrapAliasPtrAlias();
|
||||||
auto rhs_result_type = a.rhs()->result_type()->UnwrapAliasPtrAlias();
|
auto* rhs_result_type = a.rhs()->result_type()->UnwrapAliasPtrAlias();
|
||||||
if (lhs_result_type != rhs_result_type) {
|
if (lhs_result_type != rhs_result_type) {
|
||||||
// TODO(sarahM0): figur out what should be the error number.
|
// TODO(sarahM0): figur out what should be the error number.
|
||||||
set_error(a.source(), "v-000x: invalid assignment of '" +
|
set_error(a.source(), "v-000x: invalid assignment of '" +
|
||||||
|
|
|
@ -123,10 +123,10 @@ TEST_F(ValidatorTest, AssignIncompatibleTypes_Fail) {
|
||||||
|
|
||||||
ast::Variable var("a", ast::StorageClass::kPrivate, &i32);
|
ast::Variable var("a", ast::StorageClass::kPrivate, &i32);
|
||||||
auto lhs = std::make_unique<ast::IdentifierExpression>("a");
|
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>(
|
auto rhs = std::make_unique<ast::ScalarConstructorExpression>(
|
||||||
std::make_unique<ast::FloatLiteral>(&f32, 2.3f));
|
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),
|
ast::AssignmentStatement assign(Source{12, 34}, std::move(lhs),
|
||||||
std::move(rhs));
|
std::move(rhs));
|
||||||
|
|
Loading…
Reference in New Issue