From 28819515a548ec25957603ae1fac0620c3eaa9a0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 26 Jan 2026 17:56:07 +0100 Subject: pkg/codesearch: support finding field reads/writes --- pkg/codesearch/testdata/source0.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkg/codesearch/testdata/source0.c') diff --git a/pkg/codesearch/testdata/source0.c b/pkg/codesearch/testdata/source0.c index e5b47841b..9482908c9 100644 --- a/pkg/codesearch/testdata/source0.c +++ b/pkg/codesearch/testdata/source0.c @@ -35,3 +35,12 @@ int func_accepting_a_struct(struct some_struct* p) void function_with_quotes_in_type(void __attribute__((btf_type_tag("user"))) *) { } + +int field_refs(struct some_struct* p, union some_union* u) +{ + p->x = p->y; + *(&p->x) = 1; + u->p = 0; + u->s.x = 2; + return p->x; +} -- cgit mrf-deployment