Skip to content

Commit 8408e90

Browse files
committed
C#: Change note & docs.
1 parent fdc8abc commit 8408e90

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

change-notes/1.23/analysis-csharp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ The following changes in version 1.23 affect C# analysis in all applications.
3737
disabled by default and can be enabled for individual configurations by
3838
overriding `int explorationLimit()`.
3939
* `foreach` statements where the body is guaranteed to be executed at least once, such as `foreach (var x in new string[]{ "a", "b", "c" }) { ... }`, are now recognized by all analyses based on the control flow graph (such as SSA, data flow and taint tracking).
40+
* Fixed the control flow graph for `switch` statements where the `default` case was not the last case. This had caused the remaining cases to be unreachable. `SwitchStmt.getCase(int i)` now puts the `default` case last.
4041

4142
## Changes to autobuilder

csharp/ql/src/semmle/code/csharp/Stmt.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ class SwitchStmt extends SelectionStmt, Switch, @switch_stmt {
165165
* return 3;
166166
* }
167167
* ```
168+
* Note that this reorders the `default` case to always be at the end.
168169
*/
169170
override CaseStmt getCase(int i) { result = SwithStmtInternal::getCase(this, i) }
170171

0 commit comments

Comments
 (0)