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

Predicate Public::mutableType

Holds if tp is a type that may (directly or indirectly) reference a memory location.

If a value with a mutable type is passed to a function, the function could potentially mutate it or something it points to.

Import path

import semmle.go.dataflow.internal.DataFlowNodes
predicate mutableType(Type tp)