From 8e4581b34c9584a49bc595d65c48167b9ecbe34f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 21 Jan 2026 12:21:38 +0100 Subject: tools/clang/codesearch: index struct references Update #6469 --- pkg/codesearch/testdata/source0.c.json | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'pkg/codesearch/testdata/source0.c.json') diff --git a/pkg/codesearch/testdata/source0.c.json b/pkg/codesearch/testdata/source0.c.json index ba6b41751..1732d7c97 100644 --- a/pkg/codesearch/testdata/source0.c.json +++ b/pkg/codesearch/testdata/source0.c.json @@ -21,6 +21,43 @@ }, "comment": {} }, + { + "kind": "function", + "name": "func_accepting_a_struct", + "type": "int (struct some_struct *)", + "body": { + "file": "source0.c", + "start_line": 29, + "end_line": 33 + }, + "comment": {}, + "refs": [ + { + "kind": "uses", + "entity_kind": "struct", + "name": "some_struct", + "line": 29 + }, + { + "kind": "uses", + "entity_kind": "typedef", + "name": "some_struct_t", + "line": 31 + }, + { + "kind": "uses", + "entity_kind": "struct", + "name": "some_struct", + "line": 31 + }, + { + "kind": "uses", + "entity_kind": "union", + "name": "some_union", + "line": 32 + } + ] + }, { "kind": "function", "name": "func_in_header", -- cgit mrf-deployment