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