Debian Codegraph @

index_tests/usage/func_usage_addr_method.cc

raw
1 struct Foo {
2 void Used();
3 };
4
5 void user() {
6 auto x = &Foo::Used;
7 }
8
9 /*
10 OUTPUT:
11 {
12 "includes": [],
13 "skipped_ranges": [],
14 "usr2func": [{
15 "usr": 9376923949268137283,
16 "detailed_name": "void user()",
17 "qual_name_offset": 5,
18 "short_name": "user",
19 "spell": "5:6-5:10|5:1-7:2|2|-1",
20 "bases": [],
21 "vars": [4636142131003982569],
22 "callees": ["6:18-6:22|18417145003926999463|3|132", "6:18-6:22|18417145003926999463|3|132"],
23 "kind": 12,
24 "parent_kind": 1,
25 "storage": 0,
26 "declarations": [],
27 "derived": [],
28 "uses": []
29 }, {
30 "usr": 18417145003926999463,
31 "detailed_name": "void Foo::Used()",
32 "qual_name_offset": 5,
33 "short_name": "Used",
34 "bases": [],
35 "vars": [],
36 "callees": [],
37 "kind": 6,
38 "parent_kind": 0,
39 "storage": 0,
40 "declarations": ["2:8-2:12|2:3-2:14|1025|-1"],
41 "derived": [],
42 "uses": ["6:18-6:22|132|-1"]
43 }],
44 "usr2type": [{
45 "usr": 15041163540773201510,
46 "detailed_name": "struct Foo {}",
47 "qual_name_offset": 7,
48 "short_name": "Foo",
49 "spell": "1:8-1:11|1:1-3:2|2|-1",
50 "bases": [],
51 "funcs": [18417145003926999463],
52 "types": [],
53 "vars": [],
54 "alias_of": 0,
55 "kind": 23,
56 "parent_kind": 1,
57 "declarations": [],
58 "derived": [],
59 "instances": [],
60 "uses": ["6:13-6:16|4|-1"]
61 }],
62 "usr2var": [{
63 "usr": 4636142131003982569,
64 "detailed_name": "void (Foo::*)() x",
65 "qual_name_offset": 16,
66 "short_name": "x",
67 "hover": "void (Foo::*)() x = &Foo::Used",
68 "spell": "6:8-6:9|6:3-6:22|2|-1",
69 "type": 0,
70 "kind": 13,
71 "parent_kind": 12,
72 "storage": 0,
73 "declarations": [],
74 "uses": []
75 }]
76 }
77 */