File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,21 +21,23 @@ private int numStmts(ForeachStmt fes) {
2121}
2222
2323private predicate terminatesCallable ( Stmt s ) {
24- s .stripSingletonBlocks ( ) instanceof ReturnStmt
25- or
26- s .stripSingletonBlocks ( ) instanceof YieldBreakStmt
27- or
28- s .stripSingletonBlocks ( ) instanceof ThrowStmt
29- or
30- s .stripSingletonBlocks ( ) instanceof BreakStmt
31- or
32- exists ( BlockStmt b | b = s .stripSingletonBlocks ( ) | terminatesCallable ( b .getLastStmt ( ) ) )
33- or
34- exists ( IfStmt nested |
35- nested = s .stripSingletonBlocks ( ) and
36- exists ( nested .getElse ( ) ) and
37- terminatesCallable ( nested .getThen ( ) ) and
38- terminatesCallable ( nested .getElse ( ) )
24+ exists ( Stmt stripped | stripped = s .stripSingletonBlocks ( ) |
25+ stripped instanceof ReturnStmt
26+ or
27+ stripped instanceof YieldBreakStmt
28+ or
29+ stripped instanceof ThrowStmt
30+ or
31+ stripped instanceof BreakStmt
32+ or
33+ stripped = any ( BlockStmt b | terminatesCallable ( b .getLastStmt ( ) ) )
34+ or
35+ stripped =
36+ any ( IfStmt nested |
37+ exists ( nested .getElse ( ) ) and
38+ terminatesCallable ( nested .getThen ( ) ) and
39+ terminatesCallable ( nested .getElse ( ) )
40+ )
3941 )
4042}
4143
You can’t perform that action at this time.
0 commit comments