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

Member predicate Expr::isPlatformIndependentConstant

Holds if this expression has a constant value which is guaranteed not to depend on the platform where it is evaluated.

This is a conservative approximation, that is, the predicate may fail to hold for expressions whose value is platform independent, but it will never hold for expressions whose value is not platform independent.

Examples of platform-dependent constants include constants declared in files with build constraints, the value of runtime.GOOS, and the return value of unsafe.Sizeof.

predicate isPlatformIndependentConstant()