File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed
src/semmle/code/cpp/exprs Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -1017,11 +1017,6 @@ class FoldExpr extends Expr, @foldexpr {
10171017 this .isBinaryFold ( ) and
10181018 if this .isRightFold ( ) then result = getChild ( 1 ) else result = getChild ( 0 )
10191019 }
1020-
1021- /**
1022- * Holds if this is a binary fold with a child expression representing the initial value.
1023- */
1024- predicate hasInitExpr ( ) { exists ( this .getInitExpr ( ) ) }
10251020}
10261021
10271022/**
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ import cpp
33from FoldExpr fe , Expr pack , string init
44where
55 pack = fe .getPackExpr ( ) and
6- if fe .hasInitExpr ( ) then init = fe .getInitExpr ( ) .toString ( ) else init = "<no init>"
6+ if exists ( fe .getInitExpr ( ) ) then init = fe .getInitExpr ( ) .toString ( ) else init = "<no init>"
77select fe , fe .getOperatorString ( ) , pack , init
You can’t perform that action at this time.
0 commit comments