Skip to content

Commit 9478c75

Browse files
committed
Python: Use more general definitions
This is a wip commit to see the effect
1 parent 27be5ba commit 9478c75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ module LocalFlow {
299299
nodeTo.(CfgNode).getNode() = def.getDefiningNode()
300300
)
301301
or
302+
// General definition
303+
// TODO: remove other cases that are now redundant
304+
nodeFrom.(CfgNode).getNode() = nodeTo.(CfgNode).getNode().(DefinitionNode).getValue()
305+
or
302306
// With definition
303307
// `with f(42) as x:`
304308
// nodeFrom is `f(42)`

0 commit comments

Comments
 (0)