Skip to content

Commit

Permalink
Always specialize function call node
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 10, 2024
1 parent 89af83a commit ed4247f
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions src/analyzer/expr/call/function_call_return_type_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,27 +768,19 @@ fn add_dataflow(

// todo conditionally remove taints

let function_call_node = if let GraphKind::WholeProgram(_) = &data_flow_graph.kind {
DataFlowNode::get_for_method_return(
functionlike_id,
if let Some(return_pos) = &functionlike_storage.return_type_location {
Some(*return_pos)
} else {
functionlike_storage.name_location
},
if functionlike_storage.specialize_call {
Some(statements_analyzer.get_hpos(pos))
} else {
None
},
)
} else {
DataFlowNode::get_for_method_return(
functionlike_id,
Some(statements_analyzer.get_hpos(pos)),
Some(statements_analyzer.get_hpos(pos)),
)
};
let function_call_node = DataFlowNode::get_for_method_return(
functionlike_id,
if let Some(return_pos) = &functionlike_storage.return_type_location {
Some(*return_pos)
} else {
functionlike_storage.name_location
},
if functionlike_storage.specialize_call {
Some(statements_analyzer.get_hpos(pos))
} else {
None
},
);

data_flow_graph.add_node(function_call_node.clone());

Expand Down

0 comments on commit ed4247f

Please sign in to comment.