ccls/tests/usage/func_usage_call_func.cc
Jacob Dufault d6123bd861 Every function usage is now considered a call of that function.
This means we will now report function calls that happen in the global scope (previously, those would only show up for find all refs).
2017-04-13 00:47:47 -07:00

28 lines
533 B
C++

void called() {}
void caller() {
called();
}
/*
OUTPUT:
{
"funcs": [{
"id": 0,
"usr": "c:@F@called#",
"short_name": "called",
"qualified_name": "called",
"definition_spelling": "1:6-1:12",
"definition_extent": "1:1-1:17",
"callers": ["1@3:3-3:9"]
}, {
"id": 1,
"usr": "c:@F@caller#",
"short_name": "caller",
"qualified_name": "caller",
"definition_spelling": "2:6-2:12",
"definition_extent": "2:1-4:2",
"callees": ["0@3:3-3:9"]
}]
}
*/