Skip to content

Commit d383b86

Browse files
paldepindCopilot
andcommitted
C#: Use shared default-case handling for C#
Keep only language-specific switch-arm match-all logic, since the shared control-flow graph now handles default cases directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4a9b52f8-d07b-4692-8fb9-409f0efd64f2
1 parent f45376c commit d383b86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎csharp/ql/lib/semmle/code/csharp/controlflow/ControlFlowGraph.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private module Input implements InputSig1, InputSig2 {
135135

136136
predicate catchAll(Ast::CatchClause catch) { catch instanceof GeneralCatchClause }
137137

138-
predicate matchAll(Ast::Case c) { c instanceof DefaultCase or c.(SwitchCaseExpr).matchesAll() }
138+
predicate matchAll(Ast::Case c) { c.(SwitchCaseExpr).matchesAll() }
139139

140140
private newtype TLabel =
141141
TLblGoto(string label) { any(GotoLabelStmt goto).getLabel() = label } or

0 commit comments

Comments
 (0)