diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-02-18 13:49:48 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-02-19 21:48:20 +0100 |
| commit | 85d1218f4108e0fe793f63e57e2edadd5da5764f (patch) | |
| tree | 2b8cbd8c476cd0f21d1add6bc74d0ca5bb9dec46 /prog/hints_test.go | |
| parent | 2be2288ee256f3b84a7de15b82894097a08fd939 (diff) | |
prog: rework foreachArg
Make Foreach* callback accept the arg and a context struct
that can contain lots of aux info.
This (1) removes lots of unuser base/parent args,
(2) provides foundation for stopping recursion,
(3) allows to merge foreachSubargOffset.
Diffstat (limited to 'prog/hints_test.go')
| -rw-r--r-- | prog/hints_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/hints_test.go b/prog/hints_test.go index 80a9042dd..9a87d3014 100644 --- a/prog/hints_test.go +++ b/prog/hints_test.go @@ -364,8 +364,8 @@ func TestHintsRandom(t *testing.T) { func extractValues(c *Call) map[uint64]bool { vals := make(map[uint64]bool) - foreachArg(c, func(arg, _ Arg, _ *[]Arg) { - if arg.Type().Dir() == DirOut { + ForeachArg(c, func(arg Arg, _ *ArgCtx) { + if typ := arg.Type(); typ == nil || typ.Dir() == DirOut { return } switch a := arg.(type) { |
