Misc improvement to indexer

* Make CXXConstructor span one more column to left/right
* Use OrigD to collect Decl::Record members
* Better comment parsing
* Limit lines of initializers and macro definition to 3
* Attribute macro arg uses to spelling loc
* Remove FuncDef::declaring_type
This commit is contained in:
Fangrui Song 2018-07-15 11:27:59 -07:00
parent dd05ad9f65
commit 814f054e6e
87 changed files with 66 additions and 207 deletions

View File

@ -23,11 +23,10 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:3-3:6|15041163540773201510|2|1026", "spell": "3:3-3:6|15041163540773201510|2|1026",
"extent": "3:3-3:11|15041163540773201510|2|0", "extent": "3:3-3:11|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
"uses": ["7:7-7:8|15041163540773201510|2|16420", "8:17-8:20|15041163540773201510|2|16420"], "uses": ["7:7-7:8|15041163540773201510|2|16676", "8:17-8:20|15041163540773201510|2|16676"],
"callees": [] "callees": []
}, { }, {
"usr": 4259594751088586730, "usr": 4259594751088586730,
@ -39,7 +38,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "6:6-6:9|0|1|2", "spell": "6:6-6:9|0|1|2",
"extent": "6:1-9:2|0|1|0", "extent": "6:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [10983126130596230582, 17165811951126099095], "vars": [10983126130596230582, 17165811951126099095],

View File

@ -28,11 +28,10 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:3-3:6|15041163540773201510|2|1026", "spell": "3:3-3:6|15041163540773201510|2|1026",
"extent": "3:3-3:11|15041163540773201510|2|0", "extent": "3:3-3:11|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
"uses": ["8:7-8:8|15041163540773201510|2|16420"], "uses": ["8:7-8:8|15041163540773201510|2|16676"],
"callees": [] "callees": []
}, { }, {
"usr": 4259594751088586730, "usr": 4259594751088586730,
@ -44,7 +43,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "7:6-7:9|0|1|2", "spell": "7:6-7:9|0|1|2",
"extent": "7:1-9:2|0|1|0", "extent": "7:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [1893354193220338759], "vars": [1893354193220338759],
@ -60,7 +58,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:3-4:4|15041163540773201510|2|1026", "spell": "4:3-4:4|15041163540773201510|2|1026",
"extent": "4:3-4:12|15041163540773201510|2|0", "extent": "4:3-4:12|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:10|0|1|2", "spell": "5:6-5:10|0|1|2",
"extent": "5:1-8:2|0|1|0", "extent": "5:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [449111627548814328, 17097499197730163115], "vars": [449111627548814328, 17097499197730163115],
@ -38,11 +37,10 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:3-2:7|13487927231218873822|2|1026", "spell": "2:3-2:7|13487927231218873822|2|1026",
"extent": "2:3-2:12|13487927231218873822|2|0", "extent": "2:3-2:12|13487927231218873822|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
"uses": ["6:8-6:12|13487927231218873822|2|16420", "7:15-7:19|13487927231218873822|2|16420"], "uses": ["6:8-6:12|13487927231218873822|2|16676", "7:15-7:19|13487927231218873822|2|16676"],
"callees": [] "callees": []
}], }],
"usr2type": [{ "usr2type": [{

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:6-4:9|15041163540773201510|2|1026", "spell": "4:6-4:9|15041163540773201510|2|1026",
"extent": "4:1-4:11|0|1|0", "extent": "4:1-4:11|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -38,7 +38,6 @@ OUTPUT: make_functions.h
"declarations": [], "declarations": [],
"spell": "7:3-7:9|14935975554338052500|2|1026", "spell": "7:3-7:9|14935975554338052500|2|1026",
"extent": "7:3-7:32|14935975554338052500|2|0", "extent": "7:3-7:32|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -54,7 +53,6 @@ OUTPUT: make_functions.h
"declarations": [], "declarations": [],
"spell": "6:3-6:9|14935975554338052500|2|1026", "spell": "6:3-6:9|14935975554338052500|2|1026",
"extent": "6:3-6:17|14935975554338052500|2|0", "extent": "6:3-6:17|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -70,7 +68,6 @@ OUTPUT: make_functions.h
"declarations": [], "declarations": [],
"spell": "5:3-5:9|14935975554338052500|2|1026", "spell": "5:3-5:9|14935975554338052500|2|1026",
"extent": "5:3-5:14|14935975554338052500|2|0", "extent": "5:3-5:14|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -86,7 +83,6 @@ OUTPUT: make_functions.h
"declarations": [], "declarations": [],
"spell": "8:3-8:9|14935975554338052500|2|1026", "spell": "8:3-8:9|14935975554338052500|2|1026",
"extent": "8:3-8:30|14935975554338052500|2|0", "extent": "8:3-8:30|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -145,7 +141,6 @@ OUTPUT: make_functions.cc
"kind": 0, "kind": 0,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [2555873744476712860, 2555873744476712860, 2555873744476712860], "vars": [2555873744476712860, 2555873744476712860, 2555873744476712860],
@ -161,7 +156,6 @@ OUTPUT: make_functions.cc
"declarations": [], "declarations": [],
"spell": "9:4-9:15|0|1|2", "spell": "9:4-9:15|0|1|2",
"extent": "9:1-11:2|0|1|0", "extent": "9:1-11:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [3908732770590594660], "vars": [3908732770590594660],
@ -177,7 +171,6 @@ OUTPUT: make_functions.cc
"declarations": [], "declarations": [],
"spell": "13:6-13:14|0|1|2", "spell": "13:6-13:14|0|1|2",
"extent": "13:1-18:2|0|1|0", "extent": "13:1-18:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -191,7 +184,6 @@ OUTPUT: make_functions.cc
"kind": 0, "kind": 0,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [16395392342608151399], "vars": [16395392342608151399],
@ -205,7 +197,6 @@ OUTPUT: make_functions.cc
"kind": 0, "kind": 0,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [180270746871803062, 180270746871803062, 180270746871803062], "vars": [180270746871803062, 180270746871803062, 180270746871803062],
@ -221,7 +212,6 @@ OUTPUT: make_functions.cc
"declarations": [], "declarations": [],
"spell": "4:4-4:14|0|1|2", "spell": "4:4-4:14|0|1|2",
"extent": "4:1-6:2|0|1|0", "extent": "4:1-6:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [8463700030555379526], "vars": [8463700030555379526],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": ["1:6-1:9|0|1|1", "2:6-2:9|0|1|1", "4:6-4:9|0|1|1"], "declarations": ["1:6-1:9|0|1|1", "2:6-2:9|0|1|1", "4:6-4:9|0|1|1"],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-3:14|0|1|0", "extent": "3:1-3:14|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": ["1:5-1:8|0|1|1", "2:5-2:8|0|1|1", "4:5-4:8|0|1|1"], "declarations": ["1:5-1:8|0|1|1", "2:5-2:8|0|1|1", "4:5-4:8|0|1|1"],
"spell": "5:5-5:8|0|1|2", "spell": "5:5-5:8|0|1|2",
"extent": "5:1-5:36|0|1|0", "extent": "5:1-5:36|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [14555488990109936920, 10963664335057337329], "vars": [14555488990109936920, 10963664335057337329],

View File

@ -19,7 +19,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:8-2:16|15041163540773201510|2|1025"], "declarations": ["2:8-2:16|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -33,7 +32,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["3:16-3:27|15041163540773201510|2|1089"], "declarations": ["3:16-3:27|15041163540773201510|2|1089"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -49,7 +47,6 @@ OUTPUT:
"declarations": ["4:8-4:11|15041163540773201510|2|1025"], "declarations": ["4:8-4:11|15041163540773201510|2|1025"],
"spell": "7:11-7:14|15041163540773201510|2|1026", "spell": "7:11-7:14|15041163540773201510|2|1026",
"extent": "7:1-7:19|0|1|0", "extent": "7:1-7:19|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -13,7 +13,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["1:6-1:9|0|1|1"], "declarations": ["1:6-1:9|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -17,7 +17,6 @@ OUTPUT:
"declarations": ["1:6-1:9|0|1|1"], "declarations": ["1:6-1:9|0|1|1"],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-3:14|0|1|0", "extent": "3:1-3:14|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -15,7 +15,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-1:14|0|1|0", "extent": "1:1-1:14|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -20,7 +20,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:8-5:11|10963370434658308541|2|5186", "spell": "5:8-5:11|10963370434658308541|2|5186",
"extent": "5:3-5:25|10963370434658308541|2|0", "extent": "5:3-5:25|10963370434658308541|2|0",
"declaring_type": 0,
"bases": [9948027785633571339], "bases": [9948027785633571339],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -34,7 +33,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:16-2:19|3897841498936210886|2|1089"], "declarations": ["2:16-2:19|3897841498936210886|2|1089"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [6666242542855173890], "derived": [6666242542855173890],
"vars": [], "vars": [],

View File

@ -15,7 +15,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:16-2:19|9949214233977131946|2|1089"], "declarations": ["2:16-2:19|9949214233977131946|2|1089"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -23,7 +23,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:11-5:12|15826803741381445676|2|1090", "spell": "5:11-5:12|15826803741381445676|2|1090",
"extent": "5:3-5:23|15826803741381445676|2|0", "extent": "5:3-5:23|15826803741381445676|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -39,7 +38,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "8:3-8:4|10963370434658308541|2|5186", "spell": "8:3-8:4|10963370434658308541|2|5186",
"extent": "8:3-8:26|10963370434658308541|2|0", "extent": "8:3-8:26|10963370434658308541|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -55,7 +53,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:11-2:12|11628904180681204356|2|1090", "spell": "2:11-2:12|11628904180681204356|2|1090",
"extent": "2:3-2:23|11628904180681204356|2|0", "extent": "2:3-2:23|11628904180681204356|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -26,7 +26,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-12:2|0|1|0", "extent": "1:1-12:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [12666114896600231317, 2981279427664991319], "vars": [12666114896600231317, 2981279427664991319],
@ -40,7 +39,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -85,7 +83,7 @@ OUTPUT:
"detailed_name": "(lambda) dosomething", "detailed_name": "(lambda) dosomething",
"qual_name_offset": 9, "qual_name_offset": 9,
"short_name": "dosomething", "short_name": "dosomething",
"hover": "(lambda) dosomething = [&x](int y) {\n ++x;\n ++y;\n }", "hover": "(lambda) dosomething",
"declarations": [], "declarations": [],
"spell": "4:8-4:19|4259594751088586730|3|2", "spell": "4:8-4:19|4259594751088586730|3|2",
"extent": "4:3-7:4|4259594751088586730|3|0", "extent": "4:3-7:4|4259594751088586730|3|0",

View File

@ -26,7 +26,6 @@ OUTPUT:
"declarations": ["12:1-12:20|0|1|1"], "declarations": ["12:1-12:20|0|1|1"],
"spell": "12:1-12:20|0|1|2", "spell": "12:1-12:20|0|1|2",
"extent": "1:1-1:1|0|1|0", "extent": "1:1-1:1|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -42,11 +41,10 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "6:5-6:10|0|1|2", "spell": "6:5-6:10|0|1|2",
"extent": "6:1-8:2|0|1|0", "extent": "6:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
"uses": ["12:1-12:20|0|1|16420", "12:5-12:10|0|1|64|0"], "uses": ["12:5-12:10|0|1|16420"],
"callees": [] "callees": []
}], }],
"usr2type": [{ "usr2type": [{
@ -75,7 +73,7 @@ OUTPUT:
"spell": "9:11-9:16|0|1|2", "spell": "9:11-9:16|0|1|2",
"extent": "9:1-9:20|0|1|0", "extent": "9:1-9:20|0|1|0",
"type": 53, "type": 53,
"uses": ["12:1-12:20|0|1|12", "12:14-12:19|0|1|64|0"], "uses": ["12:14-12:19|0|1|12"],
"kind": 13, "kind": 13,
"storage": 0 "storage": 0
}, { }, {

View File

@ -20,9 +20,8 @@ OUTPUT:
"kind": 9, "kind": 9,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"spell": "5:3-5:16|15041163540773201510|2|1026", "spell": "5:12-5:15|15041163540773201510|2|1026",
"extent": "1:1-1:1|15041163540773201510|2|0", "extent": "1:1-1:1|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -60,7 +59,7 @@ OUTPUT:
"funcs": [13788753348312146871], "funcs": [13788753348312146871],
"vars": [], "vars": [],
"instances": [], "instances": [],
"uses": ["5:3-5:16|0|1|4", "5:12-5:15|0|1|64|0"] "uses": ["5:12-5:15|0|1|4"]
}], }],
"usr2var": [{ "usr2var": [{
"usr": 1569772797058982873, "usr": 1569772797058982873,

View File

@ -19,7 +19,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:8-2:11|15041163540773201510|2|1025"], "declarations": ["2:8-2:11|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": ["2:8-2:11|15041163540773201510|2|1025"], "declarations": ["2:8-2:11|15041163540773201510|2|1025"],
"spell": "5:11-5:14|15041163540773201510|2|1026", "spell": "5:11-5:14|15041163540773201510|2|1026",
"extent": "5:1-5:25|0|1|0", "extent": "5:1-5:25|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -17,7 +17,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:8-2:11|15041163540773201510|2|1026", "spell": "2:8-2:11|15041163540773201510|2|1026",
"extent": "2:3-2:16|15041163540773201510|2|0", "extent": "2:3-2:16|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,7 +19,6 @@ OUTPUT: header.h
"declarations": [], "declarations": [],
"spell": "10:6-10:10|0|1|2", "spell": "10:6-10:10|0|1|2",
"extent": "10:1-10:15|0|1|0", "extent": "10:1-10:15|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -209,7 +208,6 @@ OUTPUT: impl.cc
"declarations": [], "declarations": [],
"spell": "3:6-3:10|0|1|2", "spell": "3:6-3:10|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -223,7 +221,6 @@ OUTPUT: impl.cc
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -17,7 +17,6 @@ OUTPUT: simple_header.h
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["3:6-3:12|0|1|1"], "declarations": ["3:6-3:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -44,7 +43,6 @@ OUTPUT: simple_impl.cc
"declarations": [], "declarations": [],
"spell": "3:6-3:10|0|1|2", "spell": "3:6-3:10|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -58,7 +56,6 @@ OUTPUT: simple_impl.cc
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": [], "declarations": [],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -15,7 +15,6 @@ OUTPUT: static.h
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["4:15-4:33|9411323049603567600|2|1025"], "declarations": ["4:15-4:33|9411323049603567600|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -59,7 +58,6 @@ OUTPUT: static.cc
"declarations": [], "declarations": [],
"spell": "3:14-3:32|9411323049603567600|2|1026", "spell": "3:14-3:32|9411323049603567600|2|1026",
"extent": "3:1-3:37|0|1|0", "extent": "3:1-3:37|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -15,7 +15,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["2:6-2:9|7144845543074395457|2|1"], "declarations": ["2:6-2:9|7144845543074395457|2|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -15,7 +15,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["2:6-2:9|2029211996748007610|2|1025"], "declarations": ["2:6-2:9|2029211996748007610|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -17,7 +17,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:6-2:9|2029211996748007610|2|1026", "spell": "2:6-2:9|2029211996748007610|2|1026",
"extent": "2:1-2:14|2029211996748007610|2|0", "extent": "2:1-2:14|2029211996748007610|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -17,7 +17,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["3:8-3:11|4508214972876735896|2|1025"], "declarations": ["3:8-3:11|4508214972876735896|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": ["3:8-3:11|4508214972876735896|2|1025"], "declarations": ["3:8-3:11|4508214972876735896|2|1025"],
"spell": "6:11-6:14|4508214972876735896|2|1026", "spell": "6:11-6:14|4508214972876735896|2|1026",
"extent": "6:1-6:19|2029211996748007610|2|0", "extent": "6:1-6:19|2029211996748007610|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:8-3:11|4508214972876735896|2|1026", "spell": "3:8-3:11|4508214972876735896|2|1026",
"extent": "3:3-3:16|4508214972876735896|2|0", "extent": "3:3-3:16|4508214972876735896|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -28,7 +28,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "11:6-11:10|0|1|2", "spell": "11:6-11:10|0|1|2",
"extent": "11:1-14:2|0|1|0", "extent": "11:1-14:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [6030927277961448585, 7657277353101371136], "vars": [6030927277961448585, 7657277353101371136],

View File

@ -24,7 +24,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "6:6-6:12|0|1|2", "spell": "6:6-6:12|0|1|2",
"extent": "6:1-10:2|0|1|0", "extent": "6:1-10:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -40,7 +39,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:8-3:14|11072669167287398027|2|1026", "spell": "3:8-3:14|11072669167287398027|2|1026",
"extent": "3:3-3:24|11072669167287398027|2|0", "extent": "3:3-3:24|11072669167287398027|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [3649375698083002347], "vars": [3649375698083002347],

View File

@ -19,7 +19,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["3:8-3:16|15041163540773201510|2|1025"], "declarations": ["3:8-3:16|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -33,7 +32,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["4:7-4:15|15041163540773201510|2|1025"], "declarations": ["4:7-4:15|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -49,7 +47,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:8-2:16|15041163540773201510|2|1026", "spell": "2:8-2:16|15041163540773201510|2|1026",
"extent": "2:3-2:27|15041163540773201510|2|0", "extent": "2:3-2:27|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -63,7 +60,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["7:6-7:14|0|1|1"], "declarations": ["7:6-7:14|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,7 +19,6 @@ OUTPUT: static_function_in_type.h
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["6:15-6:23|17262466801709381811|2|1025"], "declarations": ["6:15-6:23|17262466801709381811|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -94,7 +93,6 @@ OUTPUT: static_function_in_type.cc
"declarations": [], "declarations": [],
"spell": "5:11-5:19|17262466801709381811|2|1026", "spell": "5:11-5:19|17262466801709381811|2|1026",
"extent": "5:1-6:2|11072669167287398027|2|0", "extent": "5:1-6:2|11072669167287398027|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [13569879755236306838], "vars": [13569879755236306838],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": ["5:8-5:11|15041163540773201510|2|1025"], "declarations": ["5:8-5:11|15041163540773201510|2|1025"],
"spell": "8:11-8:14|15041163540773201510|2|1026", "spell": "8:11-8:14|15041163540773201510|2|1026",
"extent": "8:1-8:36|0|1|0", "extent": "8:1-8:36|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -35,7 +35,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "8:6-8:9|0|1|2", "spell": "8:6-8:9|0|1|2",
"extent": "8:1-8:11|0|1|0", "extent": "8:1-8:11|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -49,7 +48,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["4:8-4:11|8402783583255987702|2|1025"], "declarations": ["4:8-4:11|8402783583255987702|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -26,7 +26,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:16-5:19|14042997404480181958|2|1026", "spell": "5:16-5:19|14042997404480181958|2|1026",
"extent": "5:5-7:6|14042997404480181958|2|0", "extent": "5:5-7:6|14042997404480181958|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -55,7 +55,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["43:6-43:9|0|1|1"], "declarations": ["43:6-43:9|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -69,7 +68,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["27:8-27:13|1663022413889915338|2|1025"], "declarations": ["27:8-27:13|1663022413889915338|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -85,7 +83,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "39:6-39:9|0|1|2", "spell": "39:6-39:9|0|1|2",
"extent": "39:1-39:21|0|1|0", "extent": "39:1-39:21|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [17826688417349629938], "vars": [17826688417349629938],
@ -99,7 +96,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["13:8-13:13|7440942986741176606|2|1025"], "declarations": ["13:8-13:13|7440942986741176606|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -32,7 +32,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "10:22-10:25|17649312483543982122|2|1026", "spell": "10:22-10:25|17649312483543982122|2|1026",
"extent": "9:1-10:30|0|1|0", "extent": "9:1-10:30|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -48,7 +47,6 @@ OUTPUT:
"declarations": ["3:8-3:11|17107291254533526269|2|1025"], "declarations": ["3:8-3:11|17107291254533526269|2|1025"],
"spell": "7:19-7:22|17107291254533526269|2|1026", "spell": "7:19-7:22|17107291254533526269|2|1026",
"extent": "6:1-7:24|0|1|0", "extent": "6:1-7:24|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -23,7 +23,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:14-3:17|10528472276654770367|2|1026", "spell": "3:14-3:17|10528472276654770367|2|1026",
"extent": "3:3-5:4|10528472276654770367|2|0", "extent": "3:3-5:4|10528472276654770367|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -24,7 +24,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:14-4:17|10528472276654770367|2|1026", "spell": "4:14-4:17|10528472276654770367|2|1026",
"extent": "4:3-6:4|10528472276654770367|2|0", "extent": "4:3-6:4|10528472276654770367|2|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -24,7 +24,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:12-2:15|0|1|2", "spell": "2:12-2:15|0|1|2",
"extent": "2:1-4:2|0|1|0", "extent": "2:1-4:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -14,7 +14,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["2:13-2:14|0|1|1"], "declarations": ["2:13-2:14|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -26,7 +26,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "8:6-8:9|0|1|2", "spell": "8:6-8:9|0|1|2",
"extent": "8:1-10:2|0|1|0", "extent": "8:1-10:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -23,7 +23,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:12|0|1|2", "spell": "1:6-1:12|0|1|2",
"extent": "1:1-1:17|0|1|0", "extent": "1:1-1:17|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -39,7 +38,6 @@ OUTPUT:
"declarations": ["4:3-4:6|15041163540773201510|2|1025"], "declarations": ["4:3-4:6|15041163540773201510|2|1025"],
"spell": "7:6-7:9|15041163540773201510|2|1026", "spell": "7:6-7:9|15041163540773201510|2|1026",
"extent": "7:1-9:2|0|1|0", "extent": "7:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,11 +19,10 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["3:6-3:12|0|1|1"], "declarations": ["3:6-3:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
"uses": ["6:3-6:33|0|1|16420", "6:14-6:20|0|1|64|0"], "uses": ["6:14-6:20|0|1|16420"],
"callees": [] "callees": []
}, { }, {
"usr": 11404881820527069090, "usr": 11404881820527069090,
@ -35,7 +34,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:12|0|1|2", "spell": "5:6-5:12|0|1|2",
"extent": "5:1-7:2|0|1|0", "extent": "5:1-7:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -24,7 +24,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["1:6-1:12|0|1|1"], "declarations": ["1:6-1:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -40,7 +39,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "8:6-8:9|0|1|2", "spell": "8:6-8:9|0|1|2",
"extent": "8:1-10:2|0|1|0", "extent": "8:1-10:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -56,7 +54,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:6-4:12|0|1|2", "spell": "4:6-4:12|0|1|2",
"extent": "4:1-6:2|0|1|0", "extent": "4:1-6:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -23,7 +23,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:5-5:11|0|1|2", "spell": "5:5-5:11|0|1|2",
"extent": "5:1-5:27|0|1|0", "extent": "5:1-5:27|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -37,11 +36,10 @@ OUTPUT:
"kind": 9, "kind": 9,
"storage": 0, "storage": 0,
"declarations": ["2:3-2:10|13611487872560323389|2|1025"], "declarations": ["2:3-2:10|13611487872560323389|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
"uses": ["8:10-8:16|13611487872560323389|2|16420"], "uses": ["8:10-8:16|13611487872560323389|2|16676"],
"callees": [] "callees": []
}, { }, {
"usr": 11404881820527069090, "usr": 11404881820527069090,
@ -53,7 +51,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "7:9-7:15|0|1|2", "spell": "7:9-7:15|0|1|2",
"extent": "7:1-9:2|0|1|0", "extent": "7:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:10|0|1|2", "spell": "3:6-3:10|0|1|2",
"extent": "3:1-3:15|0|1|0", "extent": "3:1-3:15|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -38,7 +37,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:10|0|1|2", "spell": "5:6-5:10|0|1|2",
"extent": "5:1-8:2|0|1|0", "extent": "5:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [16088407831770615719], "vars": [16088407831770615719],
@ -54,7 +52,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:13|0|1|2", "spell": "1:6-1:13|0|1|2",
"extent": "1:1-1:28|0|1|0", "extent": "1:1-1:28|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:10|0|1|2", "spell": "5:6-5:10|0|1|2",
"extent": "5:1-7:2|0|1|0", "extent": "5:1-7:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [4636142131003982569], "vars": [4636142131003982569],
@ -36,7 +35,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:8-2:12|15041163540773201510|2|1025"], "declarations": ["2:8-2:12|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -18,7 +18,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:12|0|1|2", "spell": "1:6-1:12|0|1|2",
"extent": "1:1-1:17|0|1|0", "extent": "1:1-1:17|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -34,7 +33,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:6-2:12|0|1|2", "spell": "2:6-2:12|0|1|2",
"extent": "2:1-4:2|0|1|0", "extent": "2:1-4:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:10|0|1|2", "spell": "5:6-5:10|0|1|2",
"extent": "5:1-8:2|0|1|0", "extent": "5:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [14045150712868309451], "vars": [14045150712868309451],
@ -36,7 +35,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:8-2:12|15041163540773201510|2|1025"], "declarations": ["2:8-2:12|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:12-1:18|0|1|2", "spell": "1:12-1:18|0|1|2",
"extent": "1:1-3:2|0|1|0", "extent": "1:1-3:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -16,7 +16,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["1:6-1:9|0|1|1"], "declarations": ["1:6-1:9|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -32,7 +31,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:11|0|1|2", "spell": "3:6-3:11|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:11|0|1|2", "spell": "5:6-5:11|0|1|2",
"extent": "5:1-8:2|0|1|0", "extent": "5:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [16229832321010999607], "vars": [16229832321010999607],
@ -35,7 +34,6 @@ OUTPUT:
"kind": 6, "kind": 6,
"storage": 0, "storage": 0,
"declarations": ["2:8-2:11|15041163540773201510|2|1025"], "declarations": ["2:8-2:11|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:6-4:9|0|1|2", "spell": "4:6-4:9|0|1|2",
"extent": "4:1-7:2|0|1|0", "extent": "4:1-7:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -35,7 +34,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["2:6-2:12|0|1|1"], "declarations": ["2:6-2:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -25,7 +25,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "9:16-9:27|0|1|2", "spell": "9:16-9:27|0|1|2",
"extent": "9:1-12:2|0|1|0", "extent": "9:1-12:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [3364438781074774169], "vars": [3364438781074774169],

View File

@ -93,7 +93,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "33:37-33:51|0|1|2", "spell": "33:37-33:51|0|1|2",
"extent": "33:1-33:92|0|1|0", "extent": "33:1-33:92|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -109,7 +108,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "40:6-40:20|0|1|2", "spell": "40:6-40:20|0|1|2",
"extent": "40:1-40:28|0|1|0", "extent": "40:1-40:28|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -125,7 +123,6 @@ OUTPUT:
"declarations": ["65:23-65:26|15041163540773201510|2|1025"], "declarations": ["65:23-65:26|15041163540773201510|2|1025"],
"spell": "79:26-79:29|15041163540773201510|2|1026", "spell": "79:26-79:29|15041163540773201510|2|1026",
"extent": "79:1-79:51|0|1|0", "extent": "79:1-79:51|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -141,7 +138,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "53:6-53:11|0|1|2", "spell": "53:6-53:11|0|1|2",
"extent": "53:1-55:2|0|1|0", "extent": "53:1-55:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [500112618220246], "vars": [500112618220246],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:6-4:9|0|1|2", "spell": "4:6-4:9|0|1|2",
"extent": "4:1-7:2|0|1|0", "extent": "4:1-7:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [16374832544037266261, 2580122838476012357], "vars": [16374832544037266261, 2580122838476012357],

View File

@ -18,7 +18,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "4:6-4:9|0|1|2", "spell": "4:6-4:9|0|1|2",
"extent": "4:1-4:47|0|1|0", "extent": "4:1-4:47|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [13058491096576226774, 11055777568039014776], "vars": [13058491096576226774, 11055777568039014776],

View File

@ -23,7 +23,6 @@ OUTPUT:
"declarations": ["3:6-3:9|0|1|1"], "declarations": ["3:6-3:9|0|1|1"],
"spell": "4:6-4:9|0|1|2", "spell": "4:6-4:9|0|1|2",
"extent": "4:1-4:26|0|1|0", "extent": "4:1-4:26|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [13823260660189154978], "vars": [13823260660189154978],

View File

@ -15,7 +15,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:6-2:9|0|1|2", "spell": "2:6-2:9|0|1|2",
"extent": "2:1-2:26|0|1|0", "extent": "2:1-2:26|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-8:2|0|1|0", "extent": "3:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [7997456978847868736, 17228576662112939520, 15429032129697337561, 6081981442495435784, 5004072032239834773, 14939253431683105646], "vars": [7997456978847868736, 17228576662112939520, 15429032129697337561, 6081981442495435784, 5004072032239834773, 14939253431683105646],

View File

@ -32,7 +32,6 @@ OUTPUT:
"declarations": ["9:8-9:13|15041163540773201510|2|1025"], "declarations": ["9:8-9:13|15041163540773201510|2|1025"],
"spell": "13:11-13:16|15041163540773201510|2|1026", "spell": "13:11-13:16|15041163540773201510|2|1026",
"extent": "13:1-13:21|0|1|0", "extent": "13:1-13:21|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -48,7 +47,6 @@ OUTPUT:
"declarations": ["3:7-3:10|0|1|1", "4:7-4:10|0|1|1"], "declarations": ["3:7-3:10|0|1|1", "4:7-4:10|0|1|1"],
"spell": "5:7-5:10|0|1|2", "spell": "5:7-5:10|0|1|2",
"extent": "5:1-5:32|0|1|0", "extent": "5:1-5:32|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -62,7 +60,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["15:20-15:28|0|1|1"], "declarations": ["15:20-15:28|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -78,7 +75,6 @@ OUTPUT:
"declarations": ["8:9-8:12|15041163540773201510|2|1025"], "declarations": ["8:9-8:12|15041163540773201510|2|1025"],
"spell": "12:12-12:15|15041163540773201510|2|1026", "spell": "12:12-12:15|15041163540773201510|2|1026",
"extent": "12:1-12:40|0|1|0", "extent": "12:1-12:40|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -94,7 +90,6 @@ OUTPUT:
"declarations": ["17:14-17:17|0|1|1"], "declarations": ["17:14-17:17|0|1|1"],
"spell": "18:14-18:17|0|1|2", "spell": "18:14-18:17|0|1|2",
"extent": "18:1-18:39|0|1|0", "extent": "18:1-18:39|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -24,7 +24,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "8:6-8:13|0|1|2", "spell": "8:6-8:13|0|1|2",
"extent": "8:1-8:23|0|1|0", "extent": "8:1-8:23|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -40,7 +39,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "7:6-7:12|0|1|2", "spell": "7:6-7:12|0|1|2",
"extent": "7:1-7:21|0|1|0", "extent": "7:1-7:21|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -56,7 +54,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "9:6-9:13|0|1|2", "spell": "9:6-9:13|0|1|2",
"extent": "9:1-9:23|0|1|0", "extent": "9:1-9:23|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -72,7 +69,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "10:6-10:13|0|1|2", "spell": "10:6-10:13|0|1|2",
"extent": "10:1-10:23|0|1|0", "extent": "10:1-10:23|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -24,7 +24,6 @@ OUTPUT:
"declarations": ["2:8-2:12|15041163540773201510|2|1025"], "declarations": ["2:8-2:12|15041163540773201510|2|1025"],
"spell": "5:11-5:15|15041163540773201510|2|1026", "spell": "5:11-5:15|15041163540773201510|2|1026",
"extent": "5:1-8:2|0|1|0", "extent": "5:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [16380484338511689669], "vars": [16380484338511689669],

View File

@ -29,7 +29,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "12:6-12:9|0|1|2", "spell": "12:6-12:9|0|1|2",
"extent": "12:1-15:2|0|1|0", "extent": "12:1-15:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [8039186520399841081], "vars": [8039186520399841081],
@ -43,7 +42,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["3:5-3:8|0|1|1"], "declarations": ["3:5-3:8|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -57,7 +55,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["1:6-1:12|0|1|1"], "declarations": ["1:6-1:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "5:6-5:9|0|1|2", "spell": "5:6-5:9|0|1|2",
"extent": "5:1-7:2|0|1|0", "extent": "5:1-7:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -37,7 +36,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:5-3:8|0|1|2", "spell": "3:5-3:8|0|1|2",
"extent": "3:1-3:24|0|1|0", "extent": "3:1-3:24|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -51,7 +49,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["1:6-1:12|0|1|1"], "declarations": ["1:6-1:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:12|0|1|2", "spell": "1:6-1:12|0|1|2",
"extent": "1:1-1:17|0|1|0", "extent": "1:1-1:17|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -38,7 +37,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:12|0|1|2", "spell": "3:6-3:12|0|1|2",
"extent": "3:1-8:2|0|1|0", "extent": "3:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [9121974011454213596], "vars": [9121974011454213596],

View File

@ -32,7 +32,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "10:6-10:9|0|1|2", "spell": "10:6-10:9|0|1|2",
"extent": "10:1-18:2|0|1|0", "extent": "10:1-18:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [14669930844300034456], "vars": [14669930844300034456],
@ -46,7 +45,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["8:6-8:12|0|1|1"], "declarations": ["8:6-8:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -60,7 +58,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["7:6-7:12|0|1|1"], "declarations": ["7:6-7:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -23,7 +23,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "7:6-7:9|0|1|2", "spell": "7:6-7:9|0|1|2",
"extent": "7:1-9:2|0|1|0", "extent": "7:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],
@ -37,7 +36,6 @@ OUTPUT:
"kind": 12, "kind": 12,
"storage": 0, "storage": 0,
"declarations": ["5:6-5:12|0|1|1"], "declarations": ["5:6-5:12|0|1|1"],
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -18,7 +18,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -16,7 +16,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-3:2|0|1|0", "extent": "1:1-3:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [10063793875496522529], "vars": [10063793875496522529],

View File

@ -17,7 +17,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-4:2|0|1|0", "extent": "1:1-4:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [14014650769929566957], "vars": [14014650769929566957],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-9:2|0|1|0", "extent": "1:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [13311055950748663970, 14036425367303419504], "vars": [13311055950748663970, 14036425367303419504],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-8:2|0|1|0", "extent": "1:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [11608231465452906059, 6997229590862003559], "vars": [11608231465452906059, 6997229590862003559],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "2:6-2:7|0|1|2", "spell": "2:6-2:7|0|1|2",
"extent": "2:1-5:2|0|1|0", "extent": "2:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [10601729374837386290, 18422884837902130475], "vars": [10601729374837386290, 18422884837902130475],

View File

@ -19,7 +19,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [13198746475679542317], "vars": [13198746475679542317],

View File

@ -17,7 +17,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-3:30|0|1|0", "extent": "3:1-3:30|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [8730439006497971620, 2525014371090380500], "vars": [8730439006497971620, 2525014371090380500],

View File

@ -14,7 +14,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-1:22|0|1|0", "extent": "1:1-1:22|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [], "vars": [],

View File

@ -22,7 +22,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-9:2|0|1|0", "extent": "1:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [1894874819807168345, 4508045017817092115], "vars": [1894874819807168345, 4508045017817092115],

View File

@ -16,7 +16,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "1:6-1:9|0|1|2", "spell": "1:6-1:9|0|1|2",
"extent": "1:1-3:2|0|1|0", "extent": "1:1-3:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [5875271969926422921, 11404600766177939811], "vars": [5875271969926422921, 11404600766177939811],

View File

@ -21,7 +21,6 @@ OUTPUT:
"declarations": [], "declarations": [],
"spell": "3:6-3:9|0|1|2", "spell": "3:6-3:9|0|1|2",
"extent": "3:1-5:2|0|1|0", "extent": "3:1-5:2|0|1|0",
"declaring_type": 0,
"bases": [], "bases": [],
"derived": [], "derived": [],
"vars": [6975456769752895964], "vars": [6975456769752895964],

View File

@ -505,10 +505,11 @@ void DiagnosticQueryMain(ClangCompleteManager *manager) {
E = tu->Unit->stored_diag_end(); E = tu->Unit->stored_diag_end();
I != E; ++I) { I != E; ++I) {
FullSourceLoc FLoc = I->getLocation(); FullSourceLoc FLoc = I->getLocation();
const auto &SM = FLoc.getManager(); if (!FLoc.isValid()) // why?
continue;
const FileEntry *FE = SM.getFileEntryForID(SM.getFileID(FLoc)); const FileEntry *FE = FLoc.getFileEntry();
if (!FE || FileName(*FE) != path) continue; if (!FE || FileName(*FE) != path) continue;
const auto &SM = FLoc.getManager();
SourceRange R; SourceRange R;
for (const auto &CR : I->getRanges()) { for (const auto &CR : I->getRanges()) {
auto RT = Lexer::makeFileCharRange(CR, SM, LangOpts); auto RT = Lexer::makeFileCharRange(CR, SM, LangOpts);

View File

@ -30,6 +30,8 @@ using llvm::Timer;
namespace { namespace {
constexpr int kInitializerMaxLines = 3;
struct IndexParam { struct IndexParam {
std::unordered_map<llvm::sys::fs::UniqueID, std::string> SeenUniqueID; std::unordered_map<llvm::sys::fs::UniqueID, std::string> SeenUniqueID;
std::unordered_map<std::string, FileContents> file_contents; std::unordered_map<std::string, FileContents> file_contents;
@ -327,7 +329,7 @@ public:
if (pad < 0) { if (pad < 0) {
// First line, detect the length of comment marker and put into |pad| // First line, detect the length of comment marker and put into |pad|
const char *begin = p; const char *begin = p;
while (p < E && (*p == '/' || *p == '*')) while (p < E && (*p == '/' || *p == '*' || *p == '-' || *p == '='))
p++; p++;
if (p < E && (*p == '<' || *p == '!')) if (p < E && (*p == '<' || *p == '!'))
p++; p++;
@ -488,9 +490,11 @@ public:
if (!SM.isBeforeInTranslationUnit(L, R.getBegin())) if (!SM.isBeforeInTranslationUnit(L, R.getBegin()))
return; return;
StringRef Buf = GetSourceInRange(SM, Lang, R); StringRef Buf = GetSourceInRange(SM, Lang, R);
Twine T = Twine T = Buf.count('\n') <= kInitializerMaxLines - 1
def.detailed_name + ? def.detailed_name + (Buf.size() && Buf[0] == ':'
(Buf.size() && Buf[0] == ':' ? Twine(" ", Buf) : Twine(" = ", Buf)); ? Twine(" ", Buf)
: Twine(" = ", Buf))
: def.detailed_name;
def.hover = def.hover =
def.storage == SC_Static && strncmp(def.detailed_name, "static ", 7) def.storage == SC_Static && strncmp(def.detailed_name, "static ", 7)
? Intern(("static " + T).str()) ? Intern(("static " + T).str())
@ -568,7 +572,8 @@ public:
LocFID = SM.getFileID(P.first); LocFID = SM.getFileID(P.first);
FE = SM.getFileEntryForID(LocFID); FE = SM.getFileEntryForID(LocFID);
#else #else
auto R = SM.getExpansionRange(Loc); auto R = SM.isMacroArgExpansion(Loc) ? CharSourceRange::getTokenRange(Spell)
: SM.getExpansionRange(Loc);
loc = FromTokenRange(SM, Lang, R.getAsRange()); loc = FromTokenRange(SM, Lang, R.getAsRange());
LocFID = SM.getFileID(R.getBegin()); LocFID = SM.getFileID(R.getBegin());
FE = SM.getFileEntryForID(LocFID); FE = SM.getFileEntryForID(LocFID);
@ -618,6 +623,9 @@ public:
return true; return true;
case SymbolKind::Func: case SymbolKind::Func:
func = &db->ToFunc(usr); func = &db->ToFunc(usr);
// Span one more column to the left/right if D is CXXConstructor.
if (!is_def && !is_decl && D->getKind() == Decl::CXXConstructor)
role = Role(role | Role::Implicit);
do_def_decl(func); do_def_decl(func);
if (Spell != Loc) if (Spell != Loc)
AddMacroUse(db, SM, usr, SymbolKind::Func, Spell); AddMacroUse(db, SM, usr, SymbolKind::Func, Spell);
@ -752,45 +760,46 @@ public:
case Decl::Enum: case Decl::Enum:
type->def.kind = lsSymbolKind::Enum; type->def.kind = lsSymbolKind::Enum;
break; break;
case Decl::CXXRecord: { case Decl::CXXRecord:
auto *RD = cast<CXXRecordDecl>(D); if (is_def) {
if (is_def && RD->hasDefinition()) { auto *RD = dyn_cast<CXXRecordDecl>(OrigD);
for (const CXXBaseSpecifier &Base : RD->bases()) { if (RD && RD->hasDefinition()) {
QualType T = Base.getType(); for (const CXXBaseSpecifier &Base : RD->bases()) {
const NamedDecl *BaseD = nullptr; QualType T = Base.getType();
if (auto *TDT = T->getAs<TypedefType>()) { const NamedDecl *BaseD = nullptr;
BaseD = TDT->getDecl(); if (auto *TDT = T->getAs<TypedefType>()) {
} else if (auto *TST = T->getAs<TemplateSpecializationType>()) { BaseD = TDT->getDecl();
BaseD = TST->getTemplateName().getAsTemplateDecl(); } else if (auto *TST = T->getAs<TemplateSpecializationType>()) {
} else if (auto *RT = T->getAs<RecordType>()) { BaseD = TST->getTemplateName().getAsTemplateDecl();
BaseD = RT->getDecl(); } else if (auto *RT = T->getAs<RecordType>()) {
} BaseD = RT->getDecl();
if (BaseD) { }
Usr usr1 = GetUsr(BaseD); if (BaseD) {
auto it = db->usr2type.find(usr1); Usr usr1 = GetUsr(BaseD);
if (it != db->usr2type.end()) { auto it = db->usr2type.find(usr1);
type->def.bases.push_back(usr1); if (it != db->usr2type.end()) {
it->second.derived.push_back(usr); type->def.bases.push_back(usr1);
it->second.derived.push_back(usr);
}
} }
} }
} }
} }
}
[[fallthrough]]; [[fallthrough]];
case Decl::Record: { case Decl::Record:
auto *RD = cast<RecordDecl>(D); if (auto *RD = dyn_cast<RecordDecl>(OrigD)) {
// spec has no Union, use Class // spec has no Union, use Class
type->def.kind = RD->getTagKind() == TTK_Struct ? lsSymbolKind::Struct type->def.kind = RD->getTagKind() == TTK_Struct ? lsSymbolKind::Struct
: lsSymbolKind::Class; : lsSymbolKind::Class;
if (is_def) { if (is_def) {
bool can_get_offset = bool can_get_offset =
RD->isCompleteDefinition() && !RD->isDependentType(); RD->isCompleteDefinition() && !RD->isDependentType();
for (FieldDecl *FD : RD->fields()) for (FieldDecl *FD : RD->fields())
type->def.vars.emplace_back( type->def.vars.emplace_back(
GetUsr(FD), can_get_offset ? Ctx->getFieldOffset(FD) : -1); GetUsr(FD), can_get_offset ? Ctx->getFieldOffset(FD) : -1);
}
} }
break; break;
}
case Decl::ClassTemplateSpecialization: case Decl::ClassTemplateSpecialization:
case Decl::ClassTemplatePartialSpecialization: case Decl::ClassTemplatePartialSpecialization:
type->def.kind = lsSymbolKind::Class; type->def.kind = lsSymbolKind::Class;
@ -960,7 +969,11 @@ public:
if (var.def.detailed_name[0] == '\0') { if (var.def.detailed_name[0] == '\0') {
var.def.detailed_name = Intern(Name); var.def.detailed_name = Intern(Name);
var.def.short_name_size = Name.size(); var.def.short_name_size = Name.size();
var.def.hover = Intern(Twine("#define ", GetSourceInRange(SM, Lang, R)).str()); StringRef Buf = GetSourceInRange(SM, Lang, R);
var.def.hover =
Intern(Buf.count('\n') <= kInitializerMaxLines - 1
? Twine("#define ", GetSourceInRange(SM, Lang, R)).str()
: Twine("#define ", Name).str());
} }
} }
} }
@ -1009,7 +1022,7 @@ public:
} }
const int IndexFile::kMajorVersion = 17; const int IndexFile::kMajorVersion = 17;
const int IndexFile::kMinorVersion = 0; const int IndexFile::kMinorVersion = 1;
IndexFile::IndexFile(llvm::sys::fs::UniqueID UniqueID, const std::string &path, IndexFile::IndexFile(llvm::sys::fs::UniqueID UniqueID, const std::string &path,
const std::string &contents) const std::string &contents)

View File

@ -104,8 +104,6 @@ struct FuncDef : NameMixin<FuncDef> {
// Functions that this function calls. // Functions that this function calls.
std::vector<SymbolRef> callees; std::vector<SymbolRef> callees;
// Type which declares this one (ie, it is a method)
Usr declaring_type = 0;
int16_t qual_name_offset = 0; int16_t qual_name_offset = 0;
int16_t short_name_offset = 0; int16_t short_name_offset = 0;
int16_t short_name_size = 0; int16_t short_name_size = 0;
@ -125,7 +123,6 @@ MAKE_REFLECT_STRUCT(FuncDef,
comments, comments,
spell, spell,
extent, extent,
declaring_type,
bases, bases,
vars, vars,
callees); callees);
@ -202,7 +199,6 @@ struct VarDef : NameMixin<VarDef> {
// Type of the variable. // Type of the variable.
Usr type = 0; Usr type = 0;
// Function/type which declares this one.
int16_t qual_name_offset = 0; int16_t qual_name_offset = 0;
int16_t short_name_offset = 0; int16_t short_name_offset = 0;
int16_t short_name_size = 0; int16_t short_name_size = 0;

View File

@ -292,7 +292,6 @@ void Reflect(TVisitor& visitor, IndexFunc& value) {
REFLECT_MEMBER2("declarations", value.declarations); REFLECT_MEMBER2("declarations", value.declarations);
REFLECT_MEMBER2("spell", value.def.spell); REFLECT_MEMBER2("spell", value.def.spell);
REFLECT_MEMBER2("extent", value.def.extent); REFLECT_MEMBER2("extent", value.def.extent);
REFLECT_MEMBER2("declaring_type", value.def.declaring_type);
REFLECT_MEMBER2("bases", value.def.bases); REFLECT_MEMBER2("bases", value.def.bases);
REFLECT_MEMBER2("derived", value.derived); REFLECT_MEMBER2("derived", value.derived);
REFLECT_MEMBER2("vars", value.def.vars); REFLECT_MEMBER2("vars", value.def.vars);