Skip to content

Commit

Permalink
Specialize variable use node
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 10, 2024
1 parent ed4247f commit b41f636
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/analyzer/expr/call/argument_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,14 @@ fn add_dataflow(

let argument_value_node =
if data_flow_graph.kind == GraphKind::FunctionBody && context.inside_general_use {
let hpos = statements_analyzer.get_hpos(input_expr.pos());
DataFlowNode {
id: DataFlowNodeId::CallTo(*functionlike_id),
kind: DataFlowNodeKind::VariableUseSink {
pos: statements_analyzer.get_hpos(input_expr.pos()),
},
id: DataFlowNodeId::SpecializedCallTo(
*functionlike_id,
hpos.file_path,
hpos.start_offset,
),
kind: DataFlowNodeKind::VariableUseSink { pos: hpos },
}
} else {
DataFlowNode::get_for_call(
Expand Down

0 comments on commit b41f636

Please sign in to comment.