File tree 2 files changed +1
-9
lines changed
python/ql/lib/semmle/python/dataflow/new/internal
2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -300,14 +300,6 @@ module LocalFlow {
300
300
nodeTo .( CfgNode ) .getNode ( ) = def .getDefiningNode ( )
301
301
)
302
302
or
303
- // Assignment to captured variables
304
- // These are not covered by the `AssignmentDefinition`s in the case above,
305
- // as they are not necessarily live.
306
- nodeFrom .( CfgNode ) .getNode ( ) = nodeTo .( CfgNode ) .getNode ( ) .( DefinitionNode ) .getValue ( ) and
307
- nodeTo .asExpr ( ) = any ( VariableCapture:: CapturedVariable c ) .getAStore ( ) and
308
- // Exclude assignments to parameters. These are from default values and not local.
309
- not nodeTo instanceof ParameterNode
310
- or
311
303
// With definition
312
304
// `with f(42) as x:`
313
305
// nodeFrom is `f(42)`
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ private module CaptureInput implements Shared::InputSig<Location> {
72
72
class VariableWrite extends ControlFlowNode {
73
73
CapturedVariable v ;
74
74
75
- VariableWrite ( ) { this = v .getAStore ( ) .getAFlowNode ( ) }
75
+ VariableWrite ( ) { this = v .getAStore ( ) .getAFlowNode ( ) . ( DefinitionNode ) . getValue ( ) }
76
76
77
77
CapturedVariable getVariable ( ) { result = v }
78
78
You can’t perform that action at this time.
0 commit comments