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

Predicate CFG::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.ControlFlowGraphImpl
predicate isSwitchCaseTestPassingEdge(Node pred, Node succ, Expr switchExpr, Expr testExpr)