This commit is contained in:
Fangrui Song 2018-07-09 23:40:26 -07:00
parent 16448e98d1
commit 24e99fd767
94 changed files with 444 additions and 282 deletions

View File

@ -1,6 +1,6 @@
# ccls
ccls is a fork of cquery (originally written by Jacob Dufault),
ccls is a rewrite of cquery (originally written by Jacob Dufault),
a C/C++/Objective-C language server.
* code completion (with both signature help and snippets)
@ -16,16 +16,16 @@ a C/C++/Objective-C language server.
It makes use of C++17 features, has less third-party dependencies and slimmed-down code base. Cross reference features are strenghened, (see [wiki/FAQ](../../wiki/FAQ). It currently uses libclang to index C++ code but will switch to Clang C++ API. Refactoring and formatting are non-goals as they can be provided by clang-format, clang-include-fixer and other Clang based tools.
The comparison with cquery as noted on 2018-05-17:
The comparison with cquery as noted on 2018-07-09:
| | cquery | ccls |
|------------ |--------------------------------|---------------------------|
| third_party | more | fewer |
| C++ | C++14 | C++17 |
| clang API | libclang (C) | libclang + clang/llvm C++ |
| Filesystem | AbsolutePath + custom routines | llvm/Support |
| index | | slight enhancement |
| pipeline | index merge+id remapping | simpler and more robust |
| | cquery | ccls |
|------------ |--------------------------------|------------------------------|
| third_party | more | fewer |
| C++ | C++14 | C++17 |
| clang API | libclang (C) | libclang + clang/llvm C++ |
| Filesystem | AbsolutePath + custom routines | llvm/Support |
| index | libclang | clangIndex, some enhancement |
| pipeline | index merge+id remapping | simpler and more robust |
cquery has system include path detection (through running the compiler driver) while ccls does not.

View File

@ -21,13 +21,13 @@ OUTPUT:
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "3:3-3:6|15041163540773201510|2|514",
"spell": "3:3-3:6|15041163540773201510|2|1026",
"extent": "3:3-3:11|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [],
"uses": ["7:7-7:8|15041163540773201510|2|8228", "8:17-8:20|15041163540773201510|2|8228"],
"uses": ["7:7-7:8|15041163540773201510|2|16420", "8:17-8:20|15041163540773201510|2|16420"],
"callees": []
}, {
"usr": 4259594751088586730,

View File

@ -26,13 +26,13 @@ OUTPUT:
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "3:3-3:6|15041163540773201510|2|514",
"spell": "3:3-3:6|15041163540773201510|2|1026",
"extent": "3:3-3:11|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [],
"uses": ["8:7-8:8|15041163540773201510|2|8228"],
"uses": ["8:7-8:8|15041163540773201510|2|16420"],
"callees": []
}, {
"usr": 4259594751088586730,
@ -58,7 +58,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "4:3-4:4|15041163540773201510|2|514",
"spell": "4:3-4:4|15041163540773201510|2|1026",
"extent": "4:3-4:12|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [],

View File

@ -36,13 +36,13 @@ OUTPUT:
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "2:3-2:7|13487927231218873822|2|514",
"spell": "2:3-2:7|13487927231218873822|2|1026",
"extent": "2:3-2:12|13487927231218873822|2|0",
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [],
"uses": ["6:8-6:12|13487927231218873822|2|8228", "7:15-7:19|13487927231218873822|2|8228"],
"uses": ["6:8-6:12|13487927231218873822|2|16420", "7:15-7:19|13487927231218873822|2|16420"],
"callees": []
}],
"usr2type": [{

View File

@ -20,7 +20,7 @@ OUTPUT:
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "4:6-4:9|15041163540773201510|2|514",
"spell": "4:6-4:9|15041163540773201510|2|1026",
"extent": "4:1-4:11|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -36,7 +36,7 @@ OUTPUT: make_functions.h
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "7:3-7:9|14935975554338052500|2|514",
"spell": "7:3-7:9|14935975554338052500|2|1026",
"extent": "7:3-7:32|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [],
@ -52,7 +52,7 @@ OUTPUT: make_functions.h
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "6:3-6:9|14935975554338052500|2|514",
"spell": "6:3-6:9|14935975554338052500|2|1026",
"extent": "6:3-6:17|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [],
@ -68,7 +68,7 @@ OUTPUT: make_functions.h
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "5:3-5:9|14935975554338052500|2|514",
"spell": "5:3-5:9|14935975554338052500|2|1026",
"extent": "5:3-5:14|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [],
@ -84,7 +84,7 @@ OUTPUT: make_functions.h
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "8:3-8:9|14935975554338052500|2|514",
"spell": "8:3-8:9|14935975554338052500|2|1026",
"extent": "8:3-8:30|14935975554338052500|2|0",
"declaring_type": 0,
"bases": [],
@ -138,6 +138,20 @@ OUTPUT: make_functions.cc
}],
"skipped_ranges": [],
"usr2func": [{
"usr": 768523651983844320,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"kind": 0,
"storage": 0,
"declarations": [],
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [2555873744476712860, 2555873744476712860, 2555873744476712860],
"uses": [],
"callees": []
}, {
"usr": 2532818908869373467,
"detailed_name": "T *maKE_NoRefs(Args ...args)",
"qual_name_offset": 3,
@ -151,7 +165,7 @@ OUTPUT: make_functions.cc
"bases": [],
"derived": [],
"vars": [3908732770590594660],
"uses": ["17:3-17:14|0|1|8228"],
"uses": ["17:3-17:14|0|1|16420"],
"callees": []
}, {
"usr": 2816883305867289955,
@ -169,6 +183,34 @@ OUTPUT: make_functions.cc
"vars": [],
"uses": [],
"callees": []
}, {
"usr": 11138976705878544996,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"kind": 0,
"storage": 0,
"declarations": [],
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [16395392342608151399],
"uses": [],
"callees": []
}, {
"usr": 11363675606380070883,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"kind": 0,
"storage": 0,
"declarations": [],
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [180270746871803062, 180270746871803062, 180270746871803062],
"uses": [],
"callees": []
}, {
"usr": 15793662558620604611,
"detailed_name": "T *MakeUnique(Args &&...args)",
@ -183,10 +225,40 @@ OUTPUT: make_functions.cc
"bases": [],
"derived": [],
"vars": [8463700030555379526],
"uses": ["14:3-14:13|0|1|8228", "15:3-15:13|0|1|8228", "16:3-16:13|0|1|8228"],
"uses": ["14:3-14:13|0|1|16420", "15:3-15:13|0|1|16420", "16:3-16:13|0|1|16420"],
"callees": []
}],
"usr2type": [{
"usr": 53,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"kind": 0,
"declarations": [],
"alias_of": 0,
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [180270746871803062],
"uses": []
}, {
"usr": 87,
"detailed_name": "",
"qual_name_offset": 0,
"short_name": "",
"kind": 0,
"declarations": [],
"alias_of": 0,
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [180270746871803062],
"uses": []
}, {
"usr": 12993848456528750350,
"detailed_name": "struct Bar {}",
"qual_name_offset": 7,
@ -218,12 +290,36 @@ OUTPUT: make_functions.cc
"uses": ["14:14-14:20|0|1|4", "15:14-15:20|0|1|4", "16:14-16:20|0|1|4", "17:15-17:21|0|1|4"]
}],
"usr2var": [{
"usr": 180270746871803062,
"detailed_name": "int args",
"qual_name_offset": 4,
"short_name": "args",
"declarations": [],
"spell": "9:24-9:28|11363675606380070883|3|1026",
"extent": "9:16-9:28|11363675606380070883|3|0",
"type": 87,
"uses": [],
"kind": 253,
"storage": 0
}, {
"usr": 2555873744476712860,
"detailed_name": "int &&args",
"qual_name_offset": 6,
"short_name": "args",
"declarations": [],
"spell": "4:25-4:29|768523651983844320|3|1026",
"extent": "4:15-4:29|768523651983844320|3|0",
"type": 0,
"uses": [],
"kind": 253,
"storage": 0
}, {
"usr": 3908732770590594660,
"detailed_name": "Args ...args",
"qual_name_offset": 8,
"short_name": "args",
"declarations": [],
"spell": "9:24-9:28|2532818908869373467|3|514",
"spell": "9:24-9:28|2532818908869373467|3|1026",
"extent": "9:16-9:28|2532818908869373467|3|0",
"type": 0,
"uses": [],
@ -235,12 +331,24 @@ OUTPUT: make_functions.cc
"qual_name_offset": 10,
"short_name": "args",
"declarations": [],
"spell": "4:25-4:29|15793662558620604611|3|514",
"spell": "4:25-4:29|15793662558620604611|3|1026",
"extent": "4:15-4:29|15793662558620604611|3|0",
"type": 0,
"uses": [],
"kind": 253,
"storage": 0
}, {
"usr": 16395392342608151399,
"detailed_name": "int &&args",
"qual_name_offset": 6,
"short_name": "args",
"declarations": [],
"spell": "4:25-4:29|11138976705878544996|3|1026",
"extent": "4:15-4:29|11138976705878544996|3|0",
"type": 0,
"uses": [],
"kind": 253,
"storage": 0
}]
}
*/

View File

@ -50,7 +50,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "foo",
"declarations": [],
"spell": "2:7-2:10|15041163540773201510|2|514",
"spell": "2:7-2:10|15041163540773201510|2|1026",
"extent": "2:3-2:10|15041163540773201510|2|0",
"type": 53,
"uses": [],

View File

@ -48,8 +48,8 @@ OUTPUT:
"detailed_name": "static int Foo::foo",
"qual_name_offset": 11,
"short_name": "foo",
"declarations": ["2:14-2:17|15041163540773201510|2|513"],
"spell": "5:10-5:13|15041163540773201510|2|514",
"declarations": ["2:14-2:17|15041163540773201510|2|1025"],
"spell": "5:10-5:13|15041163540773201510|2|1026",
"extent": "5:1-5:13|0|1|0",
"type": 53,
"uses": [],

