diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index ff7f50cf2a..947dfefabe 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -207,10 +207,14 @@ bool Resolver::ResolveInternal() { for (auto* node : builder_->ASTNodes().Objects()) { if (marked_.count(node) == 0) { - if (node->Is()) { - // These are generated by the WGSL parser, used to build - // sem::AccessControls and then leaked. - // Once we introduce AST types, this should be fixed. + if (node->IsAnyOf()) { + // TODO(crbug.com/tint/724) - Remove once tint:724 is complete. + // ast::AccessDecorations are generated by the WGSL parser, used to + // build sem::AccessControls and then leaked. + // ast::StrideDecoration are used to build a sem::ArrayTypes, but + // multiple arrays of the same stride, size and element type are + // currently de-duplicated by the type manager, and we leak these + // decorations. continue; } TINT_ICE(diagnostics_) << "AST node '" << node->TypeInfo().name diff --git a/src/resolver/resolver_test.cc b/src/resolver/resolver_test.cc index 028d51a11b..b00a199efc 100644 --- a/src/resolver/resolver_test.cc +++ b/src/resolver/resolver_test.cc @@ -1626,6 +1626,13 @@ TEST_F(ResolverTest, Function_EntryPoints_LinearTime) { ASSERT_TRUE(r()->Resolve()) << r()->error(); } +// Test for crbug.com/tint/728 +TEST_F(ResolverTest, ASTNodesAreReached) { + Structure("A", {Member("x", ty.array(4))}); + Structure("B", {Member("x", ty.array(4))}); + ASSERT_TRUE(r()->Resolve()) << r()->error(); +} + TEST_F(ResolverTest, ASTNodeNotReached) { EXPECT_FATAL_FAILURE( {