From 8fc377978dcf81013752b91c15eb8d573fca560f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 21 Jan 2026 09:59:13 +0100 Subject: pkg/codesearch: do indexing of struct/union/enum Update #6469 --- pkg/codesearch/testdata/source0.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'pkg/codesearch/testdata/source0.h') diff --git a/pkg/codesearch/testdata/source0.h b/pkg/codesearch/testdata/source0.h index d1540ebce..9549feb9d 100644 --- a/pkg/codesearch/testdata/source0.h +++ b/pkg/codesearch/testdata/source0.h @@ -13,3 +13,38 @@ static inline int func_in_header() { return 0; } + +struct some_struct { + int x; + int y; +}; + +typedef struct some_struct some_struct_t; + +/* + * This should not require an explanation. + */ +struct some_struct_with_a_comment { + int x; + struct some_struct* other_struct; +}; + +typedef struct { + int x; +} typedefed_struct_t; + +typedef struct another_struct { + int x; +} another_struct_t; + +union some_union { + int x; + void* p; +}; + +enum some_enum { + enum_foo = 1, + enum_bar = 2, +}; + +typedef enum some_enum some_enum_t; -- cgit mrf-deployment