diff --git a/src/program.cc b/src/program.cc index f341e8acf2..3fbf4c9126 100644 --- a/src/program.cc +++ b/src/program.cc @@ -40,7 +40,7 @@ Program::Program(Program&& program) Program::Program(ProgramBuilder&& builder) { is_valid_ = builder.IsValid(); if (builder.ResolveOnBuild() && builder.IsValid()) { - Resolver resolver(&builder); + resolver::Resolver resolver(&builder); if (!resolver.Resolve()) { diagnostics_.add_error(resolver.error()); is_valid_ = false; diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index da144c7b30..07a3c93a91 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -37,6 +37,7 @@ #include "src/semantic/variable.h" namespace tint { +namespace resolver { namespace { using IntrinsicType = tint::semantic::IntrinsicType; @@ -961,4 +962,5 @@ Resolver::FunctionInfo::FunctionInfo(ast::Function* decl) : declaration(decl) {} Resolver::FunctionInfo::~FunctionInfo() = default; +} // namespace resolver } // namespace tint diff --git a/src/resolver/resolver.h b/src/resolver/resolver.h index 4a095be7b8..53b38e83e2 100644 --- a/src/resolver/resolver.h +++ b/src/resolver/resolver.h @@ -45,6 +45,8 @@ namespace semantic { class Statement; } // namespace semantic +namespace resolver { + /// Resolves types for all items in the given tint program class Resolver { public: @@ -241,6 +243,7 @@ class Resolver { BlockAllocator function_infos_; }; +} // namespace resolver } // namespace tint #endif // SRC_RESOLVER_RESOLVER_H_ diff --git a/src/resolver/resolver_test.cc b/src/resolver/resolver_test.cc index d3613cd147..3f899a2125 100644 --- a/src/resolver/resolver_test.cc +++ b/src/resolver/resolver_test.cc @@ -40,6 +40,7 @@ using ::testing::ElementsAre; using ::testing::HasSubstr; namespace tint { +namespace resolver { namespace { using IntrinsicType = semantic::IntrinsicType; @@ -3774,10 +3775,11 @@ TEST_P(ResolverTextureIntrinsicTest, Call) { auto* target = call_sem->Target(); ASSERT_NE(target, nullptr); - auto got = ::tint::to_str(param.function, target->Parameters()); + auto got = resolver::to_str(param.function, target->Parameters()); auto* expected = expected_texture_overload(param.overload); EXPECT_EQ(got, expected); } } // namespace +} // namespace resolver } // namespace tint