Skip to content

Commit d9ea78b

Browse files
committed
Cfg: Step directly from a failed case guard to the next case.
1 parent f02abb3 commit d9ea78b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

shared/controlflow/codeql/controlflow/ControlFlowGraph.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
14121412
exists(int i |
14131413
n1.isAfterValue(getRankedCaseCfgOrder(switch, i),
14141414
any(MatchingSuccessor t | t.getValue() = false))
1415+
or
1416+
n1.isAfterFalse(getRankedCaseCfgOrder(switch, i).getGuard())
14151417
|
14161418
n2.isBefore(getRankedCaseCfgOrder(switch, i + 1))
14171419
or
@@ -1456,9 +1458,6 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
14561458
or
14571459
n1.isAfterTrue(case.getGuard()) and
14581460
n2 = beforeBody
1459-
or
1460-
n1.isAfterFalse(case.getGuard()) and
1461-
n2.isAfterValue(case, any(MatchingSuccessor t | t.getValue() = false))
14621461
)
14631462
)
14641463
or

0 commit comments

Comments
 (0)