aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/codesearch/testdata/source0.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/codesearch/testdata/source0.c')
-rw-r--r--pkg/codesearch/testdata/source0.c9
1 files changed, 9 insertions, 0 deletions
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;
+}