ccls/tests/vars/function_param_unnamed.cc

24 lines
707 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:
{
2017-02-19 02:34:51 +00:00
"types": [],
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",
2017-02-19 02:34:51 +00:00
"initializations": ["tests/vars/function_param_unnamed.cc:1:13", "tests/vars/function_param_unnamed.cc:1:18"]
2017-02-18 21:18:08 +00:00
}]
}
*/