2017-05-27 19:33:18 +00:00
|
|
|
namespace foo {
|
|
|
|
namespace bar {
|
|
|
|
namespace baz {
|
|
|
|
int qux = 42;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-12-20 17:43:26 +00:00
|
|
|
|
2017-05-27 19:33:18 +00:00
|
|
|
namespace fbz = foo::bar::baz;
|
|
|
|
|
2017-12-20 17:43:26 +00:00
|
|
|
void func() {
|
2017-05-27 19:33:18 +00:00
|
|
|
int a = foo::bar::baz::qux;
|
|
|
|
int b = fbz::qux;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
OUTPUT:
|
|
|
|
{
|
2017-12-12 05:15:37 +00:00
|
|
|
"includes": [],
|
|
|
|
"skipped_by_preprocessor": [],
|
|
|
|
"types": [],
|
2017-05-27 19:33:18 +00:00
|
|
|
"funcs": [{
|
|
|
|
"id": 0,
|
2017-12-02 01:07:03 +00:00
|
|
|
"is_operator": false,
|
2017-12-20 17:43:26 +00:00
|
|
|
"usr": "c:@F@func#",
|
|
|
|
"short_name": "func",
|
|
|
|
"detailed_name": "void func()",
|
|
|
|
"hover": "void func()",
|
2017-12-12 05:15:37 +00:00
|
|
|
"declarations": [],
|
2017-12-20 17:43:26 +00:00
|
|
|
"definition_spelling": "11:6-11:10",
|
2017-12-12 05:15:37 +00:00
|
|
|
"definition_extent": "11:1-14:2",
|
2017-12-19 06:15:46 +00:00
|
|
|
"base": [],
|
2017-12-12 05:15:37 +00:00
|
|
|
"derived": [],
|
|
|
|
"locals": [],
|
|
|
|
"callers": [],
|
|
|
|
"callees": []
|
2017-05-27 19:33:18 +00:00
|
|
|
}],
|
|
|
|
"vars": [{
|
|
|
|
"id": 0,
|
|
|
|
"usr": "c:@N@foo@N@bar@N@baz@qux",
|
|
|
|
"short_name": "qux",
|
|
|
|
"detailed_name": "int foo::bar::baz::qux",
|
|
|
|
"definition_spelling": "4:18-4:21",
|
|
|
|
"definition_extent": "4:14-4:26",
|
|
|
|
"is_local": false,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-12-23 02:10:23 +00:00
|
|
|
"is_global": false,
|
|
|
|
"is_member": false,
|
2017-05-27 19:33:18 +00:00
|
|
|
"uses": ["4:18-4:21", "12:26-12:29", "13:16-13:19"]
|
|
|
|
}, {
|
|
|
|
"id": 1,
|
2017-12-20 17:43:26 +00:00
|
|
|
"usr": "c:namespace_alias.cc@167@F@func#@a",
|
2017-05-27 19:33:18 +00:00
|
|
|
"short_name": "a",
|
|
|
|
"detailed_name": "int a",
|
|
|
|
"definition_spelling": "12:7-12:8",
|
|
|
|
"definition_extent": "12:3-12:29",
|
|
|
|
"is_local": true,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-12-23 02:10:23 +00:00
|
|
|
"is_global": false,
|
|
|
|
"is_member": false,
|
2017-05-27 19:33:18 +00:00
|
|
|
"uses": ["12:7-12:8"]
|
|
|
|
}, {
|
|
|
|
"id": 2,
|
2017-12-20 17:43:26 +00:00
|
|
|
"usr": "c:namespace_alias.cc@198@F@func#@b",
|
2017-05-27 19:33:18 +00:00
|
|
|
"short_name": "b",
|
|
|
|
"detailed_name": "int b",
|
|
|
|
"definition_spelling": "13:7-13:8",
|
|
|
|
"definition_extent": "13:3-13:19",
|
|
|
|
"is_local": true,
|
2017-06-29 06:25:19 +00:00
|
|
|
"is_macro": false,
|
2017-12-23 02:10:23 +00:00
|
|
|
"is_global": false,
|
|
|
|
"is_member": false,
|
2017-05-27 19:33:18 +00:00
|
|
|
"uses": ["13:7-13:8"]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
*/
|