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

Predicate signature guardChecksSig

Holds if the guard g validates the expression e upon evaluating to branch.

The expression e is expected to be a syntactic part of the guard g. For example, the guard g might be a call isSafe(x) and the expression e the argument x.

Import path

import semmle.go.dataflow.internal.DataFlowUtil
signature predicate guardChecksSig(Node g, Expr e, boolean branch)