2018-03-31 03:16:33 +00:00
|
|
|
void foo() {
|
|
|
|
int x;
|
|
|
|
|
|
|
|
auto dosomething = [&x](int y) {
|
|
|
|
++x;
|
|
|
|
++y;
|
|
|
|
};
|
|
|
|
|
|
|
|
dosomething(1);
|
|
|
|
dosomething(1);
|
|
|
|
dosomething(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
OUTPUT:
|
|
|
|
{
|
|
|
|
"includes": [],
|
2018-07-07 23:56:47 +00:00
|
|
|
"skipped_ranges": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr2func": [{
|
|
|
|
"usr": 4259594751088586730,
|
|
|
|
"detailed_name": "void foo()",
|
|
|
|
"qual_name_offset": 5,
|
|
|
|
"short_name": "foo",
|
2018-10-05 06:31:59 +00:00
|
|
|
"spell": "1:6-1:9|1:1-12:2|2|-1",
|
|
|
|
"bases": [],
|
|
|
|
"vars": [12666114896600231317, 2981279427664991319],
|
|
|
|
"callees": ["9:14-9:15|17926497908620168464|3|16420", "10:14-10:15|17926497908620168464|3|16420", "11:14-11:15|17926497908620168464|3|16420"],
|
2018-04-30 04:49:03 +00:00
|
|
|
"kind": 12,
|
2018-10-05 06:31:59 +00:00
|
|
|
"parent_kind": 0,
|
2018-06-01 23:51:39 +00:00
|
|
|
"storage": 0,
|
2018-04-30 04:49:03 +00:00
|
|
|
"declarations": [],
|
|
|
|
"derived": [],
|
2018-10-05 06:31:59 +00:00
|
|
|
"uses": []
|
2018-04-30 04:49:03 +00:00
|
|
|
}, {
|
|
|
|
"usr": 17926497908620168464,
|
2018-07-07 23:56:47 +00:00
|
|
|
"detailed_name": "inline void foo()::(anon class)::operator()(int y) const",
|
|
|
|
"qual_name_offset": 12,
|
|
|
|
"short_name": "operator()",
|
2018-10-05 06:31:59 +00:00
|
|
|
"bases": [],
|
|
|
|
"vars": [],
|
|
|
|
"callees": [],
|
2018-07-07 23:56:47 +00:00
|
|
|
"kind": 6,
|
2018-10-05 06:31:59 +00:00
|
|
|
"parent_kind": 0,
|
2018-04-30 04:49:03 +00:00
|
|
|
"storage": 0,
|
2018-03-31 03:16:33 +00:00
|
|
|
"declarations": [],
|
|
|
|
"derived": [],
|
2018-10-05 06:31:59 +00:00
|
|
|
"uses": ["9:14-9:15|16420|-1", "10:14-10:15|16420|-1", "11:14-11:15|16420|-1"]
|
2018-04-30 04:49:03 +00:00
|
|
|
}],
|
|
|
|
"usr2type": [{
|
2018-07-07 23:56:47 +00:00
|
|
|
"usr": 53,
|
2018-03-31 03:16:33 +00:00
|
|
|
"detailed_name": "",
|
2018-04-06 00:00:07 +00:00
|
|
|
"qual_name_offset": 0,
|
2018-03-31 03:16:33 +00:00
|
|
|
"short_name": "",
|
|
|
|
"bases": [],
|
|
|
|
"funcs": [],
|
2018-10-05 06:31:59 +00:00
|
|
|
"types": [],
|
2018-03-31 03:16:33 +00:00
|
|
|
"vars": [],
|
2018-10-05 06:31:59 +00:00
|
|
|
"alias_of": 0,
|
|
|
|
"kind": 0,
|
|
|
|
"parent_kind": 0,
|
|
|
|
"declarations": [],
|
|
|
|
"derived": [],
|
2018-07-07 23:56:47 +00:00
|
|
|
"instances": [12666114896600231317],
|
2018-03-31 03:16:33 +00:00
|
|
|
"uses": []
|
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 14635009347499519042,
|
2018-03-31 03:16:33 +00:00
|
|
|
"detailed_name": "",
|
2018-04-06 00:00:07 +00:00
|
|
|
"qual_name_offset": 0,
|
2018-03-31 03:16:33 +00:00
|
|
|
"short_name": "",
|
|
|
|
"bases": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"funcs": [],
|
2018-10-05 06:31:59 +00:00
|
|
|
"types": [],
|
2018-03-31 03:16:33 +00:00
|
|
|
"vars": [],
|
2018-10-05 06:31:59 +00:00
|
|
|
"alias_of": 0,
|
|
|
|
"kind": 0,
|
|
|
|
"parent_kind": 0,
|
|
|
|
"declarations": [],
|
|
|
|
"derived": [],
|
2018-07-08 19:49:27 +00:00
|
|
|
"instances": [2981279427664991319],
|
2018-04-30 04:49:03 +00:00
|
|
|
"uses": []
|
2018-03-31 03:16:33 +00:00
|
|
|
}],
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr2var": [{
|
|
|
|
"usr": 2981279427664991319,
|
2018-07-08 19:49:27 +00:00
|
|
|
"detailed_name": "(lambda) dosomething",
|
|
|
|
"qual_name_offset": 9,
|
2018-04-30 04:49:03 +00:00
|
|
|
"short_name": "dosomething",
|
2018-07-15 18:27:59 +00:00
|
|
|
"hover": "(lambda) dosomething",
|
2018-10-05 06:31:59 +00:00
|
|
|
"spell": "4:8-4:19|4:3-7:4|2|-1",
|
2018-07-08 19:49:27 +00:00
|
|
|
"type": 14635009347499519042,
|
2018-03-31 03:16:33 +00:00
|
|
|
"kind": 13,
|
2018-10-05 06:31:59 +00:00
|
|
|
"parent_kind": 12,
|
|
|
|
"storage": 0,
|
|
|
|
"declarations": [],
|
|
|
|
"uses": ["9:3-9:14|4|-1", "10:3-10:14|4|-1", "11:3-11:14|4|-1"]
|
2018-03-31 03:16:33 +00:00
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 12666114896600231317,
|
|
|
|
"detailed_name": "int x",
|
|
|
|
"qual_name_offset": 4,
|
|
|
|
"short_name": "x",
|
2018-10-05 06:31:59 +00:00
|
|
|
"spell": "2:7-2:8|2:3-2:8|2|-1",
|
2018-07-07 23:56:47 +00:00
|
|
|
"type": 53,
|
2018-03-31 03:16:33 +00:00
|
|
|
"kind": 13,
|
2018-10-05 06:31:59 +00:00
|
|
|
"parent_kind": 12,
|
|
|
|
"storage": 0,
|
|
|
|
"declarations": [],
|
|
|
|
"uses": ["4:24-4:25|4|-1", "5:7-5:8|28|-1"]
|
2018-03-31 03:16:33 +00:00
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 12879188959314906706,
|
2018-03-31 03:16:33 +00:00
|
|
|
"detailed_name": "int y",
|
2018-04-06 00:00:07 +00:00
|
|
|
"qual_name_offset": 4,
|
2018-07-07 23:56:47 +00:00
|
|
|
"short_name": "y",
|
2018-10-05 06:31:59 +00:00
|
|
|
"spell": "4:31-4:32|4:27-4:32|2|-1",
|
2018-07-07 23:56:47 +00:00
|
|
|
"type": 0,
|
2018-03-31 03:16:33 +00:00
|
|
|
"kind": 253,
|
2018-10-05 06:31:59 +00:00
|
|
|
"parent_kind": 6,
|
|
|
|
"storage": 0,
|
|
|
|
"declarations": [],
|
|
|
|
"uses": ["6:7-6:8|28|-1"]
|
2018-03-31 03:16:33 +00:00
|
|
|
}]
|
|
|
|
}
|
|
|
|
*/
|