mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C#: Add missing CFG edge from generic catch block to finally block
This commit is contained in:
@@ -1710,9 +1710,9 @@ module ControlFlow {
|
||||
exists(getAThrownException(ts, cfe, c)) and
|
||||
result = first(ts.getCatchClause(0))
|
||||
or
|
||||
exists(SpecificCatchClause scc, int i | scc = ts.getCatchClause(i) |
|
||||
cfe = scc and
|
||||
scc = last(ts.getCatchClause(i), c) and
|
||||
exists(CatchClause cc, int i | cc = ts.getCatchClause(i) |
|
||||
cfe = cc and
|
||||
cc = last(ts.getCatchClause(i), c) and
|
||||
(
|
||||
// Flow from one `catch` clause to the next
|
||||
result = first(ts.getCatchClause(i + 1)) and
|
||||
@@ -1725,7 +1725,7 @@ module ControlFlow {
|
||||
)
|
||||
or
|
||||
cfe = last(ts.getCatchClause(i), c) and
|
||||
cfe = last(scc.getFilterClause(), _) and
|
||||
cfe = last(cc.getFilterClause(), _) and
|
||||
(
|
||||
// Flow from last element of `catch` clause filter to next `catch` clause
|
||||
result = first(ts.getCatchClause(i + 1)) and
|
||||
@@ -1739,7 +1739,7 @@ module ControlFlow {
|
||||
)
|
||||
or
|
||||
// Flow from last element of a `catch` block to first element of `finally` block
|
||||
cfe = lastCatchClauseBlock(scc, c) and
|
||||
cfe = lastCatchClauseBlock(cc, c) and
|
||||
result = first(ts.getFinally())
|
||||
)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user