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

Predicate possiblyReturnsNonNil

Holds if ret is a data-flow node whose value contributes to the output res of fd, and that node may evaluate to a value other than nil.

Import path

import semmle.go.dataflow.internal.DataFlowUtil
predicate possiblyReturnsNonNil(FuncDecl fd, FunctionOutput res, Node ret)