ccls/tests/vars/function_param_unnamed.cc

28 lines
860 B
C++
Raw Normal View History

2017-02-18 21:18:08 +00:00
void foo(int, int) {}
/*
// TODO: We should probably not emit variables for unnamed variables. But we
// still need to emit reference information.
2017-02-18 23:58:40 +00:00
// TODO: This test is broken. Notice how we only emit one variable because
// unnamed vars have no usr!
2017-02-18 21:18:08 +00:00
OUTPUT:
{
"types": [{
2017-02-19 00:53:31 +00:00
"id": 0,
"uses": ["tests/vars/function_param_unnamed.cc:1:13", "tests/vars/function_param_unnamed.cc:1:18"]
2017-02-18 21:18:08 +00:00
}],
"functions": [{
"id": 0,
2017-02-18 23:58:40 +00:00
"usr": "c:@F@foo#I#I#",
2017-02-18 21:18:08 +00:00
"short_name": "foo",
"qualified_name": "foo",
2017-02-18 23:58:40 +00:00
"definition": "tests/vars/function_param_unnamed.cc:1:6"
2017-02-18 21:18:08 +00:00
}],
"variables": [{
"id": 0,
2017-02-18 23:58:40 +00:00
"declaration": "tests/vars/function_param_unnamed.cc:1:13",
"initializations": ["tests/vars/function_param_unnamed.cc:1:13", "tests/vars/function_param_unnamed.cc:1:18"],
"variable_type": 0
2017-02-18 21:18:08 +00:00
}]
}
*/