diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-21 09:59:13 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-21 13:38:45 +0000 |
| commit | 8fc377978dcf81013752b91c15eb8d573fca560f (patch) | |
| tree | c1cf2241556888c759e0d2ab8641caee53a35e0d /pkg/codesearch/testdata/source0.c.json | |
| parent | 6b862b615943965909f5b1b611786b5ba2d2819e (diff) | |
pkg/codesearch: do indexing of struct/union/enum
Update #6469
Diffstat (limited to 'pkg/codesearch/testdata/source0.c.json')
| -rw-r--r-- | pkg/codesearch/testdata/source0.c.json | 122 |
1 files changed, 113 insertions, 9 deletions
diff --git a/pkg/codesearch/testdata/source0.c.json b/pkg/codesearch/testdata/source0.c.json index cb80dc021..ba6b41751 100644 --- a/pkg/codesearch/testdata/source0.c.json +++ b/pkg/codesearch/testdata/source0.c.json @@ -1,13 +1,23 @@ { "definitions": [ { + "kind": "enum", + "name": "some_enum", + "body": { + "file": "source0.h", + "start_line": 45, + "end_line": 48 + }, + "comment": {} + }, + { "kind": "function", "name": "close", "type": "int ()", "body": { "file": "source0.c", - "start_line": 14, - "end_line": 17 + "start_line": 19, + "end_line": 22 }, "comment": {} }, @@ -29,8 +39,8 @@ "type": "void ()", "body": { "file": "source0.c", - "start_line": 19, - "end_line": 22 + "start_line": 24, + "end_line": 27 }, "comment": {}, "refs": [ @@ -38,7 +48,7 @@ "kind": "calls", "entity_kind": "function", "name": "same_name_in_several_files", - "line": 21 + "line": 26 } ] }, @@ -48,14 +58,108 @@ "type": "int ()", "body": { "file": "source0.c", - "start_line": 6, - "end_line": 12 + "start_line": 11, + "end_line": 17 }, "comment": { "file": "source0.c", - "start_line": 6, - "end_line": 8 + "start_line": 11, + "end_line": 13 + } + }, + { + "kind": "struct", + "name": "another_struct", + "body": { + "file": "source0.h", + "start_line": 36, + "end_line": 38 + }, + "comment": {} + }, + { + "kind": "struct", + "name": "some_struct", + "body": { + "file": "source0.h", + "start_line": 17, + "end_line": 20 + }, + "comment": {} + }, + { + "kind": "struct", + "name": "some_struct_with_a_comment", + "body": { + "file": "source0.h", + "start_line": 24, + "end_line": 30 + }, + "comment": { + "file": "source0.h", + "start_line": 24, + "end_line": 26 } + }, + { + "kind": "struct", + "name": "struct_in_c_file", + "body": { + "file": "source0.c", + "start_line": 6, + "end_line": 9 + }, + "comment": {} + }, + { + "kind": "typedef", + "name": "another_struct_t", + "body": { + "file": "source0.h", + "start_line": 36, + "end_line": 38 + }, + "comment": {} + }, + { + "kind": "typedef", + "name": "some_enum_t", + "body": { + "file": "source0.h", + "start_line": 50, + "end_line": 50 + }, + "comment": {} + }, + { + "kind": "typedef", + "name": "some_struct_t", + "body": { + "file": "source0.h", + "start_line": 22, + "end_line": 22 + }, + "comment": {} + }, + { + "kind": "typedef", + "name": "typedefed_struct_t", + "body": { + "file": "source0.h", + "start_line": 32, + "end_line": 34 + }, + "comment": {} + }, + { + "kind": "union", + "name": "some_union", + "body": { + "file": "source0.h", + "start_line": 40, + "end_line": 43 + }, + "comment": {} } ] }
\ No newline at end of file |
