C++: remove pointless predicate

This commit is contained in:
Nick Rolfe
2019-05-01 10:20:36 +01:00
parent 8da2f0b8dc
commit 50c901d6d9
2 changed files with 1 additions and 6 deletions

View File

@@ -1017,11 +1017,6 @@ class FoldExpr extends Expr, @foldexpr {
this.isBinaryFold() and
if this.isRightFold() then result = getChild(1) else result = getChild(0)
}
/**
* Holds if this is a binary fold with a child expression representing the initial value.
*/
predicate hasInitExpr() { exists(this.getInitExpr()) }
}
/**

View File

@@ -3,5 +3,5 @@ import cpp
from FoldExpr fe, Expr pack, string init
where
pack = fe.getPackExpr() and
if fe.hasInitExpr() then init = fe.getInitExpr().toString() else init = "<no init>"
if exists(fe.getInitExpr()) then init = fe.getInitExpr().toString() else init = "<no init>"
select fe, fe.getOperatorString(), pack, init