Debian Codegraph @

index_tests/usage/func_called_from_macro_argument.cc

raw
1 #define MACRO_CALL(e) e
2
3 bool called(bool a, bool b);
4
5 void caller() {
6 MACRO_CALL(called(true, true));
7 }
8
9 /*
10 OUTPUT:
11 {
12 "includes": [],
13 "skipped_ranges": [],
14 "usr2func": [{
15 "usr": 3787803219955606747,
16 "detailed_name": "bool called(bool a, bool b)",
17 "qual_name_offset": 5,
18 "short_name": "called",
19 "bases": [],
20 "vars": [821688872341099790, 6986353817767193884],
21 "callees": [],
22 "kind": 12,
23 "parent_kind": 0,
24 "storage": 0,
25 "declarations": ["3:6-3:12|3:1-3:28|1|-1"],
26 "derived": [],
27 "uses": ["6:14-6:20|16420|-1", "6:14-6:20|64|0"]
28 }, {
29 "usr": 11404881820527069090,
30 "detailed_name": "void caller()",
31 "qual_name_offset": 5,
32 "short_name": "caller",
33 "spell": "5:6-5:12|5:1-7:2|2|-1",
34 "bases": [],
35 "vars": [],
36 "callees": ["6:14-6:20|3787803219955606747|3|16420"],
37 "kind": 12,
38 "parent_kind": 1,
39 "storage": 0,
40 "declarations": [],
41 "derived": [],
42 "uses": []
43 }],
44 "usr2type": [{
45 "usr": 436,
46 "detailed_name": "",
47 "qual_name_offset": 0,
48 "short_name": "",
49 "bases": [],
50 "funcs": [],
51 "types": [],
52 "vars": [],
53 "alias_of": 0,
54 "kind": 0,
55 "parent_kind": 0,
56 "declarations": [],
57 "derived": [],
58 "instances": [821688872341099790, 6986353817767193884],
59 "uses": []
60 }],
61 "usr2var": [{
62 "usr": 821688872341099790,
63 "detailed_name": "bool a",
64 "qual_name_offset": 5,
65 "short_name": "a",
66 "spell": "3:18-3:19|3:13-3:19|1026|-1",
67 "type": 436,
68 "kind": 253,
69 "parent_kind": 12,
70 "storage": 0,
71 "declarations": [],
72 "uses": []
73 }, {
74 "usr": 6986353817767193884,
75 "detailed_name": "bool b",
76 "qual_name_offset": 5,
77 "short_name": "b",
78 "spell": "3:26-3:27|3:21-3:27|1026|-1",
79 "type": 436,
80 "kind": 253,
81 "parent_kind": 12,
82 "storage": 0,
83 "declarations": [],
84 "uses": []
85 }, {
86 "usr": 16326993795872073150,
87 "detailed_name": "MACRO_CALL",
88 "qual_name_offset": 0,
89 "short_name": "MACRO_CALL",
90 "hover": "#define MACRO_CALL(e) e",
91 "spell": "1:9-1:19|1:9-1:24|2|-1",
92 "type": 0,
93 "kind": 255,
94 "parent_kind": 1,
95 "storage": 0,
96 "declarations": [],
97 "uses": ["6:3-6:13|64|-1"]
98 }]
99 }
100 */