Move all Source constructor params to be the first

This consistency can be utilized by the ast::Builder to inject the source parameter if it isn't provided.

Bug: tint:396
Bug: tint:390
Change-Id: I2f19002131e79daae799b8cbe918eb192d6bfc75
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35503
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-12-14 21:10:07 +00:00
committed by Commit Bot service account
parent 7b2f8d010f
commit 5aad70a069
72 changed files with 554 additions and 554 deletions

View File

@@ -51,7 +51,7 @@ class VertexPullingHelper {
mod_->create<ast::type::Void>(),
create<ast::BlockStatement>(Source{}, ast::StatementList{}),
ast::FunctionDecorationList{create<ast::StageDecoration>(
ast::PipelineStage::kVertex, Source{})});
Source{}, ast::PipelineStage::kVertex)});
mod()->AddFunction(func);
}
@@ -79,7 +79,7 @@ class VertexPullingHelper {
nullptr, // constructor
ast::VariableDecorationList{
// decorations
create<ast::LocationDecoration>(location, Source{}),
create<ast::LocationDecoration>(Source{}, location),
});
mod_->AddGlobalVariable(var);
@@ -139,7 +139,7 @@ TEST_F(VertexPullingTest, Error_EntryPointWrongStage) {
mod()->create<ast::type::Void>(),
create<ast::BlockStatement>(Source{}, ast::StatementList{}),
ast::FunctionDecorationList{
create<ast::StageDecoration>(ast::PipelineStage::kFragment, Source{}),
create<ast::StageDecoration>(Source{}, ast::PipelineStage::kFragment),
});
mod()->AddFunction(func);
@@ -437,7 +437,7 @@ TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex) {
nullptr, // constructor
ast::VariableDecorationList{
// decorations
create<ast::BuiltinDecoration>(ast::Builtin::kVertexIdx, Source{}),
create<ast::BuiltinDecoration>(Source{}, ast::Builtin::kVertexIdx),
}));
mod()->AddGlobalVariable(create<ast::Variable>(
@@ -449,7 +449,7 @@ TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex) {
nullptr, // constructor
ast::VariableDecorationList{
// decorations
create<ast::BuiltinDecoration>(ast::Builtin::kInstanceIdx, Source{}),
create<ast::BuiltinDecoration>(Source{}, ast::Builtin::kInstanceIdx),
}));
InitTransform(