ast: Remove statement constructors that don't take a Source

Parsers need fixing up.

Bug: tint:396
Bug: tint:390
Change-Id: I137f1017ca56125cf3d52ecbef2ff46d0574338b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35161
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-12-12 11:58:44 +00:00
committed by Commit Bot service account
parent 1ff59cd0e2
commit bbefff63a3
111 changed files with 1287 additions and 1145 deletions

View File

@@ -48,7 +48,7 @@ class VertexPullingHelper {
void InitBasicModule() {
auto* func = create<ast::Function>(
Source{}, mod_->RegisterSymbol("main"), "main", ast::VariableList{},
mod_->create<ast::type::Void>(), create<ast::BlockStatement>(),
mod_->create<ast::type::Void>(), create<ast::BlockStatement>(Source{}),
ast::FunctionDecorationList{create<ast::StageDecoration>(
ast::PipelineStage::kVertex, Source{})});
mod()->AddFunction(func);
@@ -135,7 +135,7 @@ TEST_F(VertexPullingTest, Error_InvalidEntryPoint) {
TEST_F(VertexPullingTest, Error_EntryPointWrongStage) {
auto* func = create<ast::Function>(
Source{}, mod()->RegisterSymbol("main"), "main", ast::VariableList{},
mod()->create<ast::type::Void>(), create<ast::BlockStatement>(),
mod()->create<ast::type::Void>(), create<ast::BlockStatement>(Source{}),
ast::FunctionDecorationList{
create<ast::StageDecoration>(ast::PipelineStage::kFragment, Source{}),
});