ccls/index_tests/enums/enum_inherit.cc

124 lines
2.8 KiB
C++
Raw Normal View History

2018-03-31 03:16:33 +00:00
enum Foo : int {
A,
B = 20
};
typedef int int32_t;
enum class E : int32_t {
E0,
E20 = 20
};
/*
OUTPUT:
{
"includes": [],
2018-07-07 23:56:47 +00:00
"skipped_ranges": [],
2018-07-08 19:49:27 +00:00
"usr2func": [],
2018-07-07 23:56:47 +00:00
"usr2type": [{
"usr": 2986879766914123941,
"detailed_name": "enum class E : int32_t {\n}",
"qual_name_offset": 11,
"short_name": "E",
"kind": 10,
2018-03-31 03:16:33 +00:00
"declarations": [],
"spell": "8:12-8:13|0|1|2",
"extent": "8:1-11:2|0|1|0",
"alias_of": 0,
2018-03-31 03:16:33 +00:00
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
"uses": []
}, {
"usr": 14939241684006947339,
2018-07-07 23:56:47 +00:00
"detailed_name": "typedef int int32_t",
"qual_name_offset": 12,
2018-03-31 03:16:33 +00:00
"short_name": "int32_t",
"kind": 252,
"declarations": [],
"spell": "6:13-6:20|0|1|2",
"extent": "6:1-6:20|0|1|0",
2018-07-07 23:56:47 +00:00
"alias_of": 0,
2018-03-31 03:16:33 +00:00
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
2018-07-07 23:56:47 +00:00
"uses": []
2018-03-31 03:16:33 +00:00
}, {
"usr": 16985894625255407295,
2018-07-07 23:56:47 +00:00
"detailed_name": "enum Foo : int {\n}",
"qual_name_offset": 5,
"short_name": "Foo",
2018-03-31 03:16:33 +00:00
"kind": 10,
"declarations": [],
"spell": "1:6-1:9|0|1|2",
"extent": "1:1-4:2|0|1|0",
"alias_of": 0,
2018-03-31 03:16:33 +00:00
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
"uses": []
}],
"usr2var": [{
2018-03-31 03:16:33 +00:00
"usr": 439339022761937396,
2018-07-07 23:56:47 +00:00
"detailed_name": "A",
"qual_name_offset": 0,
2018-03-31 03:16:33 +00:00
"short_name": "A",
2018-07-07 23:56:47 +00:00
"hover": "A = 0",
2018-03-31 03:16:33 +00:00
"declarations": [],
2018-07-10 06:40:26 +00:00
"spell": "2:3-2:4|16985894625255407295|2|1026",
"extent": "2:3-2:4|16985894625255407295|2|0",
2018-07-07 23:56:47 +00:00
"type": 0,
2018-03-31 03:16:33 +00:00
"uses": [],
"kind": 22,
"storage": 0
}, {
"usr": 15962370213938840720,
2018-07-07 23:56:47 +00:00
"detailed_name": "B = 20",
"qual_name_offset": 0,
2018-03-31 03:16:33 +00:00
"short_name": "B",
"declarations": [],
2018-07-10 06:40:26 +00:00
"spell": "3:3-3:4|16985894625255407295|2|1026",
"extent": "3:3-3:9|16985894625255407295|2|0",
2018-07-07 23:56:47 +00:00
"type": 0,
2018-03-31 03:16:33 +00:00
"uses": [],
"kind": 22,
"storage": 0
}, {
"usr": 16614320383091394267,
"detailed_name": "E::E0",
"qual_name_offset": 0,
2018-03-31 03:16:33 +00:00
"short_name": "E0",
"hover": "E::E0 = 0",
"declarations": [],
2018-07-10 06:40:26 +00:00
"spell": "9:3-9:5|2986879766914123941|2|1026",
"extent": "9:3-9:5|2986879766914123941|2|0",
2018-07-07 23:56:47 +00:00
"type": 0,
2018-03-31 03:16:33 +00:00
"uses": [],
"kind": 22,
"storage": 0
}, {
"usr": 16847439761518576294,
2018-07-07 23:56:47 +00:00
"detailed_name": "E::E20 = 20",
"qual_name_offset": 0,
2018-03-31 03:16:33 +00:00
"short_name": "E20",
"declarations": [],
2018-07-10 06:40:26 +00:00
"spell": "10:3-10:6|2986879766914123941|2|1026",
"extent": "10:3-10:11|2986879766914123941|2|0",
2018-07-07 23:56:47 +00:00
"type": 0,
2018-03-31 03:16:33 +00:00
"uses": [],
"kind": 22,
"storage": 0
}]
}
*/