File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
csharp/ql/src/semmle/code/csharp/controlflow Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1714,7 +1714,13 @@ module Internal {
17141714 exists ( TryStmt ts |
17151715 ts = last .getTryStmt ( ) and
17161716 exists ( lastTryStmtBlock ( ts , c ) ) and
1717- not ts .definitelyHandles ( c .getExceptionClass ( ) , _) and
1717+ not ts .getACatchClause ( ) instanceof GeneralCatchClause and
1718+ forall ( SpecificCatchClause scc |
1719+ scc = ts .getACatchClause ( ) |
1720+ scc .hasFilterClause ( )
1721+ or
1722+ not c .getExceptionClass ( ) .getABaseType * ( ) = scc .getCaughtExceptionType ( )
1723+ ) and
17181724 last .isLast ( )
17191725 )
17201726 }
@@ -2967,6 +2973,11 @@ module Internal {
29672973
29682974 /** Provides logic for calculating reachable control flow nodes. */
29692975 module Reachability {
2976+ /**
2977+ * Holds if `cfe` is a control flow element where the set of possible splits may
2978+ * be different from the set of possible splits for one of `cfe`'s predecessors.
2979+ * That is, `cfe` starts a new block of elements with the same set of splits.
2980+ */
29702981 private predicate startsSplits ( ControlFlowElement cfe ) {
29712982 cfe = succEntry ( _)
29722983 or
You can’t perform that action at this time.
0 commit comments