ccls/tests/constructors/implicit_constructor.cc

83 lines
1.9 KiB
C++
Raw Normal View History

2017-05-23 06:47:27 +00:00
struct Type {
Type() {}
};
void Make() {
2017-12-20 17:43:26 +00:00
Type foo0;
auto foo1 = Type();
2017-05-23 06:47:27 +00:00
}
/*
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-12-20 17:43:26 +00:00
"instances": [0, 1],
"uses": ["1:8-1:12", "2:3-2:7", "6:3-6:7", "7:15-7:19"]
2017-05-23 06:47:27 +00:00
}],
"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-19 06:15:46 +00:00
"base": [],
2017-12-12 05:15:37 +00:00
"derived": [],
"locals": [],
2017-12-20 17:43:26 +00:00
"callers": ["~1@6:8-6:12", "1@7:15-7:19"],
2017-12-12 05:15:37 +00:00
"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-19 06:15:46 +00:00
"base": [],
2017-12-12 05:15:37 +00:00
"derived": [],
"locals": [],
"callers": [],
2017-12-20 17:43:26 +00:00
"callees": ["~0@6:8-6:12", "0@7:15-7:19"]
2017-05-23 06:47:27 +00:00
}],
"vars": [{
"id": 0,
2017-12-20 17:43:26 +00:00
"usr": "c:implicit_constructor.cc@51@F@Make#@foo0",
"short_name": "foo0",
"detailed_name": "Type foo0",
"definition_spelling": "6:8-6:12",
"definition_extent": "6:3-6:12",
2017-05-23 06:47:27 +00:00
"variable_type": 0,
2017-12-24 00:49:11 +00:00
"cls": 1,
2017-12-20 17:43:26 +00:00
"uses": ["6:8-6:12"]
2017-05-23 06:47:27 +00:00
}, {
"id": 1,
2017-12-20 17:43:26 +00:00
"usr": "c:implicit_constructor.cc@65@F@Make#@foo1",
"short_name": "foo1",
"detailed_name": "Type foo1",
"definition_spelling": "7:8-7:12",
"definition_extent": "7:3-7:21",
"variable_type": 0,
2017-12-24 00:49:11 +00:00
"cls": 1,
2017-12-20 17:43:26 +00:00
"uses": ["7:8-7:12"]
2017-05-23 06:47:27 +00:00
}]
}
*/