CodeQL library for Go
codeql/go-all 1.1.2-dev (changelog, source)
Search

Predicate ControlFlow::isSwitchCaseTestPassingEdge

Holds if pred is the node for the case testExpr in an expression switch statement which is switching on switchExpr, and succ is the node to be executed next if the case test succeeds.

Import path

import semmle.go.controlflow.ControlFlowGraph
predicate isSwitchCaseTestPassingEdge(Node pred, Node succ, Expr switchExpr, Expr testExpr)