mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
Cfg: Step directly from a failed case guard to the next case.
This commit is contained in:
@@ -1412,6 +1412,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
exists(int i |
|
||||
n1.isAfterValue(getRankedCaseCfgOrder(switch, i),
|
||||
any(MatchingSuccessor t | t.getValue() = false))
|
||||
or
|
||||
n1.isAfterFalse(getRankedCaseCfgOrder(switch, i).getGuard())
|
||||
|
|
||||
n2.isBefore(getRankedCaseCfgOrder(switch, i + 1))
|
||||
or
|
||||
@@ -1456,9 +1458,6 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
|
||||
or
|
||||
n1.isAfterTrue(case.getGuard()) and
|
||||
n2 = beforeBody
|
||||
or
|
||||
n1.isAfterFalse(case.getGuard()) and
|
||||
n2.isAfterValue(case, any(MatchingSuccessor t | t.getValue() = false))
|
||||
)
|
||||
)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user