ccls/tests/inheritance/class_multiple_inherit.cc

46 lines
1002 B
C++
Raw Normal View History

2017-02-20 07:06:38 +00:00
class Root {};
class MiddleA : public Root {};
class MiddleB : public Root {};
class Derived : public MiddleA, public MiddleB {};
/*
OUTPUT:
{
"types": [{
"id": 0,
"usr": "c:@S@Root",
"short_name": "Root",
"qualified_name": "Root",
2017-04-05 08:06:18 +00:00
"definition": "1:7",
2017-02-20 07:06:38 +00:00
"derived": [1, 2],
2017-04-05 08:06:18 +00:00
"uses": ["*1:7", "*2:24", "*3:24"]
2017-02-20 07:06:38 +00:00
}, {
"id": 1,
"usr": "c:@S@MiddleA",
"short_name": "MiddleA",
"qualified_name": "MiddleA",
2017-04-05 08:06:18 +00:00
"definition": "2:7",
2017-02-20 07:06:38 +00:00
"parents": [0],
"derived": [3],
2017-04-05 08:06:18 +00:00
"uses": ["*2:7", "*4:24"]
2017-02-20 07:06:38 +00:00
}, {
"id": 2,
"usr": "c:@S@MiddleB",
"short_name": "MiddleB",
"qualified_name": "MiddleB",
2017-04-05 08:06:18 +00:00
"definition": "3:7",
2017-02-20 07:06:38 +00:00
"parents": [0],
"derived": [3],
2017-04-05 08:06:18 +00:00
"uses": ["*3:7", "*4:40"]
2017-02-20 07:06:38 +00:00
}, {
"id": 3,
"usr": "c:@S@Derived",
"short_name": "Derived",
"qualified_name": "Derived",
2017-04-05 08:06:18 +00:00
"definition": "4:7",
2017-02-20 07:06:38 +00:00
"parents": [1, 2],
2017-04-05 08:06:18 +00:00
"uses": ["*4:7"]
2017-03-08 00:21:23 +00:00
}]
2017-02-20 07:06:38 +00:00
}
2017-03-08 00:21:23 +00:00
*/