@@ -48,28 +48,28 @@ class UnicodeCompatibilityNormalize extends API::CallNode {
48
48
49
49
predicate underAValue ( DataFlow:: GuardNode g , ControlFlowNode node , boolean branch ) {
50
50
exists ( CompareNode cn | cn = g |
51
- exists ( API:: CallNode lenCall , Cmpop op_gt , Cmpop op_lt , Node n |
51
+ exists ( API:: CallNode lenCall , Cmpop op , Node n |
52
52
lenCall = n .getALocalSource ( ) and
53
53
(
54
54
// arg <= LIMIT OR arg < LIMIT
55
- ( op_lt = any ( LtE lte ) or op_lt = any ( Lt lt ) ) and
55
+ ( op instanceof LtE or op instanceof Lt ) and
56
56
branch = true and
57
- cn .operands ( n .asCfgNode ( ) , op_lt , _)
57
+ cn .operands ( n .asCfgNode ( ) , op , _)
58
58
or
59
59
// LIMIT >= arg OR LIMIT > arg
60
- ( op_gt = any ( GtE gte ) or op_gt = any ( Gt gt ) ) and
60
+ ( op instanceof GtE or op instanceof Gt ) and
61
61
branch = true and
62
- cn .operands ( _, op_gt , n .asCfgNode ( ) )
62
+ cn .operands ( _, op , n .asCfgNode ( ) )
63
63
or
64
64
// not arg >= LIMIT OR not arg > LIMIT
65
- ( op_gt = any ( GtE gte ) or op_gt = any ( Gt gt ) ) and
65
+ ( op instanceof GtE or op instanceof Gt ) and
66
66
branch = false and
67
- cn .operands ( n .asCfgNode ( ) , op_gt , _)
67
+ cn .operands ( n .asCfgNode ( ) , op , _)
68
68
or
69
69
// not LIMIT <= arg OR not LIMIT < arg
70
- ( op_lt = any ( LtE lte ) or op_lt = any ( Lt lt ) ) and
70
+ ( op instanceof LtE or op instanceof Lt ) and
71
71
branch = false and
72
- cn .operands ( _, op_lt , n .asCfgNode ( ) )
72
+ cn .operands ( _, op , n .asCfgNode ( ) )
73
73
)
74
74
|
75
75
lenCall = API:: builtin ( "len" ) .getACall ( ) and
0 commit comments