ccls/tests/usage/var_usage_call_function.cc

40 lines
1.2 KiB
C++
Raw Normal View History

2017-02-19 05:47:16 +00:00
void called() {}
void caller() {
auto x = &called;
x();
called();
}
/*
OUTPUT:
{
"types": [],
"functions": [{
"id": 0,
"usr": "c:@F@called#",
"short_name": "called",
"qualified_name": "called",
"definition": "tests/usage/var_usage_call_function.cc:1:6",
"callers": ["1@tests/usage/var_usage_call_function.cc:4:13", "1@tests/usage/var_usage_call_function.cc:7:3"],
2017-02-20 06:06:46 +00:00
"all_uses": ["tests/usage/var_usage_call_function.cc:1:6", "tests/usage/var_usage_call_function.cc:4:13", "tests/usage/var_usage_call_function.cc:7:3"]
2017-02-19 05:47:16 +00:00
}, {
"id": 1,
"usr": "c:@F@caller#",
"short_name": "caller",
"qualified_name": "caller",
"definition": "tests/usage/var_usage_call_function.cc:3:6",
2017-02-20 06:06:46 +00:00
"callees": ["0@tests/usage/var_usage_call_function.cc:4:13", "0@tests/usage/var_usage_call_function.cc:7:3"],
"all_uses": ["tests/usage/var_usage_call_function.cc:3:6"]
2017-02-19 05:47:16 +00:00
}],
"variables": [{
"id": 0,
"usr": "c:var_usage_call_function.cc@39@F@caller#@x",
"short_name": "x",
"qualified_name": "x",
2017-02-20 07:51:31 +00:00
"definition": "tests/usage/var_usage_call_function.cc:4:8",
2017-02-20 06:06:46 +00:00
"all_uses": ["tests/usage/var_usage_call_function.cc:4:8", "tests/usage/var_usage_call_function.cc:5:3"]
2017-02-19 05:47:16 +00:00
}]
}
*/