diff --git a/BUILD.gn b/BUILD.gn index 9c541959ee..a1a08410fb 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -904,7 +904,6 @@ source_set("tint_unittests_wgsl_writer_src") { "src/writer/wgsl/generator_impl_kill_test.cc", "src/writer/wgsl/generator_impl_loop_test.cc", "src/writer/wgsl/generator_impl_member_accessor_test.cc", - "src/writer/wgsl/generator_impl_module_constant_test.cc", "src/writer/wgsl/generator_impl_return_test.cc", "src/writer/wgsl/generator_impl_switch_test.cc", "src/writer/wgsl/generator_impl_test.cc", @@ -953,6 +952,7 @@ source_set("tint_unittests_msl_writer_src") { "src/writer/msl/generator_impl_kill_test.cc", "src/writer/msl/generator_impl_loop_test.cc", "src/writer/msl/generator_impl_member_accessor_test.cc", + "src/writer/msl/generator_impl_module_constant_test.cc", "src/writer/msl/generator_impl_return_test.cc", "src/writer/msl/generator_impl_switch_test.cc", "src/writer/msl/generator_impl_test.cc", diff --git a/src/ast/function_test.cc b/src/ast/function_test.cc index 127719c916..72c39e1be1 100644 --- a/src/ast/function_test.cc +++ b/src/ast/function_test.cc @@ -119,9 +119,9 @@ TEST_F(FunctionTest, GetReferenceLocations) { auto ref_locs = f.referenced_location_variables(); ASSERT_EQ(ref_locs.size(), 2u); EXPECT_EQ(ref_locs[0].first, &loc1); - EXPECT_EQ(ref_locs[0].second->value(), 0); + EXPECT_EQ(ref_locs[0].second->value(), 0u); EXPECT_EQ(ref_locs[1].first, &loc2); - EXPECT_EQ(ref_locs[1].second->value(), 1); + EXPECT_EQ(ref_locs[1].second->value(), 1u); } TEST_F(FunctionTest, GetReferenceBuiltins) { diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc index b3af01d256..2c6411e462 100644 --- a/src/writer/msl/generator_impl.cc +++ b/src/writer/msl/generator_impl.cc @@ -651,8 +651,8 @@ bool GeneratorImpl::EmitEntryPointData(ast::EntryPoint* ep) { std::vector> out_variables; for (auto data : func->referenced_location_variables()) { - auto var = data.first; - auto deco = data.second; + auto* var = data.first; + auto* deco = data.second; if (var->storage_class() == ast::StorageClass::kInput) { in_locations.push_back({var, deco->value()}); @@ -662,8 +662,8 @@ bool GeneratorImpl::EmitEntryPointData(ast::EntryPoint* ep) { } for (auto data : func->referenced_builtin_variables()) { - auto var = data.first; - auto deco = data.second; + auto* var = data.first; + auto* deco = data.second; if (var->storage_class() == ast::StorageClass::kOutput) { out_variables.push_back({var, deco}); @@ -819,7 +819,7 @@ void GeneratorImpl::EmitStage(ast::PipelineStage stage) { bool GeneratorImpl::has_referenced_var_needing_struct(ast::Function* func) { for (auto data : func->referenced_location_variables()) { - auto var = data.first; + auto* var = data.first; if (var->storage_class() == ast::StorageClass::kInput || var->storage_class() == ast::StorageClass::kOutput) { return true; @@ -827,7 +827,7 @@ bool GeneratorImpl::has_referenced_var_needing_struct(ast::Function* func) { } for (auto data : func->referenced_builtin_variables()) { - auto var = data.first; + auto* var = data.first; if (var->storage_class() == ast::StorageClass::kOutput) { return true; }