mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Access struct member name through sem.
This CL changes the uses of Declaration()->symbol for struct members in the sem to access the `Name` directly. Bug: tint:1718 Change-Id: I3050147b97bea66d6c283e176a7152f36eb2b25f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112444 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
d5d207ba9f
commit
c5b1b5c77a
@@ -3620,7 +3620,7 @@ bool Resolver::ApplyAddressSpaceUsageToType(ast::AddressSpace address_space,
|
||||
decl->type->source)) {
|
||||
std::stringstream err;
|
||||
err << "while analyzing structure member " << sem_.TypeNameOf(str) << "."
|
||||
<< builder_->Symbols().NameFor(decl->symbol);
|
||||
<< builder_->Symbols().NameFor(member->Name());
|
||||
AddNote(err.str(), decl->source);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ bool Validator::AddressSpaceLayout(const sem::Type* store_ty,
|
||||
};
|
||||
|
||||
auto member_name_of = [this](const sem::StructMember* sm) {
|
||||
return symbols_.NameFor(sm->Declaration()->symbol);
|
||||
return symbols_.NameFor(sm->Name());
|
||||
};
|
||||
|
||||
// Only validate the [type + address space] once
|
||||
|
||||
Reference in New Issue
Block a user