View File

@ -48,7 +48,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "b",
"declarations": [],
"spell": "5:20-5:21|2747674671862363334|3|514",
"spell": "5:20-5:21|2747674671862363334|3|1026",
"extent": "5:16-5:21|2747674671862363334|3|0",
"type": 53,
"uses": [],
@ -60,7 +60,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"declarations": [],
"spell": "5:13-5:14|2747674671862363334|3|514",
"spell": "5:13-5:14|2747674671862363334|3|1026",
"extent": "5:9-5:14|2747674671862363334|3|0",
"type": 53,
"uses": [],

View File

@ -18,7 +18,7 @@ OUTPUT:
"short_name": "declonly",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:16|15041163540773201510|2|513"],
"declarations": ["2:8-2:16|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -32,7 +32,7 @@ OUTPUT:
"short_name": "purevirtual",
"kind": 6,
"storage": 0,
"declarations": ["3:16-3:27|15041163540773201510|2|577"],
"declarations": ["3:16-3:27|15041163540773201510|2|1089"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -46,8 +46,8 @@ OUTPUT:
"short_name": "def",
"kind": 6,
"storage": 0,
"declarations": ["4:8-4:11|15041163540773201510|2|513"],
"spell": "7:11-7:14|15041163540773201510|2|514",
"declarations": ["4:8-4:11|15041163540773201510|2|1025"],
"spell": "7:11-7:14|15041163540773201510|2|1026",
"extent": "7:1-7:19|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -52,7 +52,7 @@ OUTPUT:
"short_name": "A",
"hover": "Foo::A = 0",
"declarations": [],
"spell": "3:3-3:4|16985894625255407295|2|514",
"spell": "3:3-3:4|16985894625255407295|2|1026",
"extent": "3:3-3:4|16985894625255407295|2|0",
"type": 0,
"uses": [],
@ -64,7 +64,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "B",
"declarations": [],
"spell": "4:3-4:4|16985894625255407295|2|514",
"spell": "4:3-4:4|16985894625255407295|2|1026",
"extent": "4:3-4:9|16985894625255407295|2|0",
"type": 0,
"uses": [],

View File

@ -34,7 +34,7 @@ OUTPUT:
"short_name": "A",
"hover": "A = 0",
"declarations": [],
"spell": "2:3-2:4|16985894625255407295|2|514",
"spell": "2:3-2:4|16985894625255407295|2|1026",
"extent": "2:3-2:4|16985894625255407295|2|0",
"type": 0,
"uses": [],
@ -46,7 +46,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "B",
"declarations": [],
"spell": "3:3-3:4|16985894625255407295|2|514",
"spell": "3:3-3:4|16985894625255407295|2|1026",
"extent": "3:3-3:9|16985894625255407295|2|0",
"type": 0,
"uses": [],

View File

@ -75,7 +75,7 @@ OUTPUT:
"short_name": "A",
"hover": "A = 0",
"declarations": [],
"spell": "2:3-2:4|16985894625255407295|2|514",
"spell": "2:3-2:4|16985894625255407295|2|1026",
"extent": "2:3-2:4|16985894625255407295|2|0",
"type": 0,
"uses": [],
@ -87,7 +87,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "B",
"declarations": [],
"spell": "3:3-3:4|16985894625255407295|2|514",
"spell": "3:3-3:4|16985894625255407295|2|1026",
"extent": "3:3-3:9|16985894625255407295|2|0",
"type": 0,
"uses": [],
@ -100,7 +100,7 @@ OUTPUT:
"short_name": "E0",
"hover": "E::E0 = 0",
"declarations": [],
"spell": "9:3-9:5|2986879766914123941|2|514",
"spell": "9:3-9:5|2986879766914123941|2|1026",
"extent": "9:3-9:5|2986879766914123941|2|0",
"type": 0,
"uses": [],
@ -112,7 +112,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "E20",
"declarations": [],
"spell": "10:3-10:6|2986879766914123941|2|514",
"spell": "10:3-10:6|2986879766914123941|2|1026",
"extent": "10:3-10:11|2986879766914123941|2|0",
"type": 0,
"uses": [],

View File

@ -36,7 +36,7 @@ OUTPUT:
"short_name": "A",
"hover": "Foo::A = 0",
"declarations": [],
"spell": "2:3-2:4|16985894625255407295|2|514",
"spell": "2:3-2:4|16985894625255407295|2|1026",
"extent": "2:3-2:4|16985894625255407295|2|0",
"type": 0,
"uses": ["6:14-6:15|16985894625255407295|2|4"],
@ -61,7 +61,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "B",
"declarations": [],
"spell": "3:3-3:4|16985894625255407295|2|514",
"spell": "3:3-3:4|16985894625255407295|2|1026",
"extent": "3:3-3:9|16985894625255407295|2|0",
"type": 0,
"uses": [],

View File

@ -38,7 +38,7 @@ OUTPUT:
"short_name": "Inner",
"kind": 26,
"declarations": [],
"spell": "6:3-6:18|0|1|2",
"spell": "6:10-6:15|0|1|2",
"extent": "6:3-6:18|0|1|0",
"alias_of": 0,
"bases": [],
@ -72,7 +72,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 26,
"declarations": [],
"spell": "4:1-7:2|0|1|2",
"spell": "5:8-5:11|0|1|2",
"extent": "4:1-7:2|0|1|0",
"alias_of": 0,
"bases": [],
@ -106,7 +106,7 @@ OUTPUT:
"short_name": "Inner",
"kind": 23,
"declarations": [],
"spell": "6:10-6:15|10528472276654770367|2|514",
"spell": "6:10-6:15|10528472276654770367|2|1026",
"extent": "6:3-6:18|10528472276654770367|2|0",
"alias_of": 0,
"bases": [],

View File

@ -23,7 +23,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["2:24-2:30|0|1|1028"]
"uses": ["2:24-2:30|0|1|2052"]
}, {
"usr": 10963370434658308541,
"detailed_name": "class Derived : public Parent {}",

View File

@ -34,7 +34,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["13:43-13:51|0|1|1028"]
"uses": ["13:43-13:51|0|1|2052"]
}, {
"usr": 10651399730831737929,
"detailed_name": "class Derived2 : Base2<T> {}",
@ -51,7 +51,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["13:56-13:64|0|1|1028"]
"uses": ["13:56-13:64|0|1|2052"]
}, {
"usr": 10963370434658308541,
"detailed_name": "class Derived : Base1<3>, Base2<Derived>, Derived1<4>, Derived2<Derived> {}",
@ -68,7 +68,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["13:33-13:40|0|1|1028", "13:65-13:72|0|1|1028"]
"uses": ["13:33-13:40|0|1|2052", "13:65-13:72|0|1|2052"]
}, {
"usr": 11118288764693061434,
"detailed_name": "class Base2 {}",
@ -85,7 +85,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["11:18-11:23|0|1|1028", "13:27-13:32|0|1|1028"]
"uses": ["13:27-13:32|0|1|2052"]
}, {
"usr": 11930058224338108382,
"detailed_name": "class Base1 {}",
@ -102,7 +102,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["8:18-8:23|0|1|1028", "13:17-13:22|0|1|1028"]
"uses": ["13:17-13:22|0|1|2052"]
}],
"usr2var": []
}

View File

@ -25,7 +25,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["2:24-2:28|0|1|1028", "3:24-3:28|0|1|1028"]
"uses": ["2:24-2:28|0|1|2052", "3:24-3:28|0|1|2052"]
}, {
"usr": 10963370434658308541,
"detailed_name": "class Derived : public MiddleA, public MiddleB {}",
@ -59,7 +59,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["4:24-4:31|0|1|1028"]
"uses": ["4:24-4:31|0|1|2052"]
}, {
"usr": 14022569716337624303,
"detailed_name": "class MiddleB : public Root {}",
@ -76,7 +76,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["4:40-4:47|0|1|1028"]
"uses": ["4:40-4:47|0|1|2052"]
}],
"usr2var": []
}

View File

@ -18,7 +18,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "5:8-5:11|10963370434658308541|2|2626",
"spell": "5:8-5:11|10963370434658308541|2|5186",
"extent": "5:3-5:25|10963370434658308541|2|0",
"declaring_type": 0,
"bases": [9948027785633571339],
@ -33,7 +33,7 @@ OUTPUT:
"short_name": "foo",
"kind": 6,
"storage": 0,
"declarations": ["2:16-2:19|3897841498936210886|2|577"],
"declarations": ["2:16-2:19|3897841498936210886|2|1089"],
"declaring_type": 0,
"bases": [],
"derived": [6666242542855173890],
@ -57,7 +57,7 @@ OUTPUT:
"funcs": [9948027785633571339],
"vars": [],
"instances": [],
"uses": ["4:24-4:28|0|1|1028"]
"uses": ["4:24-4:28|0|1|2052"]
}, {
"usr": 10963370434658308541,
"detailed_name": "class Derived : public Root {}",

View File

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

View File

@ -21,7 +21,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "5:11-5:12|15826803741381445676|2|578",
"spell": "5:11-5:12|15826803741381445676|2|1090",
"extent": "5:3-5:23|15826803741381445676|2|0",
"declaring_type": 0,
"bases": [],
@ -37,7 +37,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "8:3-8:4|10963370434658308541|2|2626",
"spell": "8:3-8:4|10963370434658308541|2|5186",
"extent": "8:3-8:26|10963370434658308541|2|0",
"declaring_type": 0,
"bases": [],
@ -53,7 +53,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "2:11-2:12|11628904180681204356|2|578",
"spell": "2:11-2:12|11628904180681204356|2|1090",
"extent": "2:3-2:23|11628904180681204356|2|0",
"declaring_type": 0,
"bases": [],
@ -95,7 +95,7 @@ OUTPUT:
"funcs": [16347272523198263017],
"vars": [],
"instances": [],
"uses": ["2:12-2:17|0|1|4", "7:18-7:23|0|1|1028"]
"uses": ["2:12-2:17|0|1|4", "7:18-7:23|0|1|2052"]
}, {
"usr": 15826803741381445676,
"detailed_name": "struct Base1 {}",
@ -112,7 +112,7 @@ OUTPUT:
"funcs": [8401779086123965305],
"vars": [],
"instances": [],
"uses": ["5:12-5:17|0|1|4", "7:25-7:30|0|1|1028"]
"uses": ["5:12-5:17|0|1|4", "7:25-7:30|0|1|2052"]
}],
"usr2var": []
}

