Skip to content

Commit

Permalink
Use local positions for function calls in variable-tracking mode
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 15, 2024
1 parent eec536d commit 3d81aa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/analyzer/expr/call/function_call_return_type_fetcher.rs
Expand Up @@ -770,7 +770,9 @@ fn add_dataflow(

let function_call_node = DataFlowNode::get_for_method_return(
functionlike_id,
if let Some(return_pos) = &functionlike_storage.return_type_location {
if data_flow_graph.kind == GraphKind::FunctionBody {
Some(statements_analyzer.get_hpos(pos))
} else if let Some(return_pos) = &functionlike_storage.return_type_location {
Some(*return_pos)
} else {
functionlike_storage.name_location
Expand Down

0 comments on commit 3d81aa9

Please sign in to comment.