ccls/index_tests/usage/func_usage_addr_method.cc

78 lines
1.9 KiB
C++
Raw Normal View History

2018-03-31 03:16:33 +00:00
struct Foo {
void Used();
};
void user() {
auto x = &Foo::Used;
}
/*
OUTPUT:
{
"includes": [],
2018-07-07 23:56:47 +00:00
"skipped_ranges": [],
"usr2func": [{
"usr": 9376923949268137283,
"detailed_name": "void user()",
"qual_name_offset": 5,
"short_name": "user",
"kind": 12,
"storage": 0,
2018-03-31 03:16:33 +00:00
"declarations": [],
"spell": "5:6-5:10|0|1|2|-1",
"extent": "5:1-7:2|0|1|0|-1",
2018-03-31 03:16:33 +00:00
"bases": [],
"derived": [],
2018-07-08 19:49:27 +00:00
"vars": [4636142131003982569],
"uses": [],
"callees": ["6:18-6:22|18417145003926999463|3|132", "6:18-6:22|18417145003926999463|3|132"]
}, {
2018-03-31 03:16:33 +00:00
"usr": 18417145003926999463,
"detailed_name": "void Foo::Used()",
"qual_name_offset": 5,
2018-03-31 03:16:33 +00:00
"short_name": "Used",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:12|2:3-2:14|15041163540773201510|2|1025|-1"],
2018-03-31 03:16:33 +00:00
"bases": [],
"derived": [],
"vars": [],
"uses": ["6:18-6:22|9376923949268137283|3|132|-1"],
2018-03-31 03:16:33 +00:00
"callees": []
}],
"usr2type": [{
"usr": 15041163540773201510,
2018-07-07 23:56:47 +00:00
"detailed_name": "struct Foo {}",
"qual_name_offset": 7,
"short_name": "Foo",
"kind": 23,
2018-03-31 03:16:33 +00:00
"declarations": [],
"spell": "1:8-1:11|0|1|2|-1",
"extent": "1:1-3:2|0|1|0|-1",
"alias_of": 0,
2018-03-31 03:16:33 +00:00
"bases": [],
"derived": [],
"types": [],
"funcs": [18417145003926999463],
"vars": [],
"instances": [],
"uses": ["6:13-6:16|9376923949268137283|3|4|-1"]
2018-03-31 03:16:33 +00:00
}],
"usr2var": [{
"usr": 4636142131003982569,
2018-07-08 19:49:27 +00:00
"detailed_name": "void (Foo::*)() x",
"qual_name_offset": 16,
2018-03-31 03:16:33 +00:00
"short_name": "x",
2018-07-08 19:49:27 +00:00
"hover": "void (Foo::*)() x = &Foo::Used",
2018-03-31 03:16:33 +00:00
"declarations": [],
"spell": "6:8-6:9|9376923949268137283|3|2|-1",
"extent": "6:3-6:22|9376923949268137283|3|0|-1",
"type": 0,
2018-03-31 03:16:33 +00:00
"uses": [],
"kind": 13,
"storage": 0
2018-03-31 03:16:33 +00:00
}]
}
*/