ast::TypeName: Clone the name.

Caught by the new seatbelts in the CloneContext.

Bug: tint:724
Change-Id: I1877248455e7654cb9c980cacd2f73562b006233
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49349
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton 2021-04-28 13:39:53 +00:00 committed by Commit Bot service account
parent e41808b6b9
commit 0bf0fb9b29
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ std::string TypeName::FriendlyName(const SymbolTable& symbols) const {
TypeName* TypeName::Clone(CloneContext* ctx) const { TypeName* TypeName::Clone(CloneContext* ctx) const {
auto src = ctx->Clone(source()); auto src = ctx->Clone(source());
return ctx->dst->create<TypeName>(src, name_); auto n = ctx->Clone(name());
return ctx->dst->create<TypeName>(src, n);
} }
} // namespace ast } // namespace ast