@@ -20,7 +20,7 @@ private int numStmts(ForEachStmt fes) {
2020 else result = 1
2121}
2222
23- private predicate returnsLoopVariable ( ForeachStmt fes , Stmt s ) {
23+ private predicate returnsLoopVariable ( ForEachStmt fes , Stmt s ) {
2424 exists ( ReturnStmt ret |
2525 ret = s .stripSingletonBlocks ( ) and
2626 ret .getExpr ( ) .stripImplicit ( ) .( VariableAccess ) .getTarget ( ) = fes .getVariable ( )
@@ -29,7 +29,7 @@ private predicate returnsLoopVariable(ForeachStmt fes, Stmt s) {
2929
3030private predicate hasNullDefault ( Type t ) { t .isRefType ( ) or t instanceof NullableType }
3131
32- private predicate returnsDefaultValueAfterForeach ( ForeachStmt fes ) {
32+ private predicate returnsDefaultValueAfterForeach ( ForEachStmt fes ) {
3333 exists ( BlockStmt enclosingBlock , int i , Type elementType , ReturnStmt ret |
3434 enclosingBlock .getStmt ( i ) = fes and
3535 enclosingBlock .getStmt ( i + 1 ) = ret and
@@ -218,7 +218,7 @@ predicate missedWhereOpportunity(ForEachStmtGenericEnumerable fes, IfStmt is) {
218218 * That is, the loop contains a single `if` statement that accesses the loop variable,
219219 * returns the loop variable when the condition matches, and is followed by a default return.
220220 */
221- predicate missedFirstOrDefaultOpportunity ( ForeachStmtGenericEnumerable fes , IfStmt is ) {
221+ predicate missedFirstOrDefaultOpportunity ( ForEachStmtGenericEnumerable fes , IfStmt is ) {
222222 // The loop only checks whether the current element is the first match.
223223 is = firstStmt ( fes ) and
224224 not exists ( is .getElse ( ) ) and
0 commit comments