View File

@ -44,7 +44,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["9:14-9:15|14635009347499519042|2|8228", "10:14-10:15|14635009347499519042|2|8228", "11:14-11:15|14635009347499519042|2|8228"],
"uses": ["9:14-9:15|14635009347499519042|2|16420", "10:14-10:15|14635009347499519042|2|16420", "11:14-11:15|14635009347499519042|2|16420"],
"callees": []
}],
"usr2type": [{

View File

@ -46,7 +46,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["12:5-12:10|0|1|8228"],
"uses": ["12:5-12:10|0|1|16420"],
"callees": []
}],
"usr2type": [{

View File

@ -20,7 +20,7 @@ OUTPUT:
"kind": 9,
"storage": 0,
"declarations": [],
"spell": "5:12-5:15|15041163540773201510|2|514",
"spell": "5:12-5:15|15041163540773201510|2|1026",
"extent": "1:1-1:1|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [],

View File

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

View File

@ -16,8 +16,8 @@ OUTPUT:
"short_name": "foo",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:11|15041163540773201510|2|513"],
"spell": "5:11-5:14|15041163540773201510|2|514",
"declarations": ["2:8-2:11|15041163540773201510|2|1025"],
"spell": "5:11-5:14|15041163540773201510|2|1026",
"extent": "5:1-5:25|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -15,7 +15,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "2:8-2:11|15041163540773201510|2|514",
"spell": "2:8-2:11|15041163540773201510|2|1026",
"extent": "2:3-2:16|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [],

View File

@ -33,9 +33,9 @@ OUTPUT: funky_enum.h
"qual_name_offset": 0,
"short_name": "A",
"hover": "A = 0",
"comments": "This file cannot be built directory. It is included in an enum definition of\nanother file.",
"comments": "This file cannot be built directory. It is included in an enum definition of\r\nanother file.",
"declarations": [],
"spell": "4:1-4:2|16985894625255407295|2|514",
"spell": "4:1-4:2|16985894625255407295|2|1026",
"extent": "4:1-4:2|16985894625255407295|2|0",
"type": 0,
"uses": [],
@ -47,9 +47,9 @@ OUTPUT: funky_enum.h
"qual_name_offset": 0,
"short_name": "C",
"hover": "C = 2",
"comments": "This file cannot be built directory. It is included in an enum definition of\nanother file.",
"comments": "This file cannot be built directory. It is included in an enum definition of\r\nanother file.",
"declarations": [],
"spell": "6:1-6:2|16985894625255407295|2|514",
"spell": "6:1-6:2|16985894625255407295|2|1026",
"extent": "6:1-6:2|16985894625255407295|2|0",
"type": 0,
"uses": [],
@ -61,9 +61,9 @@ OUTPUT: funky_enum.h
"qual_name_offset": 0,
"short_name": "B",
"hover": "B = 1",
"comments": "This file cannot be built directory. It is included in an enum definition of\nanother file.",
"comments": "This file cannot be built directory. It is included in an enum definition of\r\nanother file.",
"declarations": [],
"spell": "5:1-5:2|16985894625255407295|2|514",
"spell": "5:1-5:2|16985894625255407295|2|1026",
"extent": "5:1-5:2|16985894625255407295|2|0",
"type": 0,
"uses": [],

View File

@ -108,7 +108,7 @@ OUTPUT: header.h
"funcs": [],
"vars": [],
"instances": [],
"uses": ["5:26-5:30|0|1|1028"]
"uses": ["5:26-5:30|0|1|2052"]
}, {
"usr": 16750616846959666305,
"detailed_name": "struct SameFileDerived : Base {}",
@ -146,7 +146,7 @@ OUTPUT: header.h
"short_name": "A",
"hover": "A = 0",
"declarations": [],
"spell": "15:13-15:14|4481210672785600703|2|514",
"spell": "15:13-15:14|4481210672785600703|2|1026",
"extent": "15:13-15:14|4481210672785600703|2|0",
"type": 0,
"uses": [],
@ -159,7 +159,7 @@ OUTPUT: header.h
"short_name": "C",
"hover": "C = 2",
"declarations": [],
"spell": "15:19-15:20|4481210672785600703|2|514",
"spell": "15:19-15:20|4481210672785600703|2|1026",
"extent": "15:19-15:20|4481210672785600703|2|0",
"type": 0,
"uses": [],
@ -184,7 +184,7 @@ OUTPUT: header.h
"short_name": "B",
"hover": "B = 1",
"declarations": [],
"spell": "15:16-15:17|4481210672785600703|2|514",
"spell": "15:16-15:17|4481210672785600703|2|1026",
"extent": "15:16-15:17|4481210672785600703|2|0",
"type": 0,
"uses": [],
@ -227,7 +227,7 @@ OUTPUT: impl.cc
"bases": [],
"derived": [],
"vars": [],
"uses": ["4:3-4:7|0|1|8228"],
"uses": ["4:3-4:7|0|1|16420"],
"callees": []
}],
"usr2type": [],

View File

@ -62,7 +62,7 @@ OUTPUT: simple_impl.cc
"bases": [],
"derived": [],
"vars": [],
"uses": ["4:3-4:9|0|1|8228"],
"uses": ["4:3-4:9|0|1|16420"],
"callees": []
}],
"usr2type": [],

View File

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

View File

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

View File

@ -15,7 +15,7 @@ OUTPUT:
"kind": 12,
"storage": 0,
"declarations": [],
"spell": "2:6-2:9|2029211996748007610|2|514",
"spell": "2:6-2:9|2029211996748007610|2|1026",
"extent": "2:1-2:14|2029211996748007610|2|0",
"declaring_type": 0,
"bases": [],

View File

