ccls/tests/namespaces/namespace_reference.cc

52 lines
979 B
C++
Raw Normal View History

2017-03-06 06:34:17 +00:00
namespace ns {
int Foo;
void Accept(int a) {}
}
void Runner() {
ns::Accept(ns::Foo);
using namespace ns;
Accept(Foo);
}
/*
OUTPUT:
{
2017-03-07 18:17:49 +00:00
"funcs": [{
2017-03-06 06:34:17 +00:00
"id": 0,
"usr": "c:@N@ns@F@Accept#I#",
"short_name": "Accept",
"qualified_name": "ns::Accept",
2017-04-05 08:06:18 +00:00
"definition": "3:8",
"callers": ["1@7:7", "1@9:3"],
"uses": ["3:8", "7:7", "9:3"]
2017-03-06 06:34:17 +00:00
}, {
"id": 1,
"usr": "c:@F@Runner#",
"short_name": "Runner",
"qualified_name": "Runner",
2017-04-05 08:06:18 +00:00
"definition": "6:6",
"callees": ["0@7:7", "0@9:3"],
"uses": ["6:6"]
2017-03-06 06:34:17 +00:00
}],
2017-03-08 08:09:15 +00:00
"vars": [{
2017-03-06 06:34:17 +00:00
"id": 0,
"usr": "c:@N@ns@Foo",
"short_name": "Foo",
"qualified_name": "ns::Foo",
2017-04-05 08:06:18 +00:00
"definition": "2:7",
"uses": ["2:7", "7:18", "9:10"]
2017-03-06 06:34:17 +00:00
}, {
"id": 1,
"usr": "c:namespace_reference.cc@42@N@ns@F@Accept#I#@a",
"short_name": "a",
"qualified_name": "a",
2017-04-05 08:06:18 +00:00
"definition": "3:19",
"uses": ["3:19"]
2017-03-06 06:34:17 +00:00
}]
}
*/