ast: Remove ReturnStatement constructors that don't take a source

set_source() will be removed, so sources will only be specifiable at construction time.

Bug: tint:390
Change-Id: I2b81929e362ccf75145ebc45028dd973a77ae068
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35010
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-12-07 21:09:57 +00:00
committed by Commit Bot service account
parent 321e5a9d7e
commit d0dda258cc
23 changed files with 183 additions and 187 deletions

View File

@@ -326,7 +326,7 @@ TEST_F(ValidatorTest, UsingUndefinedVariableGlobalVariable_Pass) {
auto* body = create<ast::BlockStatement>();
body->append(create<ast::AssignmentStatement>(
Source{Source::Location{12, 34}}, lhs, rhs));
body->append(create<ast::ReturnStatement>());
body->append(create<ast::ReturnStatement>(Source{}));
auto* func = create<ast::Function>(
Source{}, "my_func", params, &void_type, body,
ast::FunctionDecorationList{
@@ -634,7 +634,7 @@ TEST_F(ValidatorTest, RedeclaredIdentifierDifferentFunctions_Pass) {
auto* body0 = create<ast::BlockStatement>();
body0->append(create<ast::VariableDeclStatement>(
Source{Source::Location{12, 34}}, var0));
body0->append(create<ast::ReturnStatement>());
body0->append(create<ast::ReturnStatement>(Source{}));
auto* func0 = create<ast::Function>(Source{}, "func0", params0, &void_type,
body0, ast::FunctionDecorationList{});
@@ -642,7 +642,7 @@ TEST_F(ValidatorTest, RedeclaredIdentifierDifferentFunctions_Pass) {
auto* body1 = create<ast::BlockStatement>();
body1->append(create<ast::VariableDeclStatement>(
Source{Source::Location{13, 34}}, var1));
body1->append(create<ast::ReturnStatement>());
body1->append(create<ast::ReturnStatement>(Source{}));
auto* func1 = create<ast::Function>(
Source{}, "func1", params1, &void_type, body1,
ast::FunctionDecorationList{