ccls/tests/outline/outline.cc

54 lines
1.1 KiB
C++
Raw Normal View History

2017-03-11 08:07:32 +00:00
#include <vector>
struct MergeableUpdate {
int a;
int b;
std::vector<int> to_add;
};
/*
OUTPUT:
{
"types": [{
"id": 0,
"usr": "c:@S@MergeableUpdate",
"short_name": "MergeableUpdate",
"qualified_name": "MergeableUpdate",
2017-04-05 08:06:18 +00:00
"definition": "3:8",
2017-03-11 08:07:32 +00:00
"vars": [0, 1, 2],
2017-04-05 08:06:18 +00:00
"uses": ["*3:8"]
2017-04-03 01:34:15 +00:00
}, {
"id": 1,
"usr": "c:@N@std@ST>2#T#T@vector",
"instantiations": [2],
2017-04-05 08:06:18 +00:00
"uses": ["*6:8"]
2017-03-11 08:07:32 +00:00
}],
"vars": [{
"id": 0,
"usr": "c:@S@MergeableUpdate@FI@a",
"short_name": "a",
"qualified_name": "MergeableUpdate::a",
2017-04-05 08:06:18 +00:00
"definition": "4:7",
2017-03-11 08:07:32 +00:00
"declaring_type": 0,
2017-04-05 08:06:18 +00:00
"uses": ["4:7"]
2017-03-11 08:07:32 +00:00
}, {
"id": 1,
"usr": "c:@S@MergeableUpdate@FI@b",
"short_name": "b",
"qualified_name": "MergeableUpdate::b",
2017-04-05 08:06:18 +00:00
"definition": "5:7",
2017-03-11 08:07:32 +00:00
"declaring_type": 0,
2017-04-05 08:06:18 +00:00
"uses": ["5:7"]
2017-03-11 08:07:32 +00:00
}, {
"id": 2,
"usr": "c:@S@MergeableUpdate@FI@to_add",
"short_name": "to_add",
"qualified_name": "MergeableUpdate::to_add",
2017-04-05 08:06:18 +00:00
"definition": "6:20",
2017-03-11 08:07:32 +00:00
"variable_type": 1,
"declaring_type": 0,
2017-04-05 08:06:18 +00:00
"uses": ["6:20"]
2017-03-11 08:07:32 +00:00
}]
}
*/