@ -16,7 +16,7 @@ OUTPUT:
"short_name": "foo",
"kind": 6,
"storage": 0,
"declarations": ["3:8-3:11|4508214972876735896|2|513"],
"declarations": ["3:8-3:11|4508214972876735896|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -46,7 +46,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 5,
"declarations": [],
"spell": "2:7-2:10|2029211996748007610|2|514",
"spell": "2:7-2:10|2029211996748007610|2|1026",
"extent": "2:1-4:2|2029211996748007610|2|0",
"alias_of": 0,
"bases": [],

View File

@ -18,8 +18,8 @@ OUTPUT:
"short_name": "foo",
"kind": 6,
"storage": 0,
"declarations": ["3:8-3:11|4508214972876735896|2|513"],
"spell": "6:11-6:14|4508214972876735896|2|514",
"declarations": ["3:8-3:11|4508214972876735896|2|1025"],
"spell": "6:11-6:14|4508214972876735896|2|1026",
"extent": "6:1-6:19|2029211996748007610|2|0",
"declaring_type": 0,
"bases": [],
@ -50,7 +50,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 5,
"declarations": [],
"spell": "2:7-2:10|2029211996748007610|2|514",
"spell": "2:7-2:10|2029211996748007610|2|1026",
"extent": "2:1-4:2|2029211996748007610|2|0",
"alias_of": 0,
"bases": [],

View File

@ -17,7 +17,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "3:8-3:11|4508214972876735896|2|514",
"spell": "3:8-3:11|4508214972876735896|2|1026",
"extent": "3:3-3:16|4508214972876735896|2|0",
"declaring_type": 0,
"bases": [],
@ -48,7 +48,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 5,
"declarations": [],
"spell": "2:7-2:10|2029211996748007610|2|514",
"spell": "2:7-2:10|2029211996748007610|2|1026",
"extent": "2:1-4:2|2029211996748007610|2|0",
"alias_of": 0,
"bases": [],

View File

@ -86,7 +86,7 @@ OUTPUT:
"qual_name_offset": 10,
"short_name": "baz",
"kind": 3,
"declarations": ["3:20-3:23|17805385787823406700|2|513"],
"declarations": ["3:20-3:23|17805385787823406700|2|1025"],
"alias_of": 0,
"bases": [],
"derived": [],
@ -104,7 +104,7 @@ OUTPUT:
"qual_name_offset": 10,
"short_name": "bar",
"kind": 3,
"declarations": ["2:15-2:18|926793467007732869|2|513"],
"declarations": ["2:15-2:18|926793467007732869|2|1025"],
"alias_of": 0,
"bases": [],
"derived": [],
@ -147,7 +147,7 @@ OUTPUT:
"short_name": "qux",
"hover": "int foo::bar::baz::qux = 42",
"declarations": [],
"spell": "4:18-4:21|14450849931009540802|2|514",
"spell": "4:18-4:21|14450849931009540802|2|1026",
"extent": "4:14-4:26|14450849931009540802|2|0",
"type": 53,
"uses": ["12:26-12:29|14450849931009540802|2|12", "13:16-13:19|14450849931009540802|2|12"],

View File

@ -38,13 +38,13 @@ OUTPUT:
"kind": 12,
"storage": 0,
"declarations": [],
"spell": "3:8-3:14|11072669167287398027|2|514",
"spell": "3:8-3:14|11072669167287398027|2|1026",
"extent": "3:3-3:24|11072669167287398027|2|0",
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [3649375698083002347],
"uses": ["7:7-7:13|11072669167287398027|2|8228", "9:3-9:9|11072669167287398027|2|8228"],
"uses": ["7:7-7:13|11072669167287398027|2|16420", "9:3-9:9|11072669167287398027|2|16420"],
"callees": []
}],
"usr2type": [{
@ -87,7 +87,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"declarations": [],
"spell": "3:19-3:20|17328473273923617489|3|514",
"spell": "3:19-3:20|17328473273923617489|3|1026",
"extent": "3:15-3:20|17328473273923617489|3|0",
"type": 53,
"uses": [],
@ -99,7 +99,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "Foo",
"declarations": [],
"spell": "2:7-2:10|11072669167287398027|2|514",
"spell": "2:7-2:10|11072669167287398027|2|1026",
"extent": "2:3-2:10|11072669167287398027|2|0",
"type": 53,
"uses": ["7:18-7:21|11072669167287398027|2|12", "9:10-9:13|11072669167287398027|2|12"],

View File

@ -18,7 +18,7 @@ OUTPUT:
"short_name": "operator()",
"kind": 6,
"storage": 0,
"declarations": ["3:8-3:16|15041163540773201510|2|513"],
"declarations": ["3:8-3:16|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -32,7 +32,7 @@ OUTPUT:
"short_name": "operator()",
"kind": 6,
"storage": 0,
"declarations": ["4:7-4:15|15041163540773201510|2|513"],
"declarations": ["4:7-4:15|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -47,7 +47,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "2:8-2:16|15041163540773201510|2|514",
"spell": "2:8-2:16|15041163540773201510|2|1026",
"extent": "2:3-2:27|15041163540773201510|2|0",
"declaring_type": 0,
"bases": [],

View File

@ -18,7 +18,7 @@ OUTPUT: static_function_in_type.h
"short_name": "Register",
"kind": 6,
"storage": 0,
"declarations": ["6:15-6:23|17262466801709381811|2|513"],
"declarations": ["6:15-6:23|17262466801709381811|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -32,7 +32,7 @@ OUTPUT: static_function_in_type.h
"qual_name_offset": 6,
"short_name": "Manager",
"kind": 5,
"declarations": ["3:7-3:14|11072669167287398027|2|513"],
"declarations": ["3:7-3:14|11072669167287398027|2|1025"],
"alias_of": 0,
"bases": [],
"derived": [],
@ -63,7 +63,7 @@ OUTPUT: static_function_in_type.h
"short_name": "Foo",
"kind": 23,
"declarations": [],
"spell": "5:8-5:11|11072669167287398027|2|514",
"spell": "5:8-5:11|11072669167287398027|2|1026",
"extent": "5:1-7:2|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -92,7 +92,7 @@ OUTPUT: static_function_in_type.cc
"storage": 0,
"comments": "static",
"declarations": [],
"spell": "5:11-5:19|17262466801709381811|2|514",
"spell": "5:11-5:19|17262466801709381811|2|1026",
"extent": "5:1-6:2|11072669167287398027|2|0",
"declaring_type": 0,
"bases": [],
@ -153,7 +153,7 @@ OUTPUT: static_function_in_type.cc
"qual_name_offset": 13,
"short_name": "m",
"declarations": [],
"spell": "5:29-5:30|17019747379608639279|3|514",
"spell": "5:29-5:30|17019747379608639279|3|1026",
"extent": "5:20-5:30|17019747379608639279|3|0",
"type": 1972401196751872203,
"uses": [],

View File

@ -19,8 +19,8 @@ OUTPUT:
"short_name": "Bar",
"kind": 6,
"storage": 0,
"declarations": ["5:8-5:11|15041163540773201510|2|513"],
"spell": "8:11-8:14|15041163540773201510|2|514",
"declarations": ["5:8-5:11|15041163540773201510|2|1025"],
"spell": "8:11-8:14|15041163540773201510|2|1026",
"extent": "8:1-8:36|0|1|0",
"declaring_type": 0,
"bases": [],
@ -30,6 +30,21 @@ OUTPUT:
"callees": []
}],
"usr2type": [{
"usr": 2100211316767379401,
"detailed_name": "template<> class Template<double>",
"qual_name_offset": 17,
"short_name": "Template",
"kind": 5,
"declarations": [],
"alias_of": 0,
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
"uses": ["5:12-5:20|0|1|4", "8:15-8:23|0|1|4"]
}, {
"usr": 15041163540773201510,
"detailed_name": "struct Foo {}",
"qual_name_offset": 7,
@ -62,7 +77,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["5:12-5:20|0|1|4", "8:15-8:23|0|1|4"]
"uses": []
}],
"usr2var": []
}

View File

@ -42,7 +42,7 @@ OUTPUT:
"short_name": "VarType",
"kind": 10,
"declarations": [],
"spell": "2:8-2:15|11072669167287398027|2|514",
"spell": "2:8-2:15|11072669167287398027|2|1026",
"extent": "2:3-2:18|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -80,7 +80,7 @@ OUTPUT:
"short_name": "Holder",
"kind": 23,
"declarations": [],
"spell": "5:10-5:16|11072669167287398027|2|514",
"spell": "5:10-5:16|11072669167287398027|2|1026",
"extent": "5:3-7:4|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -97,8 +97,8 @@ OUTPUT:
"qual_name_offset": 29,
"short_name": "static_var",
"hover": "static constexpr ns::VarType ns::Holder::static_var = (VarType)0x0",
"declarations": ["6:30-6:40|12688716854043726585|2|513"],
"spell": "10:37-10:47|12688716854043726585|2|514",
"declarations": ["6:30-6:40|12688716854043726585|2|1025"],
"spell": "10:37-10:47|12688716854043726585|2|1026",
"extent": "9:3-10:47|11072669167287398027|2|0",
"type": 1532099849728741556,
"uses": ["13:26-13:36|11072669167287398027|2|12", "14:27-14:37|11072669167287398027|2|12"],
@ -111,7 +111,7 @@ OUTPUT:
"short_name": "Foo2",
"hover": "int ns::Foo2 = Holder<int>::static_var",
"declarations": [],
"spell": "14:7-14:11|11072669167287398027|2|514",
"spell": "14:7-14:11|11072669167287398027|2|1026",
"extent": "14:3-14:37|11072669167287398027|2|0",
"type": 53,
"uses": [],
@ -124,7 +124,7 @@ OUTPUT:
"short_name": "Foo",
"hover": "int ns::Foo = Holder<int>::static_var",
"declarations": [],
"spell": "13:7-13:10|11072669167287398027|2|514",
"spell": "13:7-13:10|11072669167287398027|2|1026",
"extent": "13:3-13:36|11072669167287398027|2|0",
"type": 53,
"uses": [],

View File

@ -48,7 +48,7 @@ OUTPUT:
"short_name": "bar",
"kind": 6,
"storage": 0,
"declarations": ["4:8-4:11|8402783583255987702|2|513"],
"declarations": ["4:8-4:11|8402783583255987702|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -83,7 +83,7 @@ OUTPUT:
"short_name": "T",
"kind": 26,
"declarations": [],
"spell": "1:11-1:18|8402783583255987702|2|2",
"spell": "1:17-1:18|8402783583255987702|2|2",
"extent": "1:11-1:18|8402783583255987702|2|0",
"alias_of": 0,
"bases": [],
@ -100,7 +100,7 @@ OUTPUT:
"qual_name_offset": 2,
"short_name": "x",
"declarations": [],
"spell": "3:5-3:6|8402783583255987702|2|514",
"spell": "3:5-3:6|8402783583255987702|2|1026",
"extent": "3:3-3:6|8402783583255987702|2|0",
"type": 14750650276757822712,
"uses": [],

View File

@ -24,7 +24,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "5:16-5:19|14042997404480181958|2|514",
"spell": "5:16-5:19|14042997404480181958|2|1026",
"extent": "5:5-7:6|14042997404480181958|2|0",
"declaring_type": 0,
"bases": [],
@ -76,7 +76,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 23,
"declarations": [],
"spell": "3:10-3:13|11072669167287398027|2|514",
"spell": "3:10-3:13|11072669167287398027|2|1026",
"extent": "3:3-8:4|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -94,7 +94,7 @@ OUTPUT:
"short_name": "b",
"hover": "int ns::b = Foo<bool>::foo<double>()",
"declarations": [],
"spell": "11:7-11:8|11072669167287398027|2|514",
"spell": "11:7-11:8|11072669167287398027|2|1026",
"extent": "11:3-11:35|11072669167287398027|2|0",
"type": 53,
"uses": [],
@ -107,7 +107,7 @@ OUTPUT:
"short_name": "a",
"hover": "int ns::a = Foo<int>::foo<float>()",
"declarations": [],
"spell": "10:7-10:8|11072669167287398027|2|514",
"spell": "10:7-10:8|11072669167287398027|2|1026",
"extent": "10:3-10:33|11072669167287398027|2|0",
"type": 53,
"uses": [],

View File

@ -19,7 +19,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 26,
"declarations": [],
"spell": "2:3-3:15|11072669167287398027|2|2",
"spell": "3:9-3:12|11072669167287398027|2|2",
"extent": "2:3-3:15|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -36,7 +36,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 26,
"declarations": [],
"spell": "2:3-3:15|11072669167287398027|2|2",
"spell": "3:9-3:12|11072669167287398027|2|2",
"extent": "2:3-3:15|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -74,7 +74,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 5,
"declarations": [],
"spell": "3:9-3:12|11072669167287398027|2|514",
"spell": "3:9-3:12|11072669167287398027|2|1026",
"extent": "3:3-3:15|11072669167287398027|2|0",
"alias_of": 0,
"bases": [],
@ -91,7 +91,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "b",
"declarations": [],
"spell": "6:13-6:14|11072669167287398027|2|514",
"spell": "6:13-6:14|11072669167287398027|2|1026",
"extent": "6:3-6:14|11072669167287398027|2|0",
"type": 3948666349864691553,
"uses": [],
@ -103,7 +103,7 @@ OUTPUT:
"qual_name_offset": 9,
"short_name": "a",
"declarations": [],
"spell": "5:12-5:13|11072669167287398027|2|514",
"spell": "5:12-5:13|11072669167287398027|2|1026",
"extent": "5:3-5:13|11072669167287398027|2|0",
"type": 8224244241460152567,
"uses": [],

View File

@ -68,7 +68,7 @@ OUTPUT:
"short_name": "clear",
"kind": 6,
"storage": 0,
"declarations": ["27:8-27:13|1663022413889915338|2|513"],
"declarations": ["27:8-27:13|1663022413889915338|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -98,7 +98,7 @@ OUTPUT:
"short_name": "clear",
"kind": 6,
"storage": 0,
"declarations": ["13:8-13:13|7440942986741176606|2|513"],
"declarations": ["13:8-13:13|7440942986741176606|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
@ -137,7 +137,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": []
"uses": ["7:1-7:9|0|1|4"]
}, {
"usr": 1663022413889915338,
"detailed_name": "template<> class vector<Z2, allocator<Z2>> {}",
@ -154,7 +154,7 @@ OUTPUT:
"funcs": [6113470698424012876],
"vars": [],
"instances": [15931696253641284761],
"uses": []
"uses": ["26:7-26:13|0|1|4", "33:1-33:7|0|1|4"]
}, {
"usr": 3231449734830406187,
"detailed_name": "function",
@ -162,7 +162,7 @@ OUTPUT:
"short_name": "function",
"kind": 26,
"declarations": [],
"spell": "4:1-5:30|0|1|2",
"spell": "5:7-5:15|0|1|2",
"extent": "4:1-5:30|0|1|0",
"alias_of": 0,
"bases": [],
@ -188,7 +188,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["32:8-32:10|0|1|4"]
"uses": ["21:23-21:25|0|1|4", "32:8-32:10|0|1|4"]
}, {
"usr": 7440942986741176606,
"detailed_name": "class vector {}",
@ -205,7 +205,7 @@ OUTPUT:
"funcs": [18107614608385228556],
"vars": [],
"instances": [],
"uses": ["17:7-17:13|0|1|4", "26:7-26:13|0|1|4", "30:1-30:7|0|1|4", "31:1-31:7|0|1|4", "32:1-32:7|0|1|4", "33:1-33:7|0|1|4"]
"uses": ["21:16-21:22|0|1|4", "30:1-30:7|0|1|4", "32:1-32:7|0|1|4"]
}, {
"usr": 9201299975592934124,
"detailed_name": "enum Enum {\n}",
@ -247,7 +247,7 @@ OUTPUT:
"short_name": "vector",
"kind": 26,
"declarations": [],
"spell": "16:1-17:20|0|1|2",
"spell": "17:7-17:13|0|1|2",
"extent": "16:1-17:20|0|1|0",
"alias_of": 0,
"bases": [],
@ -264,7 +264,7 @@ OUTPUT:
"short_name": "vector",
"kind": 26,
"declarations": [],
"spell": "11:1-14:2|0|1|2",
"spell": "12:7-12:13|0|1|2",
"extent": "11:1-14:2|0|1|0",
"alias_of": 0,
"bases": [],
@ -281,7 +281,7 @@ OUTPUT:
"short_name": "T",
"kind": 26,
"declarations": [],
"spell": "38:11-38:21|17498190318698490707|3|2",
"spell": "38:20-38:21|17498190318698490707|3|2",
"extent": "38:11-38:21|17498190318698490707|3|0",
"alias_of": 0,
"bases": [],
@ -305,7 +305,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["5:7-5:15|0|1|4", "7:1-7:9|0|1|4"]
"uses": []
}, {
"usr": 15440970074034693939,
"detailed_name": "vector",
@ -313,7 +313,7 @@ OUTPUT:
"short_name": "vector",
"kind": 26,
"declarations": [],
"spell": "21:1-21:26|0|1|2",
"spell": "21:16-21:22|0|1|2",
"extent": "21:1-21:26|0|1|0",
"alias_of": 0,
"bases": [],
@ -337,7 +337,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["11:39-11:48|0|1|4"]
"uses": []
}, {
"usr": 16155717907537731864,
"detailed_name": "template <typename T> class vector<type-parameter-0-0 *, allocator<type-parameter-0-0 *>> {}",
@ -354,7 +354,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": []
"uses": ["31:1-31:7|0|1|4"]
}],
"usr2var": [{
"usr": 86949563628772958,
@ -399,7 +399,7 @@ OUTPUT:
"short_name": "Enum1",
"hover": "Enum1 = 1",
"declarations": [],
"spell": "36:10-36:15|9201299975592934124|2|514",
"spell": "36:10-36:15|9201299975592934124|2|1026",
"extent": "36:10-36:15|9201299975592934124|2|0",
"type": 0,
"uses": [],
@ -437,7 +437,7 @@ OUTPUT:
"short_name": "Enum0",
"hover": "Enum0 = 0",
"declarations": [],
"spell": "36:3-36:8|9201299975592934124|2|514",
"spell": "36:3-36:8|9201299975592934124|2|1026",
"extent": "36:3-36:8|9201299975592934124|2|0",
"type": 0,
"uses": ["43:20-43:25|9201299975592934124|2|4"],
@ -461,7 +461,7 @@ OUTPUT:
"qual_name_offset": 2,
"short_name": "Value",
"declarations": [],
"spell": "39:12-39:17|17498190318698490707|3|514",
"spell": "39:12-39:17|17498190318698490707|3|1026",
"extent": "39:10-39:17|17498190318698490707|3|0",
"type": 14111105212951082474,
"uses": [],

View File

@ -30,7 +30,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "10:22-10:25|17649312483543982122|2|514",
"spell": "10:22-10:25|17649312483543982122|2|1026",
"extent": "9:1-10:30|0|1|0",
"declaring_type": 0,
"bases": [],
@ -45,8 +45,8 @@ OUTPUT:
"short_name": "Foo",
"kind": 6,
"storage": 0,
"declarations": ["3:8-3:11|17107291254533526269|2|513"],
"spell": "7:19-7:22|17107291254533526269|2|514",
"declarations": ["3:8-3:11|17107291254533526269|2|1025"],
"spell": "7:19-7:22|17107291254533526269|2|1026",
"extent": "6:1-7:24|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -21,7 +21,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "3:14-3:17|10528472276654770367|2|514",
"spell": "3:14-3:17|10528472276654770367|2|1026",
"extent": "3:3-5:4|10528472276654770367|2|0",
"declaring_type": 0,
"bases": [],

View File

@ -22,7 +22,7 @@ OUTPUT:
"kind": 6,
"storage": 0,
"declarations": [],
"spell": "4:14-4:17|10528472276654770367|2|514",
"spell": "4:14-4:17|10528472276654770367|2|1026",
"extent": "4:3-6:4|10528472276654770367|2|0",
"declaring_type": 0,
"bases": [],

View File

@ -57,7 +57,7 @@ OUTPUT:
"short_name": "Inner",
"kind": 26,
"declarations": [],
"spell": "6:3-6:18|0|1|2",
"spell": "6:10-6:15|0|1|2",
"extent": "6:3-6:18|0|1|0",
"alias_of": 0,
"bases": [],
@ -108,7 +108,7 @@ OUTPUT:
"short_name": "Inner",
"kind": 23,
"declarations": [],
"spell": "6:10-6:15|10528472276654770367|2|514",
"spell": "6:10-6:15|10528472276654770367|2|1026",
"extent": "6:3-6:18|10528472276654770367|2|0",
"alias_of": 0,
"bases": [],
@ -125,7 +125,7 @@ OUTPUT:
"short_name": "Inner",
"kind": 26,
"declarations": [],
"spell": "6:3-6:18|0|1|2",
"spell": "6:10-6:15|0|1|2",
"extent": "6:3-6:18|0|1|0",
"alias_of": 0,
"bases": [],

View File

@ -64,7 +64,7 @@ OUTPUT:
"qual_name_offset": 21,
"short_name": "var",
"hover": "static constexpr int Foo::var = 3",
"declarations": ["3:24-3:27|10528472276654770367|2|513"],
"declarations": ["3:24-3:27|10528472276654770367|2|1025"],
"type": 53,
"uses": ["6:19-6:22|10528472276654770367|2|12", "7:20-7:23|10528472276654770367|2|12"],
"kind": 13,

View File

@ -17,7 +17,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 26,
"declarations": [],
"spell": "1:1-2:13|0|1|2",
"spell": "2:7-2:10|0|1|2",
"extent": "1:1-2:13|0|1|0",
"alias_of": 0,
"bases": [],
@ -51,7 +51,7 @@ OUTPUT:
"short_name": "Foo",
"kind": 26,
"declarations": [],
"spell": "1:1-2:13|0|1|2",
"spell": "2:7-2:10|0|1|2",
"extent": "1:1-2:13|0|1|0",
"alias_of": 0,
"bases": [],

View File

@ -60,7 +60,7 @@ OUTPUT:
"short_name": "T",
"kind": 26,
"declarations": [],
"spell": "4:10-4:20|0|1|2",
"spell": "4:19-4:20|0|1|2",
"extent": "4:10-4:20|0|1|0",
"alias_of": 0,
"bases": [],

View File

@ -31,7 +31,7 @@ OUTPUT:
"short_name": "",
"kind": 23,
"declarations": [],
"spell": "2:3-2:9|17937907487590875128|2|514",
"spell": "2:3-2:9|17937907487590875128|2|1026",
"extent": "2:3-2:28|17937907487590875128|2|0",
"alias_of": 0,
"bases": [],
@ -80,7 +80,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "v",
"declarations": [],
"spell": "3:9-3:10|17937907487590875128|2|514",
"spell": "3:9-3:10|17937907487590875128|2|1026",
"extent": "3:3-3:13|17937907487590875128|2|0",
"type": 0,
"uses": [],
@ -92,7 +92,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "x",
"declarations": [],
"spell": "2:18-2:19|1428566502523368801|2|514",
"spell": "2:18-2:19|1428566502523368801|2|1026",
"extent": "2:12-2:19|1428566502523368801|2|0",
"type": 82,
"uses": [],
@ -104,7 +104,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "y",
"declarations": [],
"spell": "2:21-2:22|1428566502523368801|2|514",
"spell": "2:21-2:22|1428566502523368801|2|1026",
"extent": "2:12-2:22|1428566502523368801|2|0",
"type": 82,
"uses": [],
@ -116,7 +116,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "z",
"declarations": [],
"spell": "2:24-2:25|1428566502523368801|2|514",
"spell": "2:24-2:25|1428566502523368801|2|1026",
"extent": "2:12-2:25|1428566502523368801|2|0",
"type": 82,
"uses": [],

View File

@ -69,7 +69,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "b",
"declarations": [],
"spell": "3:8-3:9|8501689086387244262|2|514",
"spell": "3:8-3:9|8501689086387244262|2|1026",
"extent": "3:3-3:9|8501689086387244262|2|0",
"type": 37,
"uses": [],
@ -81,7 +81,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"declarations": [],
"spell": "2:7-2:8|8501689086387244262|2|514",
"spell": "2:7-2:8|8501689086387244262|2|1026",
"extent": "2:3-2:8|8501689086387244262|2|0",
"type": 53,
"uses": [],

View File

@ -105,7 +105,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "b",
"declarations": [],
"spell": "3:8-3:9|8501689086387244262|2|514",
"spell": "3:8-3:9|8501689086387244262|2|1026",
"extent": "3:3-3:13|8501689086387244262|2|0",
"type": 37,
"uses": [],
@ -117,7 +117,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"declarations": [],
"spell": "2:7-2:8|8501689086387244262|2|514",
"spell": "2:7-2:8|8501689086387244262|2|1026",
"extent": "2:3-2:12|8501689086387244262|2|0",
"type": 53,
"uses": ["9:5-9:6|8501689086387244262|2|20"],

View File

@ -27,7 +27,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["8:3-8:9|0|1|8228"],
"uses": ["8:3-8:9|0|1|16420"],
"callees": []
}, {
"usr": 3385168158331140247,
@ -36,8 +36,8 @@ OUTPUT:
"short_name": "Foo",
"kind": 9,
"storage": 0,
"declarations": ["4:3-4:6|15041163540773201510|2|513"],
"spell": "7:6-7:9|15041163540773201510|2|514",
"declarations": ["4:3-4:6|15041163540773201510|2|1025"],
"spell": "7:6-7:9|15041163540773201510|2|1026",
"extent": "7:1-9:2|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -23,7 +23,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["6:14-6:20|0|1|8228"],
"uses": ["6:14-6:20|0|1|16420"],
"callees": []
}, {
"usr": 11404881820527069090,

View File

@ -28,7 +28,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["5:3-5:9|0|1|8228"],
"uses": ["5:3-5:9|0|1|16420"],
"callees": []
}, {
"usr": 4259594751088586730,
@ -60,7 +60,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["9:3-9:9|0|1|8228"],
"uses": ["9:3-9:9|0|1|16420"],
"callees": []
}],
"usr2type": [],

View File

@ -27,7 +27,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["8:10-8:16|0|1|8228"],
"uses": ["8:10-8:16|0|1|16420"],
"callees": []
}, {
"usr": 10544127002917214589,
@ -36,12 +36,12 @@ OUTPUT:
"short_name": "Wrapper",
"kind": 9,
"storage": 0,
"declarations": ["2:3-2:10|13611487872560323389|2|513"],
"declarations": ["2:3-2:10|13611487872560323389|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [],
"uses": ["8:10-8:16|13611487872560323389|2|8228"],
"uses": ["8:10-8:16|13611487872560323389|2|16420"],
"callees": []
}, {
"usr": 11404881820527069090,

View File

@ -58,7 +58,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["7:3-7:10|0|1|8228"],
"uses": ["7:3-7:10|0|1|16420"],
"callees": []
}],
"usr2type": [],

View File

@ -35,7 +35,7 @@ OUTPUT:
"short_name": "Used",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:12|15041163540773201510|2|513"],
"declarations": ["2:8-2:12|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],

View File

@ -22,7 +22,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["3:3-3:9|0|1|8228"],
"uses": ["3:3-3:9|0|1|16420"],
"callees": []
}, {
"usr": 11404881820527069090,

View File

@ -35,12 +35,12 @@ OUTPUT:
"short_name": "Used",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:12|15041163540773201510|2|513"],
"declarations": ["2:8-2:12|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [],
"uses": ["7:6-7:10|15041163540773201510|2|8228"],
"uses": ["7:6-7:10|15041163540773201510|2|16420"],
"callees": []
}],
"usr2type": [{

View File

@ -71,7 +71,7 @@ OUTPUT:
"short_name": "x",
"hover": "int Foo::x = helper()",
"declarations": [],
"spell": "6:7-6:8|15041163540773201510|2|514",
"spell": "6:7-6:8|15041163540773201510|2|1026",
"extent": "6:3-6:19|15041163540773201510|2|0",
"type": 53,
"uses": [],

View File

@ -20,7 +20,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["4:3-4:6|0|1|8228"],
"uses": ["4:3-4:6|0|1|16420"],
"callees": []
}, {
"usr": 6767773193109753523,

View File

@ -34,12 +34,12 @@ OUTPUT:
"short_name": "foo",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:11|15041163540773201510|2|513"],
"declarations": ["2:8-2:11|15041163540773201510|2|1025"],
"declaring_type": 0,
"bases": [],
"derived": [],
"vars": [],
"uses": ["7:6-7:9|15041163540773201510|2|8228"],
"uses": ["7:6-7:9|15041163540773201510|2|16420"],
"callees": []
}],
"usr2type": [{

View File

@ -39,7 +39,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["5:3-5:9|0|1|8228", "6:3-6:9|0|1|8228"],
"uses": ["5:3-5:9|0|1|16420", "6:3-6:9|0|1|16420"],
"callees": []
}],
"usr2type": [],

View File

@ -56,7 +56,7 @@ OUTPUT:
"short_name": "unique_ptr",
"kind": 26,
"declarations": [],
"spell": "1:1-2:20|0|1|2",
"spell": "2:7-2:17|0|1|2",
"extent": "1:1-2:20|0|1|0",
"alias_of": 0,
"bases": [],
@ -90,7 +90,7 @@ OUTPUT:
"short_name": "unique_ptr",
"kind": 26,
"declarations": [],
"spell": "1:1-2:20|0|1|2",
"spell": "2:7-2:17|0|1|2",
"extent": "1:1-2:20|0|1|0",
"alias_of": 0,
"bases": [],

View File

@ -122,8 +122,8 @@ OUTPUT:
"short_name": "foo",
"kind": 6,
"storage": 0,
"declarations": ["65:23-65:26|15041163540773201510|2|513"],
"spell": "79:26-79:29|15041163540773201510|2|514",
"declarations": ["65:23-65:26|15041163540773201510|2|1025"],
"spell": "79:26-79:29|15041163540773201510|2|1026",
"extent": "79:1-79:51|0|1|0",
"declaring_type": 0,
"bases": [],
@ -163,6 +163,21 @@ OUTPUT:
"vars": [],
"instances": [],
"uses": ["15:30-15:32|0|1|4", "33:23-33:25|0|1|4", "33:63-33:65|0|1|4", "54:25-54:27|0|1|4", "65:14-65:16|0|1|4", "79:12-79:14|0|1|4"]
}, {
"usr": 7147635971744144194,
"detailed_name": "template<> class unique_ptr<S1, S2>",
"qual_name_offset": 17,
"short_name": "unique_ptr",
"kind": 5,
"declarations": [],
"alias_of": 0,
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
"uses": ["15:19-15:29|0|1|4", "33:12-33:22|0|1|4", "33:52-33:62|0|1|4", "54:14-54:24|0|1|4", "65:3-65:13|0|1|4", "79:1-79:11|0|1|4"]
}, {
"usr": 12728490517004312484,
"detailed_name": "struct S2",
@ -192,7 +207,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["15:8-15:18|0|1|4", "15:19-15:29|0|1|4", "33:1-33:11|0|1|4", "33:12-33:22|0|1|4", "33:52-33:62|0|1|4", "54:3-54:13|0|1|4", "54:14-54:24|0|1|4", "65:3-65:13|0|1|4", "79:1-79:11|0|1|4"]
"uses": []
}, {
"usr": 15041163540773201510,
"detailed_name": "class Foo {}",
@ -215,9 +230,9 @@ OUTPUT:
"detailed_name": "unique_ptr",
"qual_name_offset": 0,
"short_name": "unique_ptr",
"kind": 26,
"kind": 5,
"declarations": [],
"spell": "1:1-2:17|0|1|2",
"spell": "2:7-2:17|0|1|2",
"extent": "1:1-2:17|0|1|0",
"alias_of": 0,
"bases": [],
@ -226,7 +241,7 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [2933643612409209903, 500112618220246],
"uses": []
"uses": ["15:8-15:18|0|1|4", "33:1-33:11|0|1|4", "54:3-54:13|0|1|4"]
}],
"usr2var": [{
"usr": 500112618220246,

View File

@ -35,7 +35,7 @@ OUTPUT:
"short_name": "unique_ptr",
"kind": 26,
"declarations": [],
"spell": "1:1-2:20|0|1|2",
"spell": "2:7-2:17|0|1|2",
"extent": "1:1-2:20|0|1|0",
"alias_of": 0,
"bases": [],

View File

@ -74,7 +74,7 @@ OUTPUT:
"qual_name_offset": 0,
"short_name": "a",
"declarations": [],
"spell": "5:16-5:17|15041163540773201510|2|514",
"spell": "5:16-5:17|15041163540773201510|2|1026",
"extent": "5:3-5:17|15041163540773201510|2|0",
"type": 13749354388332789217,
"uses": [],
@ -86,7 +86,7 @@ OUTPUT:
"qual_name_offset": 16,
"short_name": "b",
"declarations": [],
"spell": "6:19-6:20|15041163540773201510|2|514",
"spell": "6:19-6:20|15041163540773201510|2|1026",
"extent": "6:3-6:20|15041163540773201510|2|0",
"type": 8508299082070213750,
"uses": [],

View File

@ -64,7 +64,7 @@ OUTPUT:
"qual_name_offset": 16,
"short_name": "a",
"declarations": [],
"spell": "4:42-4:43|1699390678058422036|3|514",
"spell": "4:42-4:43|1699390678058422036|3|1026",
"extent": "4:26-4:43|1699390678058422036|3|0",
"type": 8508299082070213750,
"uses": [],
@ -76,7 +76,7 @@ OUTPUT:
"qual_name_offset": 13,
"short_name": "f",
"declarations": [],
"spell": "4:23-4:24|1699390678058422036|3|514",
"spell": "4:23-4:24|1699390678058422036|3|1026",
"extent": "4:10-4:24|1699390678058422036|3|0",
"type": 13749354388332789217,
"uses": [],

View File

@ -52,7 +52,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "f",
"declarations": [],
"spell": "4:15-4:16|8908726657907936744|3|514",
"spell": "4:15-4:16|8908726657907936744|3|1026",
"extent": "4:10-4:16|8908726657907936744|3|0",
"type": 15041163540773201510,
"uses": [],

View File

@ -76,7 +76,7 @@ OUTPUT:
"qual_name_offset": 6,
"short_name": "a0",
"declarations": [],
"spell": "3:16-3:18|16858540520096802573|3|514",
"spell": "3:16-3:18|16858540520096802573|3|1026",
"extent": "3:10-3:18|16858540520096802573|3|0",
"type": 13487927231218873822,
"uses": [],
@ -113,7 +113,7 @@ OUTPUT:
"qual_name_offset": 12,
"short_name": "a1",
"declarations": [],
"spell": "3:32-3:34|16858540520096802573|3|514",
"spell": "3:32-3:34|16858540520096802573|3|1026",
"extent": "3:20-3:34|16858540520096802573|3|0",
"type": 13487927231218873822,
"uses": [],

View File

@ -29,8 +29,8 @@ OUTPUT:
"short_name": "Empty",
"kind": 6,
"storage": 0,
"declarations": ["9:8-9:13|15041163540773201510|2|513"],
"spell": "13:11-13:16|15041163540773201510|2|514",
"declarations": ["9:8-9:13|15041163540773201510|2|1025"],
"spell": "13:11-13:16|15041163540773201510|2|1026",
"extent": "13:1-13:21|0|1|0",
"declaring_type": 0,
"bases": [],
@ -75,8 +75,8 @@ OUTPUT:
"short_name": "Get",
"kind": 6,
"storage": 0,
"declarations": ["8:9-8:12|15041163540773201510|2|513"],
"spell": "12:12-12:15|15041163540773201510|2|514",
"declarations": ["8:9-8:12|15041163540773201510|2|1025"],
"spell": "12:12-12:15|15041163540773201510|2|1026",
"extent": "12:1-12:40|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -19,7 +19,7 @@ OUTPUT:
"declarations": [],
"spell": "4:7-4:11|0|1|2",
"extent": "4:1-4:22|0|1|0",
"alias_of": 0,
"alias_of": 5123806965838456033,
"bases": [],
"derived": [],
"types": [],
@ -27,6 +27,21 @@ OUTPUT:
"vars": [],
"instances": [],
"uses": ["5:13-5:17|0|1|4"]
}, {
"usr": 5123806965838456033,
"detailed_name": "template<> struct Foo<int>",
"qual_name_offset": 18,
"short_name": "Foo",
"kind": 5,
"declarations": [],
"alias_of": 0,
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
"uses": ["4:14-4:17|0|1|4"]
}, {
"usr": 10528472276654770367,
"detailed_name": "struct Foo",
@ -41,7 +56,22 @@ OUTPUT:
"funcs": [],
"vars": [],
"instances": [],
"uses": ["4:14-4:17|0|1|4", "5:9-5:12|0|1|4"]
"uses": []
}, {
"usr": 14491685842684954828,
"detailed_name": "template<> struct Foo<Foo<int>>",
"qual_name_offset": 18,
"short_name": "Foo",
"kind": 5,
"declarations": [],
"alias_of": 0,
"bases": [],
"derived": [],
"types": [],
"funcs": [],
"vars": [],
"instances": [],
"uses": ["5:9-5:12|0|1|4"]
}, {
"usr": 15933698173231330933,
"detailed_name": "typedef Foo<Foo1> Foo2",

View File

@ -21,8 +21,8 @@ OUTPUT:
"short_name": "make",
"kind": 6,
"storage": 0,
"declarations": ["2:8-2:12|15041163540773201510|2|513"],
"spell": "5:11-5:15|15041163540773201510|2|514",
"declarations": ["2:8-2:12|15041163540773201510|2|1025"],
"spell": "5:11-5:15|15041163540773201510|2|1026",
"extent": "5:1-8:2|0|1|0",
"declaring_type": 0,
"bases": [],

View File

@ -47,7 +47,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["14:14-14:17|0|1|8228"],
"uses": ["14:14-14:17|0|1|16420"],
"callees": []
}, {
"usr": 18319417758892371313,
@ -61,7 +61,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["14:3-14:9|0|1|8228"],
"uses": ["14:3-14:9|0|1|16420"],
"callees": []
}],
"usr2type": [{
@ -119,7 +119,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "field_var",
"declarations": [],
"spell": "7:7-7:16|15041163540773201510|2|514",
"spell": "7:7-7:16|15041163540773201510|2|1026",
"extent": "7:3-7:16|15041163540773201510|2|0",
"type": 53,
"uses": ["14:28-14:37|15041163540773201510|2|12"],
@ -130,8 +130,8 @@ OUTPUT:
"detailed_name": "static int Foo::static_var",
"qual_name_offset": 11,
"short_name": "static_var",
"declarations": ["6:14-6:24|15041163540773201510|2|513"],
"spell": "10:10-10:20|15041163540773201510|2|514",
"declarations": ["6:14-6:24|15041163540773201510|2|1025"],
"spell": "10:10-10:20|15041163540773201510|2|1026",
"extent": "10:1-10:24|0|1|0",
"type": 53,
"uses": ["14:45-14:55|0|1|12"],

View File

@ -41,7 +41,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["6:10-6:13|0|1|8228", "6:18-6:21|0|1|8228"],
"uses": ["6:10-6:13|0|1|16420", "6:18-6:21|0|1|16420"],
"callees": []
}, {
"usr": 18319417758892371313,
@ -55,7 +55,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["6:3-6:9|0|1|8228"],
"uses": ["6:3-6:9|0|1|16420"],
"callees": []
}],
"usr2type": [],

