ccls/tests/constructors/implicit_constructor.cc

82 lines
1.9 KiB
C++
Raw Normal View History

2017-05-23 06:47:27 +00:00
struct Type {
Type() {}
};
void Make() {
Type foo;
auto foo = Type();
}
/*
OUTPUT:
{
2017-12-12 05:15:37 +00:00
"includes": [],
"skipped_by_preprocessor": [],
2017-05-23 06:47:27 +00:00
"types": [{
"id": 0,
"usr": "c:@S@Type",
"short_name": "Type",
"detailed_name": "Type",
"definition_spelling": "1:8-1:12",
"definition_extent": "1:1-3:2",
2017-12-12 05:15:37 +00:00
"parents": [],
"derived": [],
"types": [],
2017-05-23 06:47:27 +00:00
"funcs": [0],
2017-12-12 05:15:37 +00:00
"vars": [],
2017-05-23 06:47:27 +00:00
"instances": [0],
"uses": ["1:8-1:12", "2:3-2:7", "6:3-6:7"]
}],
"funcs": [{
"id": 0,
2017-12-02 01:07:03 +00:00
"is_operator": false,
2017-05-23 06:47:27 +00:00
"usr": "c:@S@Type@F@Type#",
"short_name": "Type",
"detailed_name": "void Type::Type()",
2017-12-12 05:15:37 +00:00
"declarations": [],
2017-05-23 06:47:27 +00:00
"definition_spelling": "2:3-2:7",
"definition_extent": "2:3-2:12",
"declaring_type": 0,
2017-12-12 05:15:37 +00:00
"derived": [],
"locals": [],
"callers": ["~1@6:8-6:11"],
"callees": []
2017-05-23 06:47:27 +00:00
}, {
"id": 1,
2017-12-02 01:07:03 +00:00
"is_operator": false,
2017-05-23 06:47:27 +00:00
"usr": "c:@F@Make#",
"short_name": "Make",
"detailed_name": "void Make()",
2017-12-12 05:15:37 +00:00
"declarations": [],
2017-05-23 06:47:27 +00:00
"definition_spelling": "5:6-5:10",
"definition_extent": "5:1-8:2",
2017-12-12 05:15:37 +00:00
"derived": [],
"locals": [],
"callers": [],
2017-05-23 06:47:27 +00:00
"callees": ["~0@6:8-6:11"]
}],
"vars": [{
"id": 0,
"usr": "c:implicit_constructor.cc@51@F@Make#@foo",
"short_name": "foo",
"detailed_name": "Type foo",
"definition_spelling": "6:8-6:11",
"definition_extent": "6:3-6:11",
"variable_type": 0,
"is_local": true,
"is_macro": false,
2017-05-23 06:47:27 +00:00
"uses": ["6:8-6:11"]
}, {
"id": 1,
"usr": "c:implicit_constructor.cc@64@F@Make#@foo",
"short_name": "foo",
"detailed_name": "auto foo",
"definition_spelling": "7:8-7:11",
"definition_extent": "7:3-7:11",
"is_local": true,
"is_macro": false,
2017-05-23 06:47:27 +00:00
"uses": ["7:8-7:11"]
}]
}
*/