sqlrows: github.com/gostaticanalysis/sqlrows/sqlrowsutil Index | Files

package sqlrowsutil

import "github.com/gostaticanalysis/sqlrows/sqlrowsutil"

Index

Package Files

util.go

func Called Uses

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 Uses

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 belogns to after i-th instructions, or in succsor 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.

type CalledChecker Uses

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

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

func (*CalledChecker) From Uses

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 belogns to after i-th instructions, or in succsor 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 Uses

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.

Package sqlrowsutil imports 2 packages (graph) and is imported by 1 packages. Updated 2019-04-05. Refresh now. Tools for package owners.