Walk expression tree and collect names of functions used in CallTypedExpr into provided 'names' set.
| 593 | /// Walk expression tree and collect names of functions used in CallTypedExpr |
| 594 | /// into provided 'names' set. |
| 595 | void collectCallNames( |
| 596 | const TypedExprPtr& expr, |
| 597 | std::unordered_set<std::string>& names) { |
| 598 | if (auto call = std::dynamic_pointer_cast<const core::CallTypedExpr>(expr)) { |
| 599 | names.insert(call->name()); |
| 600 | } |
| 601 | |
| 602 | for (const auto& input : expr->inputs()) { |
| 603 | collectCallNames(input, names); |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | /// Walk expression trees and collection function calls that support flattening. |
| 608 | std::unordered_set<std::string> collectFlatteningCandidates( |
no test coverage detected