File tree Expand file tree Collapse file tree
python/ql/src/Expressions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ where
1818 // Only relevant for Python 2, as all later versions implement true division
1919 major_version ( ) = 2
2020 and
21- exists ( BinaryExprNode bin , Value lobj , Value robj |
21+ exists ( BinaryExprNode bin , Value lval , Value rval |
2222 bin = div .getAFlowNode ( )
2323 and bin .getNode ( ) .getOp ( ) instanceof Div
24- and bin .getLeft ( ) .pointsTo ( lobj , left )
25- and lobj .getClass ( ) = ClassValue:: int_ ( )
26- and bin .getRight ( ) .pointsTo ( robj , right )
27- and robj .getClass ( ) = ClassValue:: int_ ( )
24+ and bin .getLeft ( ) .pointsTo ( lval , left )
25+ and lval .getClass ( ) = ClassValue:: int_ ( )
26+ and bin .getRight ( ) .pointsTo ( rval , right )
27+ and rval .getClass ( ) = ClassValue:: int_ ( )
2828 // Ignore instances where integer division leaves no remainder
29- and not lobj .( NumericValue ) .intValue ( ) % robj .( NumericValue ) .intValue ( ) = 0
29+ and not lval .( NumericValue ) .intValue ( ) % rval .( NumericValue ) .intValue ( ) = 0
3030 and not bin .getNode ( ) .getEnclosingModule ( ) .hasFromFuture ( "division" )
3131 // Filter out results wrapped in `int(...)`
3232 and not exists ( CallNode c , ClassValue cls |
You can’t perform that action at this time.
0 commit comments