Skip to content

Commit cb79b48

Browse files
committed
Shared: Support empty try-body in CFG.
1 parent 6b9336c commit cb79b48

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

shared/controlflow/codeql/controlflow/ControlFlowGraph.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,10 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
17371737
not exists(trystmt.getFinally()) and beforeFinally.isAfter(trystmt)
17381738
)
17391739
|
1740+
not exists(trystmt.getBody(_)) and
1741+
n1.isBefore(trystmt) and
1742+
n2 = beforeElse
1743+
or
17401744
exists(int i |
17411745
n1.isAfter(trystmt.getBody(i)) and
17421746
not exists(trystmt.getBody(i + 1)) and

0 commit comments

Comments
 (0)