File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
python/ql/lib/semmle/python/dataflow/new/internal Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -300,14 +300,6 @@ module LocalFlow {
300300 nodeTo .( CfgNode ) .getNode ( ) = def .getDefiningNode ( )
301301 )
302302 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
311303 // With definition
312304 // `with f(42) as x:`
313305 // 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> {
7272 class VariableWrite extends ControlFlowNode {
7373 CapturedVariable v ;
7474
75- VariableWrite ( ) { this = v .getAStore ( ) .getAFlowNode ( ) }
75+ VariableWrite ( ) { this = v .getAStore ( ) .getAFlowNode ( ) . ( DefinitionNode ) . getValue ( ) }
7676
7777 CapturedVariable getVariable ( ) { result = v }
7878
You can’t perform that action at this time.
0 commit comments