View File

@ -26,7 +26,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["4:13-4:19|0|1|132", "7:3-7:9|0|1|8228"],
"uses": ["4:13-4:19|0|1|132", "7:3-7:9|0|1|16420"],
"callees": []
}, {
"usr": 11404881820527069090,
@ -56,7 +56,7 @@ OUTPUT:
"spell": "4:8-4:9|11404881820527069090|3|2",
"extent": "4:3-4:19|11404881820527069090|3|0",
"type": 0,
"uses": ["5:3-5:4|11404881820527069090|3|8236"],
"uses": ["5:3-5:4|11404881820527069090|3|16428"],
"kind": 13,
"storage": 0
}]

View File

@ -50,7 +50,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["16:3-16:9|0|1|8228"],
"uses": ["16:3-16:9|0|1|16420"],
"callees": []
}, {
"usr": 17175780305784503374,
@ -64,7 +64,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["14:3-14:9|0|1|8228", "15:3-15:9|0|1|8228", "17:3-17:9|0|1|8228"],
"uses": ["14:3-14:9|0|1|16420", "15:3-15:9|0|1|16420", "17:3-17:9|0|1|16420"],
"callees": []
}],
"usr2type": [{
@ -112,7 +112,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "y",
"declarations": [],
"spell": "4:7-4:8|15041163540773201510|2|514",
"spell": "4:7-4:8|15041163540773201510|2|1026",
"extent": "4:3-4:8|15041163540773201510|2|0",
"type": 53,
"uses": ["17:12-17:13|15041163540773201510|2|12"],
@ -124,7 +124,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "x",
"declarations": [],
"spell": "3:7-3:8|15041163540773201510|2|514",
"spell": "3:7-3:8|15041163540773201510|2|1026",
"extent": "3:3-3:8|15041163540773201510|2|0",
"type": 53,
"uses": ["12:5-12:6|15041163540773201510|2|20", "13:5-13:6|15041163540773201510|2|4", "14:12-14:13|15041163540773201510|2|12", "15:12-15:13|15041163540773201510|2|12", "16:13-16:14|15041163540773201510|2|132"],

View File

@ -41,7 +41,7 @@ OUTPUT:
"bases": [],
"derived": [],
"vars": [],
"uses": ["8:3-8:9|0|1|8228"],
"uses": ["8:3-8:9|0|1|16420"],
"callees": []
}],
"usr2type": [{
@ -82,7 +82,7 @@ OUTPUT:
"detailed_name": "static int Foo::x",
"qual_name_offset": 11,
"short_name": "x",
"declarations": ["2:14-2:15|15041163540773201510|2|513"],
"declarations": ["2:14-2:15|15041163540773201510|2|1025"],
"type": 53,
"uses": ["8:15-8:16|15041163540773201510|2|12"],
"kind": 13,

View File

@ -54,8 +54,8 @@ OUTPUT:
"qual_name_offset": 25,
"short_name": "static_var",
"hover": "static constexpr VarType Holder::static_var = (VarType)0x0",
"declarations": ["4:28-4:38|10028537921178202800|2|513"],
"spell": "7:23-7:33|10028537921178202800|2|514",
"declarations": ["4:28-4:38|10028537921178202800|2|1025"],
"spell": "7:23-7:33|10028537921178202800|2|1026",
"extent": "7:1-7:33|0|1|0",
"type": 5792006888140599735,
"uses": [],

View File

@ -45,7 +45,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"declarations": [],
"spell": "1:14-1:15|11998306017310352355|3|514",
"spell": "1:14-1:15|11998306017310352355|3|1026",
"extent": "1:10-1:15|11998306017310352355|3|0",
"type": 53,
"uses": ["2:3-2:4|11998306017310352355|3|4"],

View File

@ -63,7 +63,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "a",
"declarations": [],
"spell": "1:14-1:15|11998306017310352355|3|514",
"spell": "1:14-1:15|11998306017310352355|3|1026",
"extent": "1:10-1:15|11998306017310352355|3|0",
"type": 53,
"uses": ["2:3-2:4|11998306017310352355|3|20", "7:3-7:4|11998306017310352355|3|20"],

View File

@ -34,7 +34,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "member",
"declarations": [],
"spell": "2:8-2:14|15041163540773201510|2|514",
"spell": "2:8-2:14|15041163540773201510|2|1026",
"extent": "2:3-2:14|15041163540773201510|2|0",
"type": 15041163540773201510,
"uses": [],

View File

@ -32,8 +32,8 @@ OUTPUT:
"detailed_name": "static Foo *Foo::member",
"qual_name_offset": 12,
"short_name": "member",
"declarations": ["2:15-2:21|15041163540773201510|2|513"],
"spell": "4:11-4:17|15041163540773201510|2|514",
"declarations": ["2:15-2:21|15041163540773201510|2|1025"],
"spell": "4:11-4:17|15041163540773201510|2|1026",
"extent": "4:1-4:27|0|1|0",
"type": 15041163540773201510,
"uses": [],

View File

@ -45,7 +45,7 @@ OUTPUT:
"detailed_name": "static int Foo::member",
"qual_name_offset": 11,
"short_name": "member",
"declarations": ["2:14-2:20|15041163540773201510|2|513"],
"declarations": ["2:14-2:20|15041163540773201510|2|1025"],
"type": 53,
"uses": [],
"kind": 13,

View File

@ -46,7 +46,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "p1",
"declarations": [],
"spell": "3:24-3:26|8908726657907936744|3|514",
"spell": "3:24-3:26|8908726657907936744|3|1026",
"extent": "3:19-3:26|8908726657907936744|3|0",
"type": 15041163540773201510,
"uses": [],
@ -58,7 +58,7 @@ OUTPUT:
"qual_name_offset": 5,
"short_name": "p0",
"declarations": [],
"spell": "3:15-3:17|8908726657907936744|3|514",
"spell": "3:15-3:17|8908726657907936744|3|1026",
"extent": "3:10-3:17|8908726657907936744|3|0",
"type": 15041163540773201510,
"uses": [],

View File

@ -45,7 +45,7 @@ OUTPUT:
"qual_name_offset": 4,
"short_name": "p",
"declarations": [],
"spell": "1:14-1:15|11998306017310352355|3|514",
"spell": "1:14-1:15|11998306017310352355|3|1026",
"extent": "1:10-1:15|11998306017310352355|3|0",
"type": 53,
"uses": [],

View File

@ -19,12 +19,10 @@ using ccls::Intern;
using namespace clang;
using llvm::Timer;
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
#include <algorithm>
#include <map>
#include <chrono>
#include <unordered_set>
namespace {
@ -54,12 +52,10 @@ struct IndexParam {
// If this is the first time we have seen the file (ignoring if we are
// generating an index for it):
auto it = SeenUniqueID.try_emplace(File.getUniqueID());
if (it.second) {
auto [it, inserted] = SeenUniqueID.try_emplace(File.getUniqueID());
if (inserted) {
std::string file_name = FileName(File);
// Add to all files we have seen so we can generate proper dependency
// graph.
it.first->second = file_name;
it->second = file_name;
// Set modification time.
std::optional<int64_t> write_time = LastWriteTime(file_name);
@ -394,11 +390,11 @@ public:
Usr GetUsr(const Decl *D, IndexParam::DeclInfo **info = nullptr) const {
D = D->getCanonicalDecl();
auto R = param.Decl2Info.try_emplace(D);
if (R.second) {
auto [it, inserted] = param.Decl2Info.try_emplace(D);
if (inserted) {
SmallString<256> USR;
index::generateUSRForDecl(D, USR);
auto &info = R.first->second;
auto &info = it->second;
info.usr = HashUsr(USR);
if (auto *ND = dyn_cast<NamedDecl>(D)) {
info.short_name = ND->getNameAsString();
@ -407,8 +403,8 @@ public:
}
}
if (info)
*info = &R.first->second;
return R.first->second.usr;
*info = &it->second;
return it->second.usr;
}
Use GetUse(IndexFile *db, Range range, const DeclContext *DC,
@ -710,9 +706,11 @@ public:
SourceRange R1 = D1->getSourceRange();
if (SM.getFileID(R1.getBegin()) == LocFID) {
IndexType& type1 = db->ToType(usr1);
Range loc1 = FromTokenRange(SM, Lang, R1);
type1.def.spell = GetUse(db, loc1, SemDC, Role::Definition);
type1.def.extent = GetUse(db, loc1, LexDC, Role::None);
SourceLocation L1 = D1->getLocation();
type1.def.spell = GetUse(db, FromTokenRange(SM, Lang, {L1, L1}),
SemDC, Role::Definition);
type1.def.extent =
GetUse(db, FromTokenRange(SM, Lang, R1), LexDC, Role::None);
type1.def.detailed_name = Intern(info1->short_name);
type1.def.short_name_size = int16_t(info1->short_name.size());
type1.def.kind = lsSymbolKind::TypeParameter;
@ -1043,24 +1041,24 @@ IndexFile::IndexFile(llvm::sys::fs::UniqueID UniqueID, const std::string &path,
: UniqueID(UniqueID), path(path), file_contents(contents) {}
IndexFunc& IndexFile::ToFunc(Usr usr) {
auto ret = usr2func.try_emplace(usr);
if (ret.second)
ret.first->second.usr = usr;
return ret.first->second;
auto [it, inserted] = usr2func.try_emplace(usr);
if (inserted)
it->second.usr = usr;
return it->second;
}
IndexType& IndexFile::ToType(Usr usr) {
auto ret = usr2type.try_emplace(usr);
if (ret.second)
ret.first->second.usr = usr;
return ret.first->second;
auto [it, inserted] = usr2type.try_emplace(usr);
if (inserted)
it->second.usr = usr;
return it->second;
}
IndexVar& IndexFile::ToVar(Usr usr) {
auto ret = usr2var.try_emplace(usr);
if (ret.second)
ret.first->second.usr = usr;
return ret.first->second;
auto [it, inserted] = usr2var.try_emplace(usr);
if (inserted)
it->second.usr = usr;
return it->second;
}
std::string IndexFile::ToString() {
@ -1138,10 +1136,12 @@ std::vector<std::unique_ptr<IndexFile>> Index(
auto DataConsumer = std::make_shared<IndexDataConsumer>(param);
index::IndexingOptions IndexOpts;
memset(&IndexOpts, 1, sizeof IndexOpts);
IndexOpts.SystemSymbolFilter =
index::IndexingOptions::SystemSymbolFilterKind::All;
IndexOpts.IndexFunctionLocals = true;
#if LLVM_VERSION_MAJOR >= 7
IndexOpts.IndexImplicitInstantiation = true;
#endif
std::unique_ptr<FrontendAction> IndexAction = createIndexingAction(
DataConsumer, IndexOpts, std::make_unique<IndexFrontendAction>(param));

View File

@ -345,16 +345,19 @@ void EmitSemanticHighlighting(DB *db,
std::sort(scratch.begin(), scratch.end(),
[](auto &l, auto &r) { return l.first.start < r.first.start; });
const auto &buf = wfile->buffer_content;
int l = 0, c = 0, i = 0;
int l = 0, c = 0, i = 0, p = 0;
auto mov = [&](int line, int col) {
if (l < line)
c = 0;
for (; l < line && i < buf.size(); i++)
for (; l < line && i < buf.size(); i++) {
if (buf[i] == '\n')
l++;
if (uint8_t(buf[i]) < 128 || 192 <= uint8_t(buf[i]))
p++;
}
if (l < line) return true;
for (; c < col && i < buf.size(); c++)
if (uint8_t(buf[i++]) >= 128)
for (; c < col && i < buf.size() && buf[i] != '\n'; c++)
if (p++, uint8_t(buf[i++]) >= 128)
// Skip 0b10xxxxxx
while (i < buf.size() && uint8_t(buf[i]) >= 128 && uint8_t(buf[i]) < 192)
i++;
@ -364,10 +367,10 @@ void EmitSemanticHighlighting(DB *db,
lsRange &r = entry.first;
if (mov(r.start.line, r.start.character))
continue;
int beg = i;
int beg = p;
if (mov(r.end.line, r.end.character))
continue;
entry.second->ranges.emplace_back(beg, i);
entry.second->ranges.emplace_back(beg, p);
}
}

View File

@ -114,15 +114,6 @@ struct IndexUpdate {
UseUpdate vars_uses;
};
template <typename Q>
struct EntityToIndex {
using argument_type = const Q&;
llvm::DenseMap<Usr, unsigned> m;
unsigned operator()(const Q& entity) const {
return m[entity.usr];
}
};
struct WrappedUsr {
Usr usr;
};