mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: remove pointless predicate
This commit is contained in:
@@ -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()) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user