mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
C#: Address review comments.
This commit is contained in:
@@ -225,7 +225,9 @@ private module SwithStmtInternal {
|
||||
/** Implicitly reorder case statements to put the default case last if needed. */
|
||||
private predicate caseIndex(SwitchStmt ss, CaseStmt case, int index) {
|
||||
exists(int i | case = ss.getChildStmt(i) |
|
||||
if case instanceof DefaultCase then index = 1000000 else index = i
|
||||
if case instanceof DefaultCase
|
||||
then index = max(int j | exists(ss.getChildStmt(j))) + 1
|
||||
else index = i
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -741,7 +741,6 @@ module ControlFlow {
|
||||
TLastRecBooleanNegationCompletion() or
|
||||
TLastRecNonBooleanCompletion() or
|
||||
TLastRecBreakCompletion() or
|
||||
TLastRecNonBreakCompletion() or
|
||||
TLastRecSwitchAbnormalCompletion() or
|
||||
TLastRecInvalidOperationException() or
|
||||
TLastRecNonContinueCompletion() or
|
||||
@@ -1150,10 +1149,6 @@ module ControlFlow {
|
||||
c0 instanceof BreakCompletion and
|
||||
c instanceof BreakNormalCompletion
|
||||
or
|
||||
rec = TLastRecNonBreakCompletion() and
|
||||
not c0 instanceof BreakCompletion and
|
||||
c = c0
|
||||
or
|
||||
rec = TLastRecSwitchAbnormalCompletion() and
|
||||
not c instanceof BreakCompletion and
|
||||
not c instanceof NormalCompletion and
|
||||
|
||||
Reference in New Issue
Block a user