diff --git a/src/tint/resolver/dependency_graph.cc b/src/tint/resolver/dependency_graph.cc index b6001c1fa4..5a21c55d8a 100644 --- a/src/tint/resolver/dependency_graph.cc +++ b/src/tint/resolver/dependency_graph.cc @@ -194,6 +194,7 @@ class DependencyScanner { [&](const ast::Function* func) { Declare(func->symbol, func); TraverseAttributes(func->attributes); + TraverseAttributes(func->return_type_attributes); TraverseFunction(func); }, [&](const ast::Variable* var) { diff --git a/src/tint/resolver/dependency_graph_test.cc b/src/tint/resolver/dependency_graph_test.cc index ae314b8a95..311c9ccc66 100644 --- a/src/tint/resolver/dependency_graph_test.cc +++ b/src/tint/resolver/dependency_graph_test.cc @@ -1270,7 +1270,9 @@ TEST_F(ResolverDependencyGraphTraversalTest, SymbolsReached) { Return(V), // Break(), // Discard(), // - }); // + }, + utils::Empty, // function attributes + utils::Vector{Location(V)}); // return attributes // Exercise type traversal GlobalVar(Sym(), ty.atomic(T)); GlobalVar(Sym(), ty.bool_());