Capture flow: Take overwrites in nested scopes into account

This commit is contained in:
Tom Hvitved
2024-02-07 14:06:08 +01:00
parent 0c43ad45b4
commit 1ea7717714
6 changed files with 28 additions and 4 deletions

View File

@@ -178,6 +178,10 @@ private predicate captureReadStep(Node node1, CapturedVariableContent c, Node no
CaptureFlow::readStep(asClosureNode(node1), c.getVariable(), asClosureNode(node2))
}
private predicate captureClearsContent(Node node, CapturedVariableContent c) {
CaptureFlow::clearsContent(asClosureNode(node), c.getVariable())
}
predicate captureValueStep(Node node1, Node node2) {
CaptureFlow::localFlowStep(asClosureNode(node1), asClosureNode(node2))
}
@@ -311,6 +315,8 @@ predicate clearsContent(Node n, ContentSet c) {
)
or
FlowSummaryImpl::Private::Steps::summaryClearsContent(n.(FlowSummaryNode).getSummaryNode(), c)
or
captureClearsContent(n, c)
}
/**