| 1 |
static int helper() { |
| 2 |
return 5; |
| 3 |
} |
| 4 |
|
| 5 |
class Foo { |
| 6 |
int x = helper(); |
| 7 |
}; |
| 8 |
|
| 9 |
/* |
| 10 |
OUTPUT: |
| 11 |
{ |
| 12 |
"includes": [], |
| 13 |
"skipped_ranges": [], |
| 14 |
"usr2func": [{ |
| 15 |
"usr": 9630503130605430498, |
| 16 |
"detailed_name": "static int helper()", |
| 17 |
"qual_name_offset": 11, |
| 18 |
"short_name": "helper", |
| 19 |
"spell": "1:12-1:18|1:1-3:2|2|-1", |
| 20 |
"bases": [], |
| 21 |
"vars": [], |
| 22 |
"callees": [], |
| 23 |
"kind": 12, |
| 24 |
"parent_kind": 1, |
| 25 |
"storage": 0, |
| 26 |
"declarations": [], |
| 27 |
"derived": [], |
| 28 |
"uses": ["6:11-6:17|36|-1"] |
| 29 |
}], |
| 30 |
"usr2type": [{ |
| 31 |
"usr": 452, |
| 32 |
"detailed_name": "", |
| 33 |
"qual_name_offset": 0, |
| 34 |
"short_name": "", |
| 35 |
"bases": [], |
| 36 |
"funcs": [], |
| 37 |
"types": [], |
| 38 |
"vars": [], |
| 39 |
"alias_of": 0, |
| 40 |
"kind": 0, |
| 41 |
"parent_kind": 0, |
| 42 |
"declarations": [], |
| 43 |
"derived": [], |
| 44 |
"instances": [4220150017963593039], |
| 45 |
"uses": [] |
| 46 |
}, { |
| 47 |
"usr": 15041163540773201510, |
| 48 |
"detailed_name": "class Foo {}", |
| 49 |
"qual_name_offset": 6, |
| 50 |
"short_name": "Foo", |
| 51 |
"spell": "5:7-5:10|5:1-7:2|2|-1", |
| 52 |
"bases": [], |
| 53 |
"funcs": [], |
| 54 |
"types": [], |
| 55 |
"vars": [{ |
| 56 |
"L": 4220150017963593039, |
| 57 |
"R": 0 |
| 58 |
}], |
| 59 |
"alias_of": 0, |
| 60 |
"kind": 5, |
| 61 |
"parent_kind": 1, |
| 62 |
"declarations": [], |
| 63 |
"derived": [], |
| 64 |
"instances": [], |
| 65 |
"uses": [] |
| 66 |
}], |
| 67 |
"usr2var": [{ |
| 68 |
"usr": 4220150017963593039, |
| 69 |
"detailed_name": "int Foo::x", |
| 70 |
"qual_name_offset": 4, |
| 71 |
"short_name": "x", |
| 72 |
"hover": "int Foo::x = helper()", |
| 73 |
"spell": "6:7-6:8|6:3-6:19|1026|-1", |
| 74 |
"type": 452, |
| 75 |
"kind": 8, |
| 76 |
"parent_kind": 5, |
| 77 |
"storage": 0, |
| 78 |
"declarations": [], |
| 79 |
"uses": [] |
| 80 |
}] |
| 81 |
} |
| 82 |
*/ |