diff --git a/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll b/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll index c9ddf4cf8478..313feb1a145d 100644 --- a/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll +++ b/unified/ql/lib/codeql/unified/internal/ControlFlowGraph.qll @@ -132,11 +132,7 @@ module Ast implements AstSig { class ContinueStmt = U::ContinueExpr; - class LabeledStmt extends Stmt { - LabeledStmt() { none() } - - Stmt getStmt() { none() } - } + class LabeledStmt = U::LabeledStmt; class GotoStmt extends Stmt { GotoStmt() { none() } @@ -253,15 +249,8 @@ private module Input implements InputSig1, InputSig2 { string toString() { result = this } } - private Label getLabelOfStmt(Stmt s) { - exists(LabeledStmt l | s = l.getStmt() | - result = l.getLabelName() or - result = getLabelOfStmt(l) - ) - } - predicate hasLabel(Ast::AstNode n, Label l) { - l = getLabelOfStmt(n) + l = n.(LabeledStmt).getLabelName() or l = n.(BreakExpr).getLabelName() or