mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
ast: Move Module function methods to FunctionList
Module will be split into Module (immutable) and ModuleBuilder (mutable). By moving these methods to the FunctionList, we can deduplicate a bunch of common logic. Bug: tint:390 Change-Id: I3fd85200aae4e8dc3d5afce8c9aaa6512809a3a0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38363 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
281b602f59
commit
6761160dc1
@@ -392,7 +392,7 @@ TEST_F(ValidatorTest, UsingUndefinedVariableGlobalVariable_Fail) {
|
||||
Source{Source::Location{12, 34}}, lhs, rhs),
|
||||
},
|
||||
ast::FunctionDecorationList{});
|
||||
mod->AddFunction(func);
|
||||
mod->Functions().Add(func);
|
||||
|
||||
ValidatorImpl& v = Build();
|
||||
|
||||
@@ -420,7 +420,7 @@ TEST_F(ValidatorTest, UsingUndefinedVariableGlobalVariable_Pass) {
|
||||
ast::FunctionDecorationList{
|
||||
create<ast::StageDecoration>(ast::PipelineStage::kVertex),
|
||||
});
|
||||
mod->AddFunction(func);
|
||||
mod->Functions().Add(func);
|
||||
|
||||
EXPECT_TRUE(td()->Determine()) << td()->error();
|
||||
|
||||
@@ -578,7 +578,7 @@ TEST_F(ValidatorTest, GlobalVariableFunctionVariableNotUnique_Fail) {
|
||||
},
|
||||
ast::FunctionDecorationList{});
|
||||
|
||||
mod->AddFunction(func);
|
||||
mod->Functions().Add(func);
|
||||
|
||||
EXPECT_TRUE(td()->Determine()) << td()->error();
|
||||
EXPECT_TRUE(td()->DetermineFunction(func)) << td()->error();
|
||||
@@ -608,7 +608,7 @@ TEST_F(ValidatorTest, RedeclaredIndentifier_Fail) {
|
||||
},
|
||||
ast::FunctionDecorationList{});
|
||||
|
||||
mod->AddFunction(func);
|
||||
mod->Functions().Add(func);
|
||||
|
||||
EXPECT_TRUE(td()->Determine()) << td()->error();
|
||||
EXPECT_TRUE(td()->DetermineFunction(func)) << td()->error();
|
||||
@@ -707,8 +707,8 @@ TEST_F(ValidatorTest, RedeclaredIdentifierDifferentFunctions_Pass) {
|
||||
create<ast::StageDecoration>(ast::PipelineStage::kVertex),
|
||||
});
|
||||
|
||||
mod->AddFunction(func0);
|
||||
mod->AddFunction(func1);
|
||||
mod->Functions().Add(func0);
|
||||
mod->Functions().Add(func1);
|
||||
|
||||
EXPECT_TRUE(td()->Determine()) << td()->error();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user