Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `RULE-7-0-4` - `InappropriateBitwiseOrShiftOperands.ql`:
- Improved evaluation performance of the `isValidShiftConstantRange` predicate by adding `bindingset[right, leftType]` and `pragma[inline_late]` annotations to guide the CodeQL optimizer.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ predicate isConstantExpression(Expr e) {
e.isConstant()
}

bindingset[right, leftType]
pragma[inline_late]
Comment thread
mbaluda marked this conversation as resolved.
predicate isValidShiftConstantRange(Expr right, Type leftType) {
Comment thread
mbaluda marked this conversation as resolved.
exists(int value |
value = right.getValue().toInt() and
Expand Down
Loading