Skip to content

Commit 955344e

Browse files
committed
C++: Inline a predicate that contains CPs
The `overflows` predicate had quite severe Cartesian products. We didn't see them in practice because magic saved us, but we can't rely on magic in the future, so it seems better to inline this predicate. Tuple counts and speed look good both before and after.
1 parent e2b1f6a commit 955344e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class VarAnalyzableExpr extends AnalyzableExpr, VariableAccess {
166166
* Holds if `t` is not an instance of `IntegralType`,
167167
* or if `me` cannot be proven to not overflow
168168
*/
169+
pragma[inline]
169170
predicate overflows(MulExpr me, Type t) {
170171
t instanceof IntegralType
171172
implies

0 commit comments

Comments
 (0)