Traverse function return attributes.
The dependency graph needs to traverse function return attributes as they can contain expressions now. Bug: chromium:1377630 Change-Id: I338aa7ff1105baed93871ec44ca02285fabf407d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106845 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
cc9ae5cae3
commit
a3325fa94d
|
@ -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) {
|
||||
|
|
|
@ -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_());
|
||||
|
|
Loading…
Reference in New Issue