Skip to content

Commit f2a75c8

Browse files
yoffCopilot
andcommitted
Bind captured type-tracking jumps from their source
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 1cf7b0e commit f2a75c8

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackingImpl.qll‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,10 @@ module TypeTrackingInput implements Shared::TypeTrackingInput<Location> {
323323
//
324324
// nodeFrom is `expr`
325325
// nodeTo is entry node for `f`
326-
exists(
327-
SsaImpl::ScopeEntryDefinition e, SsaImpl::SsaSourceVariable var, Cfg::DefinitionNode def
328-
|
329-
e.getSourceVariable() = var and
330-
def.getNode() = var.getVariable().getAStore()
331-
|
326+
exists(SsaImpl::ScopeEntryDefinition e, SsaImpl::SsaSourceVariable var |
332327
nodeTo.(DataFlowPublic::ScopeEntryDefinitionNode).getDefinition() = e and
333-
nodeFrom.asCfgNode() = def and
328+
e.getSourceVariable() = var and
329+
nodeFrom.asCfgNode().(Cfg::DefinitionNode).getNode() = var.getVariable().getAStore() and
334330
var.getVariable().getScope().getScope*() = nodeFrom.getScope()
335331
)
336332
}

0 commit comments

Comments
 (0)