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

Predicate IR::evalExprInstruction

Gets the (final) instruction computing the value of e.

Note that some expressions (such as type expressions or labels) have no corresponding instruction, so this predicate is undefined for them.

Short-circuiting expressions that are purely used for control flow (meaning that their value is not stored in a variable or used to compute the value of a non-shortcircuiting expression) do not have a final instruction either.

Import path

import semmle.go.controlflow.IR
Instruction evalExprInstruction(Expr e)