Skip to main content

build_call_tree

Function build_call_tree 

Source
fn build_call_tree(
    cpg: &CodePropertyGraph,
    node_idx: NodeIndex,
    max_depth: usize,
    reverse: bool,
    visited: &mut HashSet<NodeIndex>,
) -> TreeNode
Expand description

Recursively build a call tree from node_idx.

Traverses outgoing [Edge::Call] edges (or incoming when reverse is true). A visited set prevents infinite recursion on cycles.