Thanks to visit codestin.com
Credit goes to github.com

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

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)