Skip to content

Commit 449059f

Browse files
committed
C#: Disable FinallySplit, BooleanSplit, and LoopSplit
1 parent b52a9a8 commit 449059f

File tree

1 file changed

+5
-3
lines changed
  • csharp/ql/lib/semmle/code/csharp/controlflow/internal

1 file changed

+5
-3
lines changed

csharp/ql/lib/semmle/code/csharp/controlflow/internal/Splitting.qll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@ private module Cached {
4040
success in [false, true]
4141
} or
4242
TFinallySplit(FinallySplitting::FinallySplitType type, int nestLevel) {
43-
nestLevel = any(Statements::TryStmtTree t).nestLevel()
43+
nestLevel = any(Statements::TryStmtTree t).nestLevel() and
44+
none()
4445
} or
4546
TExceptionHandlerSplit(ExceptionClass ec) or
4647
TBooleanSplit(BooleanSplitting::BooleanSplitSubKind kind, boolean branch) {
4748
kind.startsSplit(_) and
48-
branch in [false, true]
49+
branch in [false, true] and
50+
none()
4951
} or
50-
TLoopSplit(LoopSplitting::AnalyzableLoopStmt loop)
52+
TLoopSplit(LoopSplitting::AnalyzableLoopStmt loop) { none() }
5153
}
5254

5355
import Cached

0 commit comments

Comments
 (0)