Skip to content

Commit 607e281

Browse files
committed
Use not A and B instead of if A then none() else B
1 parent 9ac0c57 commit 607e281

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

go/ql/lib/semmle/go/controlflow/ControlFlowGraphImpl.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,10 +1305,10 @@ module CFG {
13051305
exists(Completion inner | lastNode(this.getBody(), last, inner) and not inner.isNormal() |
13061306
if inner = Break(this.getLabel())
13071307
then cmpl = Done()
1308-
else
1309-
if inner = Continue(this.getLabel())
1310-
then none()
1311-
else cmpl = inner
1308+
else (
1309+
not inner = Continue(this.getLabel()) and
1310+
cmpl = inner
1311+
)
13121312
)
13131313
}
13141314
}

0 commit comments

Comments
 (0)