Debian Codegraph @

index_tests/constructors/constructor.cc

raw
1 class Foo {
2 public:
3 Foo() {}
4 };
5
6 void foo() {
7 Foo f;
8 Foo* f2 = new Foo();
9 }
10
11 /*
12 OUTPUT:
13 {
14 "includes": [],
15 "skipped_ranges": [],
16 "usr2func": [{
17 "usr": 3385168158331140247,
18 "detailed_name": "Foo::Foo()",
19 "qual_name_offset": 0,
20 "short_name": "Foo",
21 "spell": "3:3-3:6|3:3-3:11|1026|-1",
22 "bases": [],
23 "vars": [],
24 "callees": [],
25 "kind": 9,
26 "parent_kind": 5,
27 "storage": 0,
28 "declarations": [],
29 "derived": [],
30 "uses": ["7:7-7:8|16676|-1", "8:17-8:20|16676|-1"]
31 }, {
32 "usr": 4259594751088586730,
33 "detailed_name": "void foo()",
34 "qual_name_offset": 5,
35 "short_name": "foo",
36 "spell": "6:6-6:9|6:1-9:2|2|-1",
37 "bases": [],
38 "vars": [10983126130596230582, 17165811951126099095],
39 "callees": ["7:7-7:8|3385168158331140247|3|16676", "7:7-7:8|3385168158331140247|3|16676",
40 "8:17-8:20|3385168158331140247|3|16676", "8:17-8:20|3385168158331140247|3|16676"], "kind": 12, "parent_kind": 1,
41 "storage": 0,
42 "declarations": [],
43 "derived": [],
44 "uses": []
45 }],
46 "usr2type": [{
47 "usr": 15041163540773201510,
48 "detailed_name": "class Foo {}",
49 "qual_name_offset": 6,
50 "short_name": "Foo",
51 "spell": "1:7-1:10|1:1-4:2|2|-1",
52 "bases": [],
53 "funcs": [3385168158331140247],
54 "types": [],
55 "vars": [],
56 "alias_of": 0,
57 "kind": 5,
58 "parent_kind": 1,
59 "declarations": [],
60 "derived": [],
61 "instances": [10983126130596230582, 17165811951126099095],
62 "uses": ["3:3-3:6|4|-1", "7:3-7:6|4|-1", "8:3-8:6|4|-1", "8:17-8:20|4|-1"]
63 }],
64 "usr2var": [{
65 "usr": 10983126130596230582,
66 "detailed_name": "Foo f",
67 "qual_name_offset": 4,
68 "short_name": "f",
69 "spell": "7:7-7:8|7:3-7:8|2|-1",
70 "type": 15041163540773201510,
71 "kind": 13,
72 "parent_kind": 12,
73 "storage": 0,
74 "declarations": [],
75 "uses": []
76 }, {
77 "usr": 17165811951126099095,
78 "detailed_name": "Foo *f2",
79 "qual_name_offset": 5,
80 "short_name": "f2",
81 "hover": "Foo *f2 = new Foo()",
82 "spell": "8:8-8:10|8:3-8:22|2|-1",
83 "type": 15041163540773201510,
84 "kind": 13,
85 "parent_kind": 12,
86 "storage": 0,
87 "declarations": [],
88 "uses": []
89 }]
90 }
91 */