File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
csharp/ql/src/semmle/code/csharp/controlflow Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -2059,16 +2059,15 @@ module ControlFlow {
20592059 result = first ( cc .getExpr ( ) ) and
20602060 c instanceof SimpleCompletion
20612061 or
2062- // Flow from last element of case expression to first element of statement
2063- not exists ( cc .getCondition ( ) ) and
20642062 cfe = lastConstCaseExpr ( cc , c ) and
2065- c .( MatchingCompletion ) .isMatch ( ) and
2066- result = first ( cc .getStmt ( ) )
2067- or
2068- // Flow from the last element of case expression to the condition
2069- cfe = lastConstCaseExpr ( cc , c ) and
2070- c .( MatchingCompletion ) .isMatch ( ) and
2071- result = first ( cc .getCondition ( ) )
2063+ c .( MatchingCompletion ) .isMatch ( ) and (
2064+ if exists ( cc .getCondition ( ) ) then
2065+ // Flow from the last element of case expression to the condition
2066+ result = first ( cc .getCondition ( ) )
2067+ else
2068+ // Flow from last element of case expression to first element of statement
2069+ result = first ( cc .getStmt ( ) )
2070+ )
20722071 or
20732072 // Flow from last element of case condition to first element of statement
20742073 cfe = lastCaseCondition ( cc , c ) and
You can’t perform that action at this time.
0 commit comments