MCPcopy
hub / github.com/google/mangle / Find

Method Find

analysis/varlist.go:55–62  ·  view source on GitHub ↗

Find returns the index of the given variable, or -1 if not found.

(v ast.Variable)

Source from the content-addressed store, hash-verified

53
54// Find returns the index of the given variable, or -1 if not found.
55func (vs VarList) Find(v ast.Variable) int {
56 for i, u := range vs.Vars {
57 if u.Symbol == v.Symbol {
58 return i
59 }
60 }
61 return -1
62}

Callers 6

RewriteClauseFunction · 0.95
TestVarListFunction · 0.95
ContainsMethod · 0.95
addOrRefineMethod · 0.80
refineNegativeMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestVarListFunction · 0.76