File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
python/ql/src/semmle/python/dataflow Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -79,24 +79,12 @@ abstract class PythonSsaSourceVariable extends SsaSourceVariable {
7979 }
8080
8181 override predicate hasRefinementEdge ( ControlFlowNode use , BasicBlock pred , BasicBlock succ ) {
82+ test_contains ( pred .getLastNode ( ) , use ) and
8283 use .( NameNode ) .uses ( this ) and
83- exists ( ControlFlowNode test |
84- test .getAChild * ( ) = use and
85- test .isBranch ( ) and
86- test = pred .getLastNode ( )
87- ) and
88- ( pred .getAFalseSuccessor ( ) = succ or pred .getATrueSuccessor ( ) = succ )
89- and
84+ ( pred .getAFalseSuccessor ( ) = succ or pred .getATrueSuccessor ( ) = succ ) and
9085 /* There is a store to this variable -- We don't want to refine builtins */
91- exists ( this .( Variable ) .getAStore ( ) ) and
92- /* There is at least one use or definition of the variable that is reachable by the test */
93- exists ( ControlFlowNode n |
94- n = this .getAUse ( ) or
95- this .hasDefiningNode ( n ) |
96- pred .( ConditionBlock ) .strictlyReaches ( n .getBasicBlock ( ) )
97- )
86+ exists ( this .( Variable ) .getAStore ( ) )
9887 }
99-
10088 override ControlFlowNode getASourceUse ( ) {
10189 result .( NameNode ) .uses ( this )
10290 or
You can’t perform that action at this time.
0 commit comments