ccls/index_tests/templates/specialized_func_definition.cc

93 lines
2.0 KiB
C++
Raw Permalink Normal View History

2018-03-31 03:16:33 +00:00
template<class T>
class Template {
void Foo();
};
template<class T>
void Template<T>::Foo() {}
template<>
void Template<void>::Foo() {}
/*
// TODO: usage information on Template is bad.
// TODO: Foo() should have multiple definitions.
EXTRA_FLAGS:
-fms-compatibility
-fdelayed-template-parsing
OUTPUT:
{
"includes": [],
2018-07-07 23:56:47 +00:00
"skipped_ranges": [],
"usr2func": [{
2018-07-07 23:56:47 +00:00
"usr": 6995843774014807426,
"detailed_name": "void Template<void>::Foo()",
"qual_name_offset": 5,
2018-07-07 23:56:47 +00:00
"short_name": "Foo",
"spell": "10:22-10:25|9:1-10:30|1026|-1",
"bases": [],
"vars": [],
"callees": [],
2018-07-07 23:56:47 +00:00
"kind": 6,
"parent_kind": 5,
2018-07-07 23:56:47 +00:00
"storage": 0,
"declarations": [],
"derived": [],
"uses": []
2018-07-07 23:56:47 +00:00
}, {
2018-03-31 03:16:33 +00:00
"usr": 11994188353303124840,
2018-07-07 23:56:47 +00:00
"detailed_name": "void Template::Foo()",
"qual_name_offset": 5,
2018-03-31 03:16:33 +00:00
"short_name": "Foo",
"spell": "7:19-7:22|6:1-7:24|1026|-1",
"bases": [],
"vars": [],
"callees": [],
2018-03-31 03:16:33 +00:00
"kind": 6,
"parent_kind": 5,
"storage": 0,
"declarations": ["3:8-3:11|3:3-3:13|1025|-1"],
2018-03-31 03:16:33 +00:00
"derived": [],
"uses": []
2018-03-31 03:16:33 +00:00
}],
"usr2type": [{
"usr": 17107291254533526269,
2018-07-07 23:56:47 +00:00
"detailed_name": "class Template {}",
"qual_name_offset": 6,
"short_name": "Template",
"spell": "2:7-2:15|2:1-4:2|2|-1",
"bases": [],
"funcs": [11994188353303124840],
"types": [],
"vars": [],
"alias_of": 0,
"kind": 5,
"parent_kind": 0,
"declarations": [],
"derived": [],
"instances": [],
"uses": ["7:6-7:14|4|-1", "10:6-10:14|4|-1"]
2018-07-07 23:56:47 +00:00
}, {
"usr": 17649312483543982122,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"bases": [],
"funcs": [6995843774014807426],
"types": [],
2018-07-07 23:56:47 +00:00
"vars": [],
"alias_of": 0,
"kind": 0,
"parent_kind": 0,
"declarations": [],
"derived": [],
2018-07-07 23:56:47 +00:00
"instances": [],
"uses": []
}],
"usr2var": []
2018-03-31 03:16:33 +00:00
}
*/