Skip to content

Commit

Permalink
Fix modifyAllMatching visitor helper (#5020)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimír Štill <vladimir.still@intel.com>
  • Loading branch information
vlstill authored Nov 19, 2024
1 parent 929c928 commit 9bef7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir/visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ const RootType *modifyAllMatching(const RootType *root, Func &&function) {
Func function;
void postorder(NodeType *node) override { function(node); }
};
return root->apply(NodeVisitor(std::forward<Func>(function)));
return root->apply(NodeVisitor(std::forward<Func>(function)))->template checkedTo<RootType>();
}

/**
Expand Down

0 comments on commit 9bef7ee

Please sign in to comment.