diff --git a/src/reader/wgsl/parser_impl.cc b/src/reader/wgsl/parser_impl.cc index d8209a7b14..3d2c8e3d69 100644 --- a/src/reader/wgsl/parser_impl.cc +++ b/src/reader/wgsl/parser_impl.cc @@ -2109,11 +2109,11 @@ Maybe ParserImpl::func_call_stmt() { return Failure::kErrored; return create( - Source{}, create( - source, - create( - source, builder_.Symbols().Register(name)), - std::move(params.value))); + source, create( + source, + create( + source, builder_.Symbols().Register(name)), + std::move(params.value))); } // break_stmt diff --git a/src/reader/wgsl/parser_impl_call_stmt_test.cc b/src/reader/wgsl/parser_impl_call_stmt_test.cc index 28dc2c813d..8d4429ca54 100644 --- a/src/reader/wgsl/parser_impl_call_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_call_stmt_test.cc @@ -28,6 +28,11 @@ TEST_F(ParserImplTest, Statement_Call) { EXPECT_TRUE(e.matched); EXPECT_FALSE(e.errored); + EXPECT_EQ(e->source().range.begin.line, 1u); + EXPECT_EQ(e->source().range.begin.column, 1u); + EXPECT_EQ(e->source().range.end.line, 1u); + EXPECT_EQ(e->source().range.end.column, 2u); + ASSERT_TRUE(e->Is()); auto* c = e->As()->expr();