From c0c8abc56978905bf05fccafeeb406709d885366 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 2 Mar 2023 17:36:37 +0000 Subject: [PATCH] tint/resolver: Add missing ResolvedIdentifier case for 'let' Prevents an ICE. I had this trigger, but I'm now struggling to find a reproduction. Only used to print a diagnostic when things go wrong. Change-Id: Iab78c3bcaaf1afb2f556247f8a419f93a727ec96 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122341 Kokoro: Ben Clayton Reviewed-by: Dan Sinclair Commit-Queue: Ben Clayton --- src/tint/resolver/dependency_graph.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tint/resolver/dependency_graph.cc b/src/tint/resolver/dependency_graph.cc index 9b6d471714..8292adbaea 100644 --- a/src/tint/resolver/dependency_graph.cc +++ b/src/tint/resolver/dependency_graph.cc @@ -37,6 +37,7 @@ #include "src/tint/ast/internal_attribute.h" #include "src/tint/ast/interpolate_attribute.h" #include "src/tint/ast/invariant_attribute.h" +#include "src/tint/ast/let.h" #include "src/tint/ast/location_attribute.h" #include "src/tint/ast/loop_statement.h" #include "src/tint/ast/must_use_attribute.h" @@ -810,6 +811,9 @@ std::string ResolvedIdentifier::String(const SymbolTable& symbols, diag::List& d [&](const ast::Var* n) { // return "var '" + symbols.NameFor(n->name->symbol) + "'"; }, + [&](const ast::Let* n) { // + return "let '" + symbols.NameFor(n->name->symbol) + "'"; + }, [&](const ast::Const* n) { // return "const '" + symbols.NameFor(n->name->symbol) + "'"; },