2018-03-31 03:16:33 +00:00
|
|
|
namespace foo {
|
|
|
|
namespace bar {
|
|
|
|
namespace baz {
|
|
|
|
int qux = 42;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace fbz = foo::bar::baz;
|
|
|
|
|
|
|
|
void func() {
|
|
|
|
int a = foo::bar::baz::qux;
|
|
|
|
int b = fbz::qux;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
OUTPUT:
|
|
|
|
{
|
|
|
|
"includes": [],
|
2018-07-07 23:56:47 +00:00
|
|
|
"skipped_ranges": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr2func": [{
|
|
|
|
"usr": 10818727483146447186,
|
|
|
|
"detailed_name": "void func()",
|
|
|
|
"qual_name_offset": 5,
|
|
|
|
"short_name": "func",
|
|
|
|
"kind": 12,
|
2018-06-01 23:51:39 +00:00
|
|
|
"storage": 0,
|
2018-03-31 03:16:33 +00:00
|
|
|
"declarations": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"spell": "11:6-11:10|0|1|2|-1",
|
|
|
|
"extent": "11:1-14:2|0|1|0|-1",
|
2018-04-30 04:49:03 +00:00
|
|
|
"bases": [],
|
|
|
|
"derived": [],
|
2018-07-08 19:49:27 +00:00
|
|
|
"vars": [6030927277961448585, 7657277353101371136],
|
2018-04-30 04:49:03 +00:00
|
|
|
"uses": [],
|
|
|
|
"callees": []
|
|
|
|
}],
|
|
|
|
"usr2type": [{
|
2018-07-07 23:56:47 +00:00
|
|
|
"usr": 53,
|
2018-04-30 04:49:03 +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": "",
|
|
|
|
"kind": 0,
|
|
|
|
"declarations": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"alias_of": 0,
|
2018-03-31 03:16:33 +00:00
|
|
|
"bases": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"derived": [],
|
2018-03-31 03:16:33 +00:00
|
|
|
"types": [],
|
|
|
|
"funcs": [],
|
|
|
|
"vars": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"instances": [15042442838933090518, 6030927277961448585, 7657277353101371136],
|
2018-03-31 03:16:33 +00:00
|
|
|
"uses": []
|
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 926793467007732869,
|
2018-08-30 04:20:27 +00:00
|
|
|
"detailed_name": "namespace foo {}",
|
2018-07-07 23:56:47 +00:00
|
|
|
"qual_name_offset": 10,
|
2018-04-30 04:49:03 +00:00
|
|
|
"short_name": "foo",
|
2018-03-31 03:16:33 +00:00
|
|
|
"kind": 3,
|
2018-09-08 05:29:36 +00:00
|
|
|
"declarations": ["1:11-1:14|1:1-7:2|0|1|1|-1"],
|
2018-04-30 04:49:03 +00:00
|
|
|
"alias_of": 0,
|
2018-07-07 23:56:47 +00:00
|
|
|
"bases": [],
|
2018-07-20 03:50:52 +00:00
|
|
|
"derived": [17805385787823406700],
|
2018-07-07 23:56:47 +00:00
|
|
|
"types": [17805385787823406700],
|
2018-03-31 03:16:33 +00:00
|
|
|
"funcs": [],
|
|
|
|
"vars": [],
|
|
|
|
"instances": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"uses": ["9:17-9:20|0|1|4|-1", "12:11-12:14|10818727483146447186|3|4|-1"]
|
2018-03-31 03:16:33 +00:00
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 11879713791858506216,
|
2018-07-07 23:56:47 +00:00
|
|
|
"detailed_name": "namespace fbz = foo::bar::baz",
|
|
|
|
"qual_name_offset": 10,
|
2018-04-30 04:49:03 +00:00
|
|
|
"short_name": "fbz",
|
2018-07-07 23:56:47 +00:00
|
|
|
"kind": 252,
|
2018-09-08 05:29:36 +00:00
|
|
|
"declarations": ["9:11-9:14|9:1-9:30|0|1|1|-1"],
|
2018-07-07 23:56:47 +00:00
|
|
|
"alias_of": 14450849931009540802,
|
2018-04-30 04:49:03 +00:00
|
|
|
"bases": [],
|
2018-03-31 03:16:33 +00:00
|
|
|
"derived": [],
|
|
|
|
"types": [],
|
|
|
|
"funcs": [],
|
2018-04-30 04:49:03 +00:00
|
|
|
"vars": [],
|
2018-03-31 03:16:33 +00:00
|
|
|
"instances": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"uses": ["13:11-13:14|10818727483146447186|3|4|-1"]
|
2018-03-31 03:16:33 +00:00
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 14450849931009540802,
|
2018-08-30 04:20:27 +00:00
|
|
|
"detailed_name": "namespace foo::bar::baz {}",
|
2018-07-07 23:56:47 +00:00
|
|
|
"qual_name_offset": 10,
|
2018-04-30 04:49:03 +00:00
|
|
|
"short_name": "baz",
|
|
|
|
"kind": 3,
|
2018-09-08 05:29:36 +00:00
|
|
|
"declarations": ["3:20-3:23|3:10-5:11|17805385787823406700|2|1025|-1"],
|
2018-04-30 04:49:03 +00:00
|
|
|
"alias_of": 0,
|
2018-07-27 03:08:22 +00:00
|
|
|
"bases": [17805385787823406700],
|
2018-03-31 03:16:33 +00:00
|
|
|
"derived": [],
|
|
|
|
"types": [],
|
|
|
|
"funcs": [],
|
2018-07-08 19:49:27 +00:00
|
|
|
"vars": [{
|
|
|
|
"L": 15042442838933090518,
|
|
|
|
"R": -1
|
|
|
|
}],
|
2018-03-31 03:16:33 +00:00
|
|
|
"instances": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"uses": ["9:27-9:30|0|1|4|-1", "12:21-12:24|10818727483146447186|3|4|-1"]
|
2018-04-30 04:49:03 +00:00
|
|
|
}, {
|
|
|
|
"usr": 17805385787823406700,
|
2018-08-30 04:20:27 +00:00
|
|
|
"detailed_name": "namespace foo::bar {}",
|
2018-07-07 23:56:47 +00:00
|
|
|
"qual_name_offset": 10,
|
2018-04-30 04:49:03 +00:00
|
|
|
"short_name": "bar",
|
|
|
|
"kind": 3,
|
2018-09-08 05:29:36 +00:00
|
|
|
"declarations": ["2:15-2:18|2:5-6:6|926793467007732869|2|1025|-1"],
|
2018-04-30 04:49:03 +00:00
|
|
|
"alias_of": 0,
|
2018-07-27 03:08:22 +00:00
|
|
|
"bases": [926793467007732869],
|
2018-07-20 03:50:52 +00:00
|
|
|
"derived": [14450849931009540802],
|
2018-07-07 23:56:47 +00:00
|
|
|
"types": [14450849931009540802],
|
2018-04-30 04:49:03 +00:00
|
|
|
"funcs": [],
|
|
|
|
"vars": [],
|
|
|
|
"instances": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"uses": ["9:22-9:25|0|1|4|-1", "12:16-12:19|10818727483146447186|3|4|-1"]
|
2018-03-31 03:16:33 +00:00
|
|
|
}],
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr2var": [{
|
|
|
|
"usr": 6030927277961448585,
|
2018-03-31 03:16:33 +00:00
|
|
|
"detailed_name": "int a",
|
2018-04-06 00:00:07 +00:00
|
|
|
"qual_name_offset": 4,
|
2018-03-31 03:16:33 +00:00
|
|
|
"short_name": "a",
|
|
|
|
"hover": "int a = foo::bar::baz::qux",
|
|
|
|
"declarations": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"spell": "12:7-12:8|10818727483146447186|3|2|-1",
|
|
|
|
"extent": "12:3-12:29|10818727483146447186|3|0|-1",
|
2018-07-07 23:56:47 +00:00
|
|
|
"type": 53,
|
2018-03-31 03:16:33 +00:00
|
|
|
"uses": [],
|
|
|
|
"kind": 13,
|
2018-06-01 23:51:39 +00:00
|
|
|
"storage": 0
|
2018-03-31 03:16:33 +00:00
|
|
|
}, {
|
2018-04-30 04:49:03 +00:00
|
|
|
"usr": 7657277353101371136,
|
2018-03-31 03:16:33 +00:00
|
|
|
"detailed_name": "int b",
|
2018-04-06 00:00:07 +00:00
|
|
|
"qual_name_offset": 4,
|
2018-03-31 03:16:33 +00:00
|
|
|
"short_name": "b",
|
|
|
|
"hover": "int b = fbz::qux",
|
|
|
|
"declarations": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"spell": "13:7-13:8|10818727483146447186|3|2|-1",
|
|
|
|
"extent": "13:3-13:19|10818727483146447186|3|0|-1",
|
2018-07-07 23:56:47 +00:00
|
|
|
"type": 53,
|
2018-03-31 03:16:33 +00:00
|
|
|
"uses": [],
|
|
|
|
"kind": 13,
|
2018-06-01 23:51:39 +00:00
|
|
|
"storage": 0
|
2018-04-30 04:49:03 +00:00
|
|
|
}, {
|
|
|
|
"usr": 15042442838933090518,
|
|
|
|
"detailed_name": "int foo::bar::baz::qux",
|
|
|
|
"qual_name_offset": 4,
|
|
|
|
"short_name": "qux",
|
|
|
|
"hover": "int foo::bar::baz::qux = 42",
|
|
|
|
"declarations": [],
|
2018-09-08 05:29:36 +00:00
|
|
|
"spell": "4:18-4:21|14450849931009540802|2|1026|-1",
|
|
|
|
"extent": "4:14-4:26|14450849931009540802|2|0|-1",
|
2018-07-07 23:56:47 +00:00
|
|
|
"type": 53,
|
2018-09-08 05:29:36 +00:00
|
|
|
"uses": ["12:26-12:29|10818727483146447186|3|12|-1", "13:16-13:19|10818727483146447186|3|12|-1"],
|
2018-04-30 04:49:03 +00:00
|
|
|
"kind": 13,
|
2018-06-01 23:51:39 +00:00
|
|
|
"storage": 0
|
2018-03-31 03:16:33 +00:00
|
|
|
}]
|
|
|
|
}
|
|
|
|
*/
|