ccls/tests/inheritance/function_override.cc

51 lines
1.0 KiB
C++
Raw Normal View History

2017-02-20 07:06:38 +00:00
class Root {
virtual void foo();
};
class Derived : public Root {
void foo() override {}
};
/*
OUTPUT:
{
"types": [{
"id": 0,
"usr": "c:@S@Root",
"short_name": "Root",
"qualified_name": "Root",
2017-02-21 04:05:03 +00:00
"definition": "1:1:7",
2017-02-20 07:06:38 +00:00
"derived": [1],
2017-02-21 05:16:45 +00:00
"funcs": [0],
2017-02-21 05:55:48 +00:00
"uses": ["*1:1:7", "*1:4:24"]
2017-02-20 07:06:38 +00:00
}, {
"id": 1,
"usr": "c:@S@Derived",
"short_name": "Derived",
"qualified_name": "Derived",
2017-02-21 04:05:03 +00:00
"definition": "1:4:7",
2017-02-20 07:06:38 +00:00
"parents": [0],
"funcs": [1],
2017-02-21 05:55:48 +00:00
"uses": ["*1:4:7"]
2017-02-20 07:06:38 +00:00
}],
"functions": [{
"id": 0,
"usr": "c:@S@Root@F@foo#",
"short_name": "foo",
"qualified_name": "Root::foo",
2017-02-21 04:05:03 +00:00
"declaration": "1:2:16",
2017-02-21 05:16:45 +00:00
"declaring_type": 0,
2017-02-20 07:06:38 +00:00
"derived": [1],
2017-02-21 05:34:46 +00:00
"uses": ["1:2:16"]
2017-02-20 07:06:38 +00:00
}, {
"id": 1,
"usr": "c:@S@Derived@F@foo#",
"short_name": "foo",
"qualified_name": "Derived::foo",
2017-02-21 04:05:03 +00:00
"definition": "1:5:8",
2017-02-20 07:06:38 +00:00
"declaring_type": 1,
"base": 0,
2017-02-21 05:34:46 +00:00
"uses": ["1:5:8"]
2017-02-20 07:06:38 +00:00
}],
"variables": []
}
*/