diff --git a/README.md b/README.md index 0da7b661..7075260d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/index_tests/constructors/constructor.cc b/index_tests/constructors/constructor.cc index b444e162..fac49ff8 100644 --- a/index_tests/constructors/constructor.cc +++ b/index_tests/constructors/constructor.cc @@ -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, diff --git a/index_tests/constructors/destructor.cc b/index_tests/constructors/destructor.cc index 32bfd0d8..c144373d 100644 --- a/index_tests/constructors/destructor.cc +++ b/index_tests/constructors/destructor.cc @@ -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": [], diff --git a/index_tests/constructors/implicit_constructor.cc b/index_tests/constructors/implicit_constructor.cc index e84ae3ff..3b81b477 100644 --- a/index_tests/constructors/implicit_constructor.cc +++ b/index_tests/constructors/implicit_constructor.cc @@ -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": [{ diff --git a/index_tests/constructors/invalid_reference.cc b/index_tests/constructors/invalid_reference.cc index 7f17706c..28310443 100644 --- a/index_tests/constructors/invalid_reference.cc +++ b/index_tests/constructors/invalid_reference.cc @@ -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": [], diff --git a/index_tests/constructors/make_functions.cc b/index_tests/constructors/make_functions.cc index c5fc5788..e5631096 100644 --- a/index_tests/constructors/make_functions.cc +++ b/index_tests/constructors/make_functions.cc @@ -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 }] } */ diff --git a/index_tests/declaration_vs_definition/class_member.cc b/index_tests/declaration_vs_definition/class_member.cc index 3478c5e8..a4333abc 100644 --- a/index_tests/declaration_vs_definition/class_member.cc +++ b/index_tests/declaration_vs_definition/class_member.cc @@ -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": [], diff --git a/index_tests/declaration_vs_definition/class_member_static.cc b/index_tests/declaration_vs_definition/class_member_static.cc index 5434f6cb..0e5b3222 100644 --- a/index_tests/declaration_vs_definition/class_member_static.cc +++ b/index_tests/declaration_vs_definition/class_member_static.cc @@ -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": [], diff --git a/index_tests/declaration_vs_definition/func_associated_function_params.cc b/index_tests/declaration_vs_definition/func_associated_function_params.cc index a399d5d9..bbc66a25 100644 --- a/index_tests/declaration_vs_definition/func_associated_function_params.cc +++ b/index_tests/declaration_vs_definition/func_associated_function_params.cc @@ -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": [], diff --git a/index_tests/declaration_vs_definition/method.cc b/index_tests/declaration_vs_definition/method.cc index 3b323d76..92edeb9b 100644 --- a/index_tests/declaration_vs_definition/method.cc +++ b/index_tests/declaration_vs_definition/method.cc @@ -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": [], diff --git a/index_tests/enums/enum_class_decl.cc b/index_tests/enums/enum_class_decl.cc index 5e2ad16c..34a1c978 100644 --- a/index_tests/enums/enum_class_decl.cc +++ b/index_tests/enums/enum_class_decl.cc @@ -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": [], diff --git a/index_tests/enums/enum_decl.cc b/index_tests/enums/enum_decl.cc index da4cfc64..3b28d1aa 100644 --- a/index_tests/enums/enum_decl.cc +++ b/index_tests/enums/enum_decl.cc @@ -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": [], diff --git a/index_tests/enums/enum_inherit.cc b/index_tests/enums/enum_inherit.cc index fd36cf56..195b93d9 100644 --- a/index_tests/enums/enum_inherit.cc +++ b/index_tests/enums/enum_inherit.cc @@ -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": [], diff --git a/index_tests/enums/enum_usage.cc b/index_tests/enums/enum_usage.cc index b086892b..d7c94e44 100644 --- a/index_tests/enums/enum_usage.cc +++ b/index_tests/enums/enum_usage.cc @@ -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": [], diff --git a/index_tests/foobar.cc b/index_tests/foobar.cc index 24ca7afb..cdbe2762 100644 --- a/index_tests/foobar.cc +++ b/index_tests/foobar.cc @@ -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": [], diff --git a/index_tests/inheritance/class_inherit.cc b/index_tests/inheritance/class_inherit.cc index 68149852..3f797bc1 100644 --- a/index_tests/inheritance/class_inherit.cc +++ b/index_tests/inheritance/class_inherit.cc @@ -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 {}", diff --git a/index_tests/inheritance/class_inherit_templated_parent.cc b/index_tests/inheritance/class_inherit_templated_parent.cc index 1c9f1b9c..14bedb59 100644 --- a/index_tests/inheritance/class_inherit_templated_parent.cc +++ b/index_tests/inheritance/class_inherit_templated_parent.cc @@ -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 {}", @@ -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, Derived1<4>, Derived2 {}", @@ -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": [] } diff --git a/index_tests/inheritance/class_multiple_inherit.cc b/index_tests/inheritance/class_multiple_inherit.cc index 37742632..18164c61 100644 --- a/index_tests/inheritance/class_multiple_inherit.cc +++ b/index_tests/inheritance/class_multiple_inherit.cc @@ -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": [] } diff --git a/index_tests/inheritance/function_override.cc b/index_tests/inheritance/function_override.cc index 446e0816..94348b67 100644 --- a/index_tests/inheritance/function_override.cc +++ b/index_tests/inheritance/function_override.cc @@ -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 {}", diff --git a/index_tests/inheritance/interface_pure_virtual.cc b/index_tests/inheritance/interface_pure_virtual.cc index 2778e0af..b68b4d28 100644 --- a/index_tests/inheritance/interface_pure_virtual.cc +++ b/index_tests/inheritance/interface_pure_virtual.cc @@ -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": [], diff --git a/index_tests/inheritance/multiple_base_functions.cc b/index_tests/inheritance/multiple_base_functions.cc index 1d86907f..6b128d74 100644 --- a/index_tests/inheritance/multiple_base_functions.cc +++ b/index_tests/inheritance/multiple_base_functions.cc @@ -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": [] } diff --git a/index_tests/lambdas/lambda.cc b/index_tests/lambdas/lambda.cc index a6284a4b..983889e9 100644 --- a/index_tests/lambdas/lambda.cc +++ b/index_tests/lambdas/lambda.cc @@ -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": [{ diff --git a/index_tests/macros/complex.cc b/index_tests/macros/complex.cc index 38c8e22b..70d81385 100644 --- a/index_tests/macros/complex.cc +++ b/index_tests/macros/complex.cc @@ -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": [{ diff --git a/index_tests/macros/foo.cc b/index_tests/macros/foo.cc index c2e05248..e1c33920 100644 --- a/index_tests/macros/foo.cc +++ b/index_tests/macros/foo.cc @@ -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": [], diff --git a/index_tests/method_declaration.cc b/index_tests/method_declaration.cc index c423ccdf..7d00e90e 100644 --- a/index_tests/method_declaration.cc +++ b/index_tests/method_declaration.cc @@ -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": [], diff --git a/index_tests/method_definition.cc b/index_tests/method_definition.cc index 8fb481a6..3f129e24 100644 --- a/index_tests/method_definition.cc +++ b/index_tests/method_definition.cc @@ -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": [], diff --git a/index_tests/method_inline_declaration.cc b/index_tests/method_inline_declaration.cc index e676130f..601d5d31 100644 --- a/index_tests/method_inline_declaration.cc +++ b/index_tests/method_inline_declaration.cc @@ -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": [], diff --git a/index_tests/multi_file/funky_enum.cc b/index_tests/multi_file/funky_enum.cc index f49c6297..d3504989 100644 --- a/index_tests/multi_file/funky_enum.cc +++ b/index_tests/multi_file/funky_enum.cc @@ -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": [], diff --git a/index_tests/multi_file/impl.cc b/index_tests/multi_file/impl.cc index 8501799b..36950435 100644 --- a/index_tests/multi_file/impl.cc +++ b/index_tests/multi_file/impl.cc @@ -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": [], diff --git a/index_tests/multi_file/simple_impl.cc b/index_tests/multi_file/simple_impl.cc index 1e6e9519..fa2b9fb1 100644 --- a/index_tests/multi_file/simple_impl.cc +++ b/index_tests/multi_file/simple_impl.cc @@ -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": [], diff --git a/index_tests/multi_file/static.cc b/index_tests/multi_file/static.cc index bc5e50a4..9ef71ea2 100644 --- a/index_tests/multi_file/static.cc +++ b/index_tests/multi_file/static.cc @@ -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": [], diff --git a/index_tests/namespaces/function_declaration.cc b/index_tests/namespaces/function_declaration.cc index 4a65e65e..f73d3e18 100644 --- a/index_tests/namespaces/function_declaration.cc +++ b/index_tests/namespaces/function_declaration.cc @@ -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": [], diff --git a/index_tests/namespaces/function_definition.cc b/index_tests/namespaces/function_definition.cc index 08bec46e..a003e49f 100644 --- a/index_tests/namespaces/function_definition.cc +++ b/index_tests/namespaces/function_definition.cc @@ -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": [], diff --git a/index_tests/namespaces/method_declaration.cc b/index_tests/namespaces/method_declaration.cc index 4e728b30..09a33698 100644 --- a/index_tests/namespaces/method_declaration.cc +++ b/index_tests/namespaces/method_declaration.cc @@ -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": [], diff --git a/index_tests/namespaces/method_definition.cc b/index_tests/namespaces/method_definition.cc index ed61dfe2..e8367729 100644 --- a/index_tests/namespaces/method_definition.cc +++ b/index_tests/namespaces/method_definition.cc @@ -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": [], diff --git a/index_tests/namespaces/method_inline_declaration.cc b/index_tests/namespaces/method_inline_declaration.cc index 3890719d..bd8dda46 100644 --- a/index_tests/namespaces/method_inline_declaration.cc +++ b/index_tests/namespaces/method_inline_declaration.cc @@ -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": [], diff --git a/index_tests/namespaces/namespace_alias.cc b/index_tests/namespaces/namespace_alias.cc index 32c420fa..f42a38b0 100644 --- a/index_tests/namespaces/namespace_alias.cc +++ b/index_tests/namespaces/namespace_alias.cc @@ -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"], diff --git a/index_tests/namespaces/namespace_reference.cc b/index_tests/namespaces/namespace_reference.cc index 323c6d91..815133e2 100644 --- a/index_tests/namespaces/namespace_reference.cc +++ b/index_tests/namespaces/namespace_reference.cc @@ -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"], diff --git a/index_tests/operators/operator.cc b/index_tests/operators/operator.cc index 2463ce43..2a5d1044 100644 --- a/index_tests/operators/operator.cc +++ b/index_tests/operators/operator.cc @@ -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": [], diff --git a/index_tests/outline/static_function_in_type.cc b/index_tests/outline/static_function_in_type.cc index 6f6818e0..9f5f84b6 100644 --- a/index_tests/outline/static_function_in_type.cc +++ b/index_tests/outline/static_function_in_type.cc @@ -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": [], diff --git a/index_tests/templates/func_specialized_template_param.cc b/index_tests/templates/func_specialized_template_param.cc index 400b610f..4945caf4 100644 --- a/index_tests/templates/func_specialized_template_param.cc +++ b/index_tests/templates/func_specialized_template_param.cc @@ -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", + "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": [] } diff --git a/index_tests/templates/implicit_variable_instantiation.cc b/index_tests/templates/implicit_variable_instantiation.cc index e4a75de5..934522e8 100644 --- a/index_tests/templates/implicit_variable_instantiation.cc +++ b/index_tests/templates/implicit_variable_instantiation.cc @@ -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::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::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": [], diff --git a/index_tests/templates/member_ref_in_template.cc b/index_tests/templates/member_ref_in_template.cc index a9d7f9e2..db98e0c0 100644 --- a/index_tests/templates/member_ref_in_template.cc +++ b/index_tests/templates/member_ref_in_template.cc @@ -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": [], diff --git a/index_tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc b/index_tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc index 909cce9e..55452c0b 100644 --- a/index_tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc +++ b/index_tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc @@ -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::foo()", "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::foo()", "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": [], diff --git a/index_tests/templates/namespace_template_type_usage_folded_into_one.cc b/index_tests/templates/namespace_template_type_usage_folded_into_one.cc index aeb397de..8563a02e 100644 --- a/index_tests/templates/namespace_template_type_usage_folded_into_one.cc +++ b/index_tests/templates/namespace_template_type_usage_folded_into_one.cc @@ -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": [], diff --git a/index_tests/templates/specialization.cc b/index_tests/templates/specialization.cc index 2acb713f..3c92252d 100644 --- a/index_tests/templates/specialization.cc +++ b/index_tests/templates/specialization.cc @@ -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> {}", @@ -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 class vector> {}", @@ -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": [], diff --git a/index_tests/templates/specialized_func_definition.cc b/index_tests/templates/specialized_func_definition.cc index d23cf26a..1add46b7 100644 --- a/index_tests/templates/specialized_func_definition.cc +++ b/index_tests/templates/specialized_func_definition.cc @@ -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": [], diff --git a/index_tests/templates/template_class_func_usage_folded_into_one.cc b/index_tests/templates/template_class_func_usage_folded_into_one.cc index ea9f0bf0..741c2356 100644 --- a/index_tests/templates/template_class_func_usage_folded_into_one.cc +++ b/index_tests/templates/template_class_func_usage_folded_into_one.cc @@ -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": [], diff --git a/index_tests/templates/template_class_template_func_usage_folded_into_one.cc b/index_tests/templates/template_class_template_func_usage_folded_into_one.cc index 52533cdd..e969f650 100644 --- a/index_tests/templates/template_class_template_func_usage_folded_into_one.cc +++ b/index_tests/templates/template_class_template_func_usage_folded_into_one.cc @@ -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": [], diff --git a/index_tests/templates/template_class_type_usage_folded_into_one.cc b/index_tests/templates/template_class_type_usage_folded_into_one.cc index 37377cbc..f80e5f0e 100644 --- a/index_tests/templates/template_class_type_usage_folded_into_one.cc +++ b/index_tests/templates/template_class_type_usage_folded_into_one.cc @@ -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": [], diff --git a/index_tests/templates/template_class_var_usage_folded_into_one.cc b/index_tests/templates/template_class_var_usage_folded_into_one.cc index a6a84ad8..8ab2b8dc 100644 --- a/index_tests/templates/template_class_var_usage_folded_into_one.cc +++ b/index_tests/templates/template_class_var_usage_folded_into_one.cc @@ -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, diff --git a/index_tests/templates/template_type_usage_folded_into_one.cc b/index_tests/templates/template_type_usage_folded_into_one.cc index 0ecebac8..86399892 100644 --- a/index_tests/templates/template_type_usage_folded_into_one.cc +++ b/index_tests/templates/template_type_usage_folded_into_one.cc @@ -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": [], diff --git a/index_tests/templates/template_var_usage_folded_into_one.cc b/index_tests/templates/template_var_usage_folded_into_one.cc index b4ef4977..e325205d 100644 --- a/index_tests/templates/template_var_usage_folded_into_one.cc +++ b/index_tests/templates/template_var_usage_folded_into_one.cc @@ -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": [], diff --git a/index_tests/types/anonymous_struct.cc b/index_tests/types/anonymous_struct.cc index 370d30e5..ef381013 100644 --- a/index_tests/types/anonymous_struct.cc +++ b/index_tests/types/anonymous_struct.cc @@ -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": [], diff --git a/index_tests/unions/union_decl.cc b/index_tests/unions/union_decl.cc index b7500dbc..9a3ae5f9 100644 --- a/index_tests/unions/union_decl.cc +++ b/index_tests/unions/union_decl.cc @@ -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": [], diff --git a/index_tests/unions/union_usage.cc b/index_tests/unions/union_usage.cc index 148bf27b..ee53d3fb 100644 --- a/index_tests/unions/union_usage.cc +++ b/index_tests/unions/union_usage.cc @@ -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"], diff --git a/index_tests/usage/func_called_from_constructor.cc b/index_tests/usage/func_called_from_constructor.cc index 9757455b..3a874534 100644 --- a/index_tests/usage/func_called_from_constructor.cc +++ b/index_tests/usage/func_called_from_constructor.cc @@ -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": [], diff --git a/index_tests/usage/func_called_from_macro_argument.cc b/index_tests/usage/func_called_from_macro_argument.cc index 3215fa23..ce4e865c 100644 --- a/index_tests/usage/func_called_from_macro_argument.cc +++ b/index_tests/usage/func_called_from_macro_argument.cc @@ -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, diff --git a/index_tests/usage/func_called_from_template.cc b/index_tests/usage/func_called_from_template.cc index 9ca6b37a..19a12e69 100644 --- a/index_tests/usage/func_called_from_template.cc +++ b/index_tests/usage/func_called_from_template.cc @@ -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": [], diff --git a/index_tests/usage/func_called_implicit_ctor.cc b/index_tests/usage/func_called_implicit_ctor.cc index f4a07519..78ef5d0a 100644 --- a/index_tests/usage/func_called_implicit_ctor.cc +++ b/index_tests/usage/func_called_implicit_ctor.cc @@ -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, diff --git a/index_tests/usage/func_usage_addr_func.cc b/index_tests/usage/func_usage_addr_func.cc index 49afc9ac..f6fa7e86 100644 --- a/index_tests/usage/func_usage_addr_func.cc +++ b/index_tests/usage/func_usage_addr_func.cc @@ -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": [], diff --git a/index_tests/usage/func_usage_addr_method.cc b/index_tests/usage/func_usage_addr_method.cc index 27508d54..aec72225 100644 --- a/index_tests/usage/func_usage_addr_method.cc +++ b/index_tests/usage/func_usage_addr_method.cc @@ -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": [], diff --git a/index_tests/usage/func_usage_call_func.cc b/index_tests/usage/func_usage_call_func.cc index b2c0e896..acf35619 100644 --- a/index_tests/usage/func_usage_call_func.cc +++ b/index_tests/usage/func_usage_call_func.cc @@ -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, diff --git a/index_tests/usage/func_usage_call_method.cc b/index_tests/usage/func_usage_call_method.cc index 3a78b2fd..9cd1fa56 100644 --- a/index_tests/usage/func_usage_call_method.cc +++ b/index_tests/usage/func_usage_call_method.cc @@ -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": [{ diff --git a/index_tests/usage/func_usage_class_inline_var_def.cc b/index_tests/usage/func_usage_class_inline_var_def.cc index 0a94d6e6..dbbd7288 100644 --- a/index_tests/usage/func_usage_class_inline_var_def.cc +++ b/index_tests/usage/func_usage_class_inline_var_def.cc @@ -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": [], diff --git a/index_tests/usage/func_usage_forward_decl_func.cc b/index_tests/usage/func_usage_forward_decl_func.cc index bf7c7c5a..5796e640 100644 --- a/index_tests/usage/func_usage_forward_decl_func.cc +++ b/index_tests/usage/func_usage_forward_decl_func.cc @@ -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, diff --git a/index_tests/usage/func_usage_forward_decl_method.cc b/index_tests/usage/func_usage_forward_decl_method.cc index e1ee4d45..19fa0718 100644 --- a/index_tests/usage/func_usage_forward_decl_method.cc +++ b/index_tests/usage/func_usage_forward_decl_method.cc @@ -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": [{ diff --git a/index_tests/usage/func_usage_template_func.cc b/index_tests/usage/func_usage_template_func.cc index 9be1e81a..40952f82 100644 --- a/index_tests/usage/func_usage_template_func.cc +++ b/index_tests/usage/func_usage_template_func.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_as_template_parameter.cc b/index_tests/usage/type_usage_as_template_parameter.cc index c8a5e6c3..129c33f5 100644 --- a/index_tests/usage/type_usage_as_template_parameter.cc +++ b/index_tests/usage/type_usage_as_template_parameter.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_as_template_parameter_complex.cc b/index_tests/usage/type_usage_as_template_parameter_complex.cc index 1af6dbdf..1173d954 100644 --- a/index_tests/usage/type_usage_as_template_parameter_complex.cc +++ b/index_tests/usage/type_usage_as_template_parameter_complex.cc @@ -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", + "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, diff --git a/index_tests/usage/type_usage_as_template_parameter_simple.cc b/index_tests/usage/type_usage_as_template_parameter_simple.cc index 84ebefe2..1b904ef7 100644 --- a/index_tests/usage/type_usage_as_template_parameter_simple.cc +++ b/index_tests/usage/type_usage_as_template_parameter_simple.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_declare_field.cc b/index_tests/usage/type_usage_declare_field.cc index 1d8fcb26..bd1323e9 100644 --- a/index_tests/usage/type_usage_declare_field.cc +++ b/index_tests/usage/type_usage_declare_field.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_declare_param.cc b/index_tests/usage/type_usage_declare_param.cc index 583c1c08..25c07db2 100644 --- a/index_tests/usage/type_usage_declare_param.cc +++ b/index_tests/usage/type_usage_declare_param.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_declare_param_prototype.cc b/index_tests/usage/type_usage_declare_param_prototype.cc index 0d84a644..1605291d 100644 --- a/index_tests/usage/type_usage_declare_param_prototype.cc +++ b/index_tests/usage/type_usage_declare_param_prototype.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_declare_qualifiers.cc b/index_tests/usage/type_usage_declare_qualifiers.cc index ec88c76f..17ac5cea 100644 --- a/index_tests/usage/type_usage_declare_qualifiers.cc +++ b/index_tests/usage/type_usage_declare_qualifiers.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_on_return_type.cc b/index_tests/usage/type_usage_on_return_type.cc index 35377779..c1b59773 100644 --- a/index_tests/usage/type_usage_on_return_type.cc +++ b/index_tests/usage/type_usage_on_return_type.cc @@ -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": [], diff --git a/index_tests/usage/type_usage_typedef_and_using_template.cc b/index_tests/usage/type_usage_typedef_and_using_template.cc index 457ed587..5e958e45 100644 --- a/index_tests/usage/type_usage_typedef_and_using_template.cc +++ b/index_tests/usage/type_usage_typedef_and_using_template.cc @@ -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", + "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>", + "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 Foo2", diff --git a/index_tests/usage/type_usage_various.cc b/index_tests/usage/type_usage_various.cc index c03e37ca..c9934391 100644 --- a/index_tests/usage/type_usage_various.cc +++ b/index_tests/usage/type_usage_various.cc @@ -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": [], diff --git a/index_tests/usage/usage_inside_of_call.cc b/index_tests/usage/usage_inside_of_call.cc index 4417645b..bf28a40e 100644 --- a/index_tests/usage/usage_inside_of_call.cc +++ b/index_tests/usage/usage_inside_of_call.cc @@ -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"], diff --git a/index_tests/usage/usage_inside_of_call_simple.cc b/index_tests/usage/usage_inside_of_call_simple.cc index 0e84edd6..dfde1cb3 100644 --- a/index_tests/usage/usage_inside_of_call_simple.cc +++ b/index_tests/usage/usage_inside_of_call_simple.cc @@ -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": [], diff --git a/index_tests/usage/var_usage_call_function.cc b/index_tests/usage/var_usage_call_function.cc index d9cbb63f..f549869a 100644 --- a/index_tests/usage/var_usage_call_function.cc +++ b/index_tests/usage/var_usage_call_function.cc @@ -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 }] diff --git a/index_tests/usage/var_usage_class_member.cc b/index_tests/usage/var_usage_class_member.cc index 81a61d37..fd6229a9 100644 --- a/index_tests/usage/var_usage_class_member.cc +++ b/index_tests/usage/var_usage_class_member.cc @@ -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"], diff --git a/index_tests/usage/var_usage_class_member_static.cc b/index_tests/usage/var_usage_class_member_static.cc index 3f939310..869fe29d 100644 --- a/index_tests/usage/var_usage_class_member_static.cc +++ b/index_tests/usage/var_usage_class_member_static.cc @@ -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, diff --git a/index_tests/usage/var_usage_cstyle_cast.cc b/index_tests/usage/var_usage_cstyle_cast.cc index a4d7e720..1f2bcb06 100644 --- a/index_tests/usage/var_usage_cstyle_cast.cc +++ b/index_tests/usage/var_usage_cstyle_cast.cc @@ -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": [], diff --git a/index_tests/usage/var_usage_func_parameter.cc b/index_tests/usage/var_usage_func_parameter.cc index 8938f552..278bdc7e 100644 --- a/index_tests/usage/var_usage_func_parameter.cc +++ b/index_tests/usage/var_usage_func_parameter.cc @@ -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"], diff --git a/index_tests/usage/var_usage_shadowed_parameter.cc b/index_tests/usage/var_usage_shadowed_parameter.cc index 9d926c28..6a6084d6 100644 --- a/index_tests/usage/var_usage_shadowed_parameter.cc +++ b/index_tests/usage/var_usage_shadowed_parameter.cc @@ -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"], diff --git a/index_tests/vars/class_member.cc b/index_tests/vars/class_member.cc index b20a65bd..7eb364a5 100644 --- a/index_tests/vars/class_member.cc +++ b/index_tests/vars/class_member.cc @@ -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": [], diff --git a/index_tests/vars/class_static_member.cc b/index_tests/vars/class_static_member.cc index 84f65ba5..b4c4784d 100644 --- a/index_tests/vars/class_static_member.cc +++ b/index_tests/vars/class_static_member.cc @@ -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": [], diff --git a/index_tests/vars/class_static_member_decl_only.cc b/index_tests/vars/class_static_member_decl_only.cc index 9689afe1..b0f84d67 100644 --- a/index_tests/vars/class_static_member_decl_only.cc +++ b/index_tests/vars/class_static_member_decl_only.cc @@ -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, diff --git a/index_tests/vars/function_param.cc b/index_tests/vars/function_param.cc index 06617a22..1b7da61d 100644 --- a/index_tests/vars/function_param.cc +++ b/index_tests/vars/function_param.cc @@ -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": [], diff --git a/index_tests/vars/function_shadow_param.cc b/index_tests/vars/function_shadow_param.cc index a28583f3..9467753a 100644 --- a/index_tests/vars/function_shadow_param.cc +++ b/index_tests/vars/function_shadow_param.cc @@ -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": [], diff --git a/src/indexer.cc b/src/indexer.cc index af9b162b..36d9c4bf 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -19,12 +19,10 @@ using ccls::Intern; using namespace clang; using llvm::Timer; -#include #include #include #include #include -#include #include 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 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(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> Index( auto DataConsumer = std::make_shared(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 IndexAction = createIndexingAction( DataConsumer, IndexOpts, std::make_unique(param)); diff --git a/src/message_handler.cc b/src/message_handler.cc index 60e74b59..711f1d2f 100644 --- a/src/message_handler.cc +++ b/src/message_handler.cc @@ -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); } } diff --git a/src/query.h b/src/query.h index 68fcfb79..70eb0672 100644 --- a/src/query.h +++ b/src/query.h @@ -114,15 +114,6 @@ struct IndexUpdate { UseUpdate vars_uses; }; -template -struct EntityToIndex { - using argument_type = const Q&; - llvm::DenseMap m; - unsigned operator()(const Q& entity) const { - return m[entity.usr]; - } -}; - struct WrappedUsr { Usr usr; };