mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Add Source to sem::Struct
This CL adds a Source to the sem::Struct. The uses of struct->Declaration()->source now use the source stored directly on the struct. Bug: tint:1718 Change-Id: I860c67764f85d98b3f655247e18f93fa0fef9436 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112447 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
8954189545
commit
f745e4e2bf
@@ -122,8 +122,8 @@ TEST_F(CreateASTTypeForTest, AliasedArrayWithComplexOverrideLength) {
|
||||
TEST_F(CreateASTTypeForTest, Struct) {
|
||||
auto* str = create([](ProgramBuilder& b) {
|
||||
auto* decl = b.Structure("S", {});
|
||||
return b.create<sem::Struct>(decl, decl->name, sem::StructMemberList{}, 4u /* align */,
|
||||
4u /* size */, 4u /* size_no_padding */);
|
||||
return b.create<sem::Struct>(decl, decl->source, decl->name, sem::StructMemberList{},
|
||||
4u /* align */, 4u /* size */, 4u /* size_no_padding */);
|
||||
});
|
||||
ASSERT_TRUE(str->Is<ast::TypeName>());
|
||||
EXPECT_EQ(ast_type_builder.Symbols().NameFor(str->As<ast::TypeName>()->name), "S");
|
||||
|
||||
Reference in New Issue
Block a user