sqlrowsutil

package
v0.0.0-...-5091a59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Called

func Called(instr ssa.Instruction, recv ssa.Value, f *types.Func) bool

Called returns true when f is called in the instr. If recv is not nil, Called also checks the receiver.

func CalledFrom

func CalledFrom(b *ssa.BasicBlock, i int, receiver types.Type, methods ...*types.Func) (called, ok bool)

CalledFrom checks whether receiver's method is called in an instruction which belongs to after i-th instructions, or in successor blocks of b. The first result is above value. The second result is whether type of i-th instruction does not much receiver or matches with ignore cases.

Types

type CalledChecker

type CalledChecker struct {
	Ignore func(instr ssa.Instruction) bool
}

CalledChecker checks a function is called. See From and Func.

func (*CalledChecker) From

func (c *CalledChecker) From(b *ssa.BasicBlock, i int, receiver types.Type, methods ...*types.Func) (called, ok bool)

From checks whether receiver's method is called in an instruction which belongs to after i-th instructions, or in successor blocks of b. The first result is above value. The second result is whether type of i-th instruction does not much receiver or matches with ignore cases.

func (*CalledChecker) Func

func (c *CalledChecker) Func(instr ssa.Instruction, recv ssa.Value, f *types.Func) bool

Func returns true when f is called in the instr. If recv is not nil, Called also checks the receiver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL