From b41f6362279bdbec9ac97e0da36b6b1d7af9d897 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Wed, 10 Apr 2024 11:13:12 -0400 Subject: [PATCH] Specialize variable use node --- src/analyzer/expr/call/argument_analyzer.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/analyzer/expr/call/argument_analyzer.rs b/src/analyzer/expr/call/argument_analyzer.rs index db0cfebb..fb5764f3 100644 --- a/src/analyzer/expr/call/argument_analyzer.rs +++ b/src/analyzer/expr/call/argument_analyzer.rs @@ -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(