From 017a91c30e1f8ec5bba6cc9dac0cc9dbe0100282 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 7 Sep 2018 22:29:36 -0700 Subject: [PATCH] Add DeclUse as element type of declarations --- index_tests/class_forward_declaration.cc | 6 +- index_tests/constructors/constructor.cc | 24 ++-- index_tests/constructors/destructor.cc | 24 ++-- .../constructors/implicit_constructor.cc | 24 ++-- index_tests/constructors/invalid_reference.cc | 10 +- index_tests/constructors/make_functions.cc | 68 +++++------ .../declaration_vs_definition/class.cc | 6 +- .../declaration_vs_definition/class_member.cc | 8 +- .../class_member_static.cc | 12 +- index_tests/declaration_vs_definition/func.cc | 6 +- .../func_associated_function_params.cc | 14 +-- .../declaration_vs_definition/method.cc | 16 +-- index_tests/enums/enum_class_decl.cc | 16 +-- index_tests/enums/enum_decl.cc | 12 +- index_tests/enums/enum_inherit.cc | 28 ++--- index_tests/enums/enum_usage.cc | 20 +-- index_tests/foobar.cc | 40 +++--- index_tests/function_declaration.cc | 2 +- .../function_declaration_definition.cc | 6 +- index_tests/function_definition.cc | 4 +- index_tests/inheritance/class_inherit.cc | 10 +- .../class_inherit_templated_parent.cc | 30 ++--- .../inheritance/class_multiple_inherit.cc | 22 ++-- index_tests/inheritance/function_override.cc | 16 +-- .../inheritance/interface_pure_virtual.cc | 6 +- .../inheritance/multiple_base_functions.cc | 30 ++--- index_tests/lambdas/lambda.cc | 28 ++--- index_tests/macros/complex.cc | 24 ++-- index_tests/macros/foo.cc | 26 ++-- index_tests/method_declaration.cc | 6 +- index_tests/method_definition.cc | 12 +- index_tests/method_inline_declaration.cc | 8 +- index_tests/multi_file/funky_enum.cc | 16 +-- index_tests/multi_file/impl.cc | 54 ++++----- index_tests/multi_file/simple_impl.cc | 8 +- index_tests/multi_file/static.cc | 12 +- index_tests/namespaces/anonymous_function.cc | 2 +- .../namespaces/function_declaration.cc | 4 +- index_tests/namespaces/function_definition.cc | 6 +- index_tests/namespaces/method_declaration.cc | 8 +- index_tests/namespaces/method_definition.cc | 14 +-- .../namespaces/method_inline_declaration.cc | 10 +- index_tests/namespaces/namespace_alias.cc | 34 +++--- index_tests/namespaces/namespace_reference.cc | 24 ++-- index_tests/operators/operator.cc | 16 +-- .../outline/static_function_in_type.cc | 26 ++-- index_tests/preprocessor/include_guard.cc | 4 +- .../func_specialized_template_param.cc | 18 +-- .../implicit_variable_instantiation.cc | 30 ++--- .../templates/member_ref_in_template.cc | 18 +-- ...ass_template_func_usage_folded_into_one.cc | 22 ++-- ...ace_template_type_usage_folded_into_one.cc | 24 ++-- index_tests/templates/specialization.cc | 114 +++++++++--------- .../templates/specialized_func_definition.cc | 16 +-- ...mplate_class_func_usage_folded_into_one.cc | 20 +-- ...ass_template_func_usage_folded_into_one.cc | 20 +-- ...mplate_class_type_usage_folded_into_one.cc | 40 +++--- ...emplate_class_var_usage_folded_into_one.cc | 18 +-- .../template_func_usage_folded_into_one.cc | 14 +-- .../template_type_usage_folded_into_one.cc | 22 ++-- .../template_var_usage_folded_into_one.cc | 30 ++--- index_tests/types/anonymous_struct.cc | 24 ++-- index_tests/types/typedefs.cc | 8 +- index_tests/unions/union_decl.cc | 12 +- index_tests/unions/union_usage.cc | 26 ++-- .../usage/func_called_from_constructor.cc | 18 +-- .../usage/func_called_from_macro_argument.cc | 14 +-- .../usage/func_called_from_template.cc | 14 +-- .../usage/func_called_implicit_ctor.cc | 20 +-- index_tests/usage/func_usage_addr_func.cc | 20 +-- index_tests/usage/func_usage_addr_method.cc | 18 +-- index_tests/usage/func_usage_call_func.cc | 10 +- index_tests/usage/func_usage_call_method.cc | 20 +-- .../usage/func_usage_class_inline_var_def.cc | 14 +-- .../usage/func_usage_forward_decl_func.cc | 8 +- .../usage/func_usage_forward_decl_method.cc | 20 +-- index_tests/usage/func_usage_template_func.cc | 8 +- .../usage/type_usage_as_template_parameter.cc | 36 +++--- ...ype_usage_as_template_parameter_complex.cc | 48 ++++---- ...type_usage_as_template_parameter_simple.cc | 18 +-- .../usage/type_usage_declare_extern.cc | 8 +- index_tests/usage/type_usage_declare_field.cc | 22 ++-- index_tests/usage/type_usage_declare_local.cc | 22 ++-- index_tests/usage/type_usage_declare_param.cc | 22 ++-- .../type_usage_declare_param_prototype.cc | 14 +-- .../usage/type_usage_declare_param_unnamed.cc | 8 +- .../usage/type_usage_declare_qualifiers.cc | 34 +++--- .../usage/type_usage_declare_static.cc | 10 +- .../usage/type_usage_on_return_type.cc | 36 +++--- .../usage/type_usage_typedef_and_using.cc | 42 +++---- .../type_usage_typedef_and_using_template.cc | 16 +-- index_tests/usage/type_usage_various.cc | 18 +-- index_tests/usage/usage_inside_of_call.cc | 38 +++--- .../usage/usage_inside_of_call_simple.cc | 14 +-- index_tests/usage/var_usage_call_function.cc | 16 +-- index_tests/usage/var_usage_class_member.cc | 36 +++--- .../usage/var_usage_class_member_static.cc | 18 +-- index_tests/usage/var_usage_cstyle_cast.cc | 18 +-- index_tests/usage/var_usage_extern.cc | 8 +- index_tests/usage/var_usage_func_parameter.cc | 10 +- index_tests/usage/var_usage_local.cc | 10 +- index_tests/usage/var_usage_shadowed_local.cc | 16 +-- .../usage/var_usage_shadowed_parameter.cc | 16 +-- index_tests/usage/var_usage_static.cc | 10 +- index_tests/vars/class_member.cc | 10 +- index_tests/vars/class_static_member.cc | 12 +- .../vars/class_static_member_decl_only.cc | 6 +- index_tests/vars/deduce_auto_type.cc | 18 +-- index_tests/vars/function_local.cc | 12 +- index_tests/vars/function_param.cc | 16 +-- index_tests/vars/function_param_unnamed.cc | 4 +- index_tests/vars/function_shadow_local.cc | 16 +-- index_tests/vars/function_shadow_param.cc | 12 +- index_tests/vars/global_variable.cc | 4 +- index_tests/vars/global_variable_decl_only.cc | 2 +- .../vars/type_instance_on_using_type.cc | 20 +-- src/indexer.cc | 64 +++++++--- src/indexer.h | 13 +- src/query.cc | 39 +++--- src/query.h | 15 ++- src/query_utils.cc | 16 ++- 121 files changed, 1177 insertions(+), 1128 deletions(-) diff --git a/index_tests/class_forward_declaration.cc b/index_tests/class_forward_declaration.cc index fd80cefb..0da90161 100644 --- a/index_tests/class_forward_declaration.cc +++ b/index_tests/class_forward_declaration.cc @@ -15,9 +15,9 @@ OUTPUT: "qual_name_offset": 6, "short_name": "Foo", "kind": 5, - "declarations": ["1:7-1:10|0|1|1", "2:7-2:10|0|1|1", "4:7-4:10|0|1|1"], - "spell": "3:7-3:10|0|1|2", - "extent": "3:1-3:13|0|1|0", + "declarations": ["1:7-1:10|1:1-1:10|0|1|1|-1", "2:7-2:10|2:1-2:10|0|1|1|-1", "4:7-4:10|4:1-4:10|0|1|1|-1"], + "spell": "3:7-3:10|0|1|2|-1", + "extent": "3:1-3:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/constructors/constructor.cc b/index_tests/constructors/constructor.cc index cf764596..72fcaf0d 100644 --- a/index_tests/constructors/constructor.cc +++ b/index_tests/constructors/constructor.cc @@ -21,12 +21,12 @@ OUTPUT: "kind": 9, "storage": 0, "declarations": [], - "spell": "3:3-3:6|15041163540773201510|2|1026", - "extent": "3:3-3:11|15041163540773201510|2|0", + "spell": "3:3-3:6|15041163540773201510|2|1026|-1", + "extent": "3:3-3:11|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["7:7-7:8|4259594751088586730|3|16676", "8:17-8:20|4259594751088586730|3|16676"], + "uses": ["7:7-7:8|4259594751088586730|3|16676|-1", "8:17-8:20|4259594751088586730|3|16676|-1"], "callees": [] }, { "usr": 4259594751088586730, @@ -36,8 +36,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "6:6-6:9|0|1|2", - "extent": "6:1-9:2|0|1|0", + "spell": "6:6-6:9|0|1|2|-1", + "extent": "6:1-9:2|0|1|0|-1", "bases": [], "derived": [], "vars": [10983126130596230582, 17165811951126099095], @@ -51,8 +51,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -60,7 +60,7 @@ OUTPUT: "funcs": [3385168158331140247], "vars": [], "instances": [10983126130596230582, 17165811951126099095], - "uses": ["3:3-3:6|15041163540773201510|2|4", "7:3-7:6|4259594751088586730|3|4", "8:3-8:6|4259594751088586730|3|4", "8:17-8:20|4259594751088586730|3|4"] + "uses": ["3:3-3:6|15041163540773201510|2|4|-1", "7:3-7:6|4259594751088586730|3|4|-1", "8:3-8:6|4259594751088586730|3|4|-1", "8:17-8:20|4259594751088586730|3|4|-1"] }], "usr2var": [{ "usr": 10983126130596230582, @@ -68,8 +68,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "f", "declarations": [], - "spell": "7:7-7:8|4259594751088586730|3|2", - "extent": "7:3-7:8|4259594751088586730|3|0", + "spell": "7:7-7:8|4259594751088586730|3|2|-1", + "extent": "7:3-7:8|4259594751088586730|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, @@ -81,8 +81,8 @@ OUTPUT: "short_name": "f2", "hover": "Foo *f2 = new Foo()", "declarations": [], - "spell": "8:8-8:10|4259594751088586730|3|2", - "extent": "8:3-8:22|4259594751088586730|3|0", + "spell": "8:8-8:10|4259594751088586730|3|2|-1", + "extent": "8:3-8:22|4259594751088586730|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, diff --git a/index_tests/constructors/destructor.cc b/index_tests/constructors/destructor.cc index f7724c3b..3bb394d2 100644 --- a/index_tests/constructors/destructor.cc +++ b/index_tests/constructors/destructor.cc @@ -26,12 +26,12 @@ OUTPUT: "kind": 9, "storage": 0, "declarations": [], - "spell": "3:3-3:6|15041163540773201510|2|1026", - "extent": "3:3-3:11|15041163540773201510|2|0", + "spell": "3:3-3:6|15041163540773201510|2|1026|-1", + "extent": "3:3-3:11|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["8:7-8:8|4259594751088586730|3|16676"], + "uses": ["8:7-8:8|4259594751088586730|3|16676|-1"], "callees": [] }, { "usr": 4259594751088586730, @@ -41,8 +41,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "7:6-7:9|0|1|2", - "extent": "7:1-9:2|0|1|0", + "spell": "7:6-7:9|0|1|2|-1", + "extent": "7:1-9:2|0|1|0|-1", "bases": [], "derived": [], "vars": [1893354193220338759], @@ -56,8 +56,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "4:3-4:4|15041163540773201510|2|1026", - "extent": "4:3-4:12|15041163540773201510|2|0", + "spell": "4:3-4:4|15041163540773201510|2|1026|-1", + "extent": "4:3-4:12|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -71,8 +71,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-5:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -80,7 +80,7 @@ OUTPUT: "funcs": [3385168158331140247, 7440261702884428359], "vars": [], "instances": [1893354193220338759], - "uses": ["3:3-3:6|15041163540773201510|2|4", "4:4-4:7|15041163540773201510|2|4", "8:3-8:6|4259594751088586730|3|4"] + "uses": ["3:3-3:6|15041163540773201510|2|4|-1", "4:4-4:7|15041163540773201510|2|4|-1", "8:3-8:6|4259594751088586730|3|4|-1"] }], "usr2var": [{ "usr": 1893354193220338759, @@ -88,8 +88,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "f", "declarations": [], - "spell": "8:7-8:8|4259594751088586730|3|2", - "extent": "8:3-8:8|4259594751088586730|3|0", + "spell": "8:7-8:8|4259594751088586730|3|2|-1", + "extent": "8:3-8:8|4259594751088586730|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, diff --git a/index_tests/constructors/implicit_constructor.cc b/index_tests/constructors/implicit_constructor.cc index be98be7f..b3995cfd 100644 --- a/index_tests/constructors/implicit_constructor.cc +++ b/index_tests/constructors/implicit_constructor.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:10|0|1|2", - "extent": "5:1-8:2|0|1|0", + "spell": "5:6-5:10|0|1|2|-1", + "extent": "5:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [449111627548814328, 17097499197730163115], @@ -35,12 +35,12 @@ OUTPUT: "kind": 9, "storage": 0, "declarations": [], - "spell": "2:3-2:7|13487927231218873822|2|1026", - "extent": "2:3-2:12|13487927231218873822|2|0", + "spell": "2:3-2:7|13487927231218873822|2|1026|-1", + "extent": "2:3-2:12|13487927231218873822|2|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["6:8-6:12|3957104924306079513|3|16676", "7:15-7:19|3957104924306079513|3|16676"], + "uses": ["6:8-6:12|3957104924306079513|3|16676|-1", "7:15-7:19|3957104924306079513|3|16676|-1"], "callees": [] }], "usr2type": [{ @@ -50,8 +50,8 @@ OUTPUT: "short_name": "Type", "kind": 23, "declarations": [], - "spell": "1:8-1:12|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:12|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -59,7 +59,7 @@ OUTPUT: "funcs": [10530961286677896857], "vars": [], "instances": [449111627548814328, 17097499197730163115], - "uses": ["2:3-2:7|13487927231218873822|2|4", "6:3-6:7|3957104924306079513|3|4", "7:15-7:19|3957104924306079513|3|4"] + "uses": ["2:3-2:7|13487927231218873822|2|4|-1", "6:3-6:7|3957104924306079513|3|4|-1", "7:15-7:19|3957104924306079513|3|4|-1"] }], "usr2var": [{ "usr": 449111627548814328, @@ -67,8 +67,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo0", "declarations": [], - "spell": "6:8-6:12|3957104924306079513|3|2", - "extent": "6:3-6:12|3957104924306079513|3|0", + "spell": "6:8-6:12|3957104924306079513|3|2|-1", + "extent": "6:3-6:12|3957104924306079513|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, @@ -80,8 +80,8 @@ OUTPUT: "short_name": "foo1", "hover": "Type foo1 = Type()", "declarations": [], - "spell": "7:8-7:12|3957104924306079513|3|2", - "extent": "7:3-7:21|3957104924306079513|3|0", + "spell": "7:8-7:12|3957104924306079513|3|2|-1", + "extent": "7:3-7:21|3957104924306079513|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, diff --git a/index_tests/constructors/invalid_reference.cc b/index_tests/constructors/invalid_reference.cc index c6c933e1..dfb742c2 100644 --- a/index_tests/constructors/invalid_reference.cc +++ b/index_tests/constructors/invalid_reference.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 9, "storage": 0, "declarations": [], - "spell": "4:6-4:9|15041163540773201510|2|1026", - "extent": "4:1-4:11|15041163540773201510|2|0", + "spell": "4:6-4:9|15041163540773201510|2|1026|-1", + "extent": "4:1-4:11|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -35,8 +35,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "1:8-1:11|0|1|2", - "extent": "1:1-1:14|0|1|0", + "spell": "1:8-1:11|0|1|2|-1", + "extent": "1:1-1:14|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -44,7 +44,7 @@ OUTPUT: "funcs": [17319723337446061757], "vars": [], "instances": [], - "uses": ["4:1-4:4|0|1|4", "4:6-4:9|15041163540773201510|2|4"] + "uses": ["4:1-4:4|0|1|4|-1", "4:6-4:9|15041163540773201510|2|4|-1"] }], "usr2var": [] } diff --git a/index_tests/constructors/make_functions.cc b/index_tests/constructors/make_functions.cc index e2e3be4c..c285c1d5 100644 --- a/index_tests/constructors/make_functions.cc +++ b/index_tests/constructors/make_functions.cc @@ -36,8 +36,8 @@ OUTPUT: make_functions.h "kind": 9, "storage": 0, "declarations": [], - "spell": "7:3-7:9|14935975554338052500|2|1026", - "extent": "7:3-7:32|14935975554338052500|2|0", + "spell": "7:3-7:9|14935975554338052500|2|1026|-1", + "extent": "7:3-7:32|14935975554338052500|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -51,8 +51,8 @@ OUTPUT: make_functions.h "kind": 9, "storage": 0, "declarations": [], - "spell": "6:3-6:9|14935975554338052500|2|1026", - "extent": "6:3-6:17|14935975554338052500|2|0", + "spell": "6:3-6:9|14935975554338052500|2|1026|-1", + "extent": "6:3-6:17|14935975554338052500|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -66,8 +66,8 @@ OUTPUT: make_functions.h "kind": 9, "storage": 0, "declarations": [], - "spell": "5:3-5:9|14935975554338052500|2|1026", - "extent": "5:3-5:14|14935975554338052500|2|0", + "spell": "5:3-5:9|14935975554338052500|2|1026|-1", + "extent": "5:3-5:14|14935975554338052500|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -81,8 +81,8 @@ OUTPUT: make_functions.h "kind": 9, "storage": 0, "declarations": [], - "spell": "8:3-8:9|14935975554338052500|2|1026", - "extent": "8:3-8:30|14935975554338052500|2|0", + "spell": "8:3-8:9|14935975554338052500|2|1026|-1", + "extent": "8:3-8:30|14935975554338052500|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -96,8 +96,8 @@ OUTPUT: make_functions.h "short_name": "Bar", "kind": 23, "declarations": [], - "spell": "1:8-1:11|0|1|2", - "extent": "1:1-1:14|0|1|0", + "spell": "1:8-1:11|0|1|2|-1", + "extent": "1:1-1:14|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -105,7 +105,7 @@ OUTPUT: make_functions.h "funcs": [], "vars": [], "instances": [], - "uses": ["7:17-7:20|14935975554338052500|2|4", "8:15-8:18|14935975554338052500|2|4"] + "uses": ["7:17-7:20|14935975554338052500|2|4|-1", "8:15-8:18|14935975554338052500|2|4|-1"] }, { "usr": 14935975554338052500, "detailed_name": "class Foobar {}", @@ -113,8 +113,8 @@ OUTPUT: make_functions.h "short_name": "Foobar", "kind": 5, "declarations": [], - "spell": "3:7-3:13|0|1|2", - "extent": "3:1-9:2|0|1|0", + "spell": "3:7-3:13|0|1|2|-1", + "extent": "3:1-9:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -122,7 +122,7 @@ OUTPUT: make_functions.h "funcs": [13131778807733950299, 13028995015627606181, 3765833212244435302, 17321436359755983845], "vars": [], "instances": [], - "uses": ["5:3-5:9|14935975554338052500|2|4", "6:3-6:9|14935975554338052500|2|4", "7:3-7:9|14935975554338052500|2|4", "8:3-8:9|14935975554338052500|2|4"] + "uses": ["5:3-5:9|14935975554338052500|2|4|-1", "6:3-6:9|14935975554338052500|2|4|-1", "7:3-7:9|14935975554338052500|2|4|-1", "8:3-8:9|14935975554338052500|2|4|-1"] }], "usr2var": [] } @@ -154,12 +154,12 @@ OUTPUT: make_functions.cc "kind": 12, "storage": 0, "declarations": [], - "spell": "9:4-9:15|0|1|2", - "extent": "9:1-11:2|0|1|0", + "spell": "9:4-9:15|0|1|2|-1", + "extent": "9:1-11:2|0|1|0|-1", "bases": [], "derived": [], "vars": [3908732770590594660], - "uses": ["17:3-17:14|2816883305867289955|3|16420"], + "uses": ["17:3-17:14|2816883305867289955|3|16420|-1"], "callees": [] }, { "usr": 2816883305867289955, @@ -169,8 +169,8 @@ OUTPUT: make_functions.cc "kind": 12, "storage": 0, "declarations": [], - "spell": "13:6-13:14|0|1|2", - "extent": "13:1-18:2|0|1|0", + "spell": "13:6-13:14|0|1|2|-1", + "extent": "13:1-18:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -210,12 +210,12 @@ OUTPUT: make_functions.cc "kind": 12, "storage": 0, "declarations": [], - "spell": "4:4-4:14|0|1|2", - "extent": "4:1-6:2|0|1|0", + "spell": "4:4-4:14|0|1|2|-1", + "extent": "4:1-6:2|0|1|0|-1", "bases": [], "derived": [], "vars": [8463700030555379526], - "uses": ["14:3-14:13|2816883305867289955|3|16420", "15:3-15:13|2816883305867289955|3|16420", "16:3-16:13|2816883305867289955|3|16420"], + "uses": ["14:3-14:13|2816883305867289955|3|16420|-1", "15:3-15:13|2816883305867289955|3|16420|-1", "16:3-16:13|2816883305867289955|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -262,7 +262,7 @@ OUTPUT: make_functions.cc "funcs": [], "vars": [], "instances": [], - "uses": ["16:29-16:32|2816883305867289955|3|4", "17:30-17:33|2816883305867289955|3|4"] + "uses": ["16:29-16:32|2816883305867289955|3|4|-1", "17:30-17:33|2816883305867289955|3|4|-1"] }, { "usr": 14935975554338052500, "detailed_name": "class Foobar {}", @@ -277,7 +277,7 @@ OUTPUT: make_functions.cc "funcs": [], "vars": [], "instances": [], - "uses": ["14:14-14:20|2816883305867289955|3|4", "15:14-15:20|2816883305867289955|3|4", "16:14-16:20|2816883305867289955|3|4", "17:15-17:21|2816883305867289955|3|4"] + "uses": ["14:14-14:20|2816883305867289955|3|4|-1", "15:14-15:20|2816883305867289955|3|4|-1", "16:14-16:20|2816883305867289955|3|4|-1", "17:15-17:21|2816883305867289955|3|4|-1"] }], "usr2var": [{ "usr": 180270746871803062, @@ -285,8 +285,8 @@ OUTPUT: make_functions.cc "qual_name_offset": 4, "short_name": "args", "declarations": [], - "spell": "9:24-9:28|11363675606380070883|3|1026", - "extent": "9:16-9:28|11363675606380070883|3|0", + "spell": "9:24-9:28|11363675606380070883|3|1026|-1", + "extent": "9:16-9:28|11363675606380070883|3|0|-1", "type": 87, "uses": [], "kind": 253, @@ -297,8 +297,8 @@ OUTPUT: make_functions.cc "qual_name_offset": 6, "short_name": "args", "declarations": [], - "spell": "4:25-4:29|768523651983844320|3|1026", - "extent": "4:15-4:29|768523651983844320|3|0", + "spell": "4:25-4:29|768523651983844320|3|1026|-1", + "extent": "4:15-4:29|768523651983844320|3|0|-1", "type": 0, "uses": [], "kind": 253, @@ -309,8 +309,8 @@ OUTPUT: make_functions.cc "qual_name_offset": 8, "short_name": "args", "declarations": [], - "spell": "9:24-9:28|2532818908869373467|3|1026", - "extent": "9:16-9:28|2532818908869373467|3|0", + "spell": "9:24-9:28|2532818908869373467|3|1026|-1", + "extent": "9:16-9:28|2532818908869373467|3|0|-1", "type": 0, "uses": [], "kind": 253, @@ -321,8 +321,8 @@ OUTPUT: make_functions.cc "qual_name_offset": 10, "short_name": "args", "declarations": [], - "spell": "4:25-4:29|15793662558620604611|3|1026", - "extent": "4:15-4:29|15793662558620604611|3|0", + "spell": "4:25-4:29|15793662558620604611|3|1026|-1", + "extent": "4:15-4:29|15793662558620604611|3|0|-1", "type": 0, "uses": [], "kind": 253, @@ -333,8 +333,8 @@ OUTPUT: make_functions.cc "qual_name_offset": 6, "short_name": "args", "declarations": [], - "spell": "4:25-4:29|11138976705878544996|3|1026", - "extent": "4:15-4:29|11138976705878544996|3|0", + "spell": "4:25-4:29|11138976705878544996|3|1026|-1", + "extent": "4:15-4:29|11138976705878544996|3|0|-1", "type": 0, "uses": [], "kind": 253, diff --git a/index_tests/declaration_vs_definition/class.cc b/index_tests/declaration_vs_definition/class.cc index 42a44a88..51a35677 100644 --- a/index_tests/declaration_vs_definition/class.cc +++ b/index_tests/declaration_vs_definition/class.cc @@ -17,9 +17,9 @@ OUTPUT: "qual_name_offset": 6, "short_name": "Foo", "kind": 5, - "declarations": ["1:7-1:10|0|1|1", "2:7-2:10|0|1|1", "4:7-4:10|0|1|1"], - "spell": "3:7-3:10|0|1|2", - "extent": "3:1-3:13|0|1|0", + "declarations": ["1:7-1:10|1:1-1:10|0|1|1|-1", "2:7-2:10|2:1-2:10|0|1|1|-1", "4:7-4:10|4:1-4:10|0|1|1|-1"], + "spell": "3:7-3:10|0|1|2|-1", + "extent": "3:1-3:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/declaration_vs_definition/class_member.cc b/index_tests/declaration_vs_definition/class_member.cc index a4333abc..ef14ac7b 100644 --- a/index_tests/declaration_vs_definition/class_member.cc +++ b/index_tests/declaration_vs_definition/class_member.cc @@ -30,8 +30,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -50,8 +50,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "foo", "declarations": [], - "spell": "2:7-2:10|15041163540773201510|2|1026", - "extent": "2:3-2:10|15041163540773201510|2|0", + "spell": "2:7-2:10|15041163540773201510|2|1026|-1", + "extent": "2:3-2:10|15041163540773201510|2|0|-1", "type": 53, "uses": [], "kind": 8, diff --git a/index_tests/declaration_vs_definition/class_member_static.cc b/index_tests/declaration_vs_definition/class_member_static.cc index c0ae1aa7..4655b4be 100644 --- a/index_tests/declaration_vs_definition/class_member_static.cc +++ b/index_tests/declaration_vs_definition/class_member_static.cc @@ -32,8 +32,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -41,16 +41,16 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["5:5-5:8|0|1|4"] + "uses": ["5:5-5:8|0|1|4|-1"] }], "usr2var": [{ "usr": 8942920329766232482, "detailed_name": "static int Foo::foo", "qual_name_offset": 11, "short_name": "foo", - "declarations": ["2:14-2:17|15041163540773201510|2|1025"], - "spell": "5:10-5:13|15041163540773201510|2|1026", - "extent": "5:1-5:13|15041163540773201510|2|0", + "declarations": ["2:14-2:17|2:3-2:17|15041163540773201510|2|1025|-1"], + "spell": "5:10-5:13|15041163540773201510|2|1026|-1", + "extent": "5:1-5:13|15041163540773201510|2|0|-1", "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/declaration_vs_definition/func.cc b/index_tests/declaration_vs_definition/func.cc index 718eaffa..aacda01c 100644 --- a/index_tests/declaration_vs_definition/func.cc +++ b/index_tests/declaration_vs_definition/func.cc @@ -16,9 +16,9 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["1:6-1:9|0|1|1", "2:6-2:9|0|1|1", "4:6-4:9|0|1|1"], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-3:14|0|1|0", + "declarations": ["1:6-1:9|1:1-1:11|0|1|1|-1", "2:6-2:9|2:1-2:11|0|1|1|-1", "4:6-4:9|4:1-4:11|0|1|1|-1"], + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-3:14|0|1|0|-1", "bases": [], "derived": [], "vars": [], 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 a7cc5e0b..0aa1487e 100644 --- a/index_tests/declaration_vs_definition/func_associated_function_params.cc +++ b/index_tests/declaration_vs_definition/func_associated_function_params.cc @@ -16,9 +16,9 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["1:5-1:8|0|1|1", "2:5-2:8|0|1|1", "4:5-4:8|0|1|1"], - "spell": "5:5-5:8|0|1|2", - "extent": "5:1-5:36|0|1|0", + "declarations": ["1:5-1:8|1:1-1:18|0|1|1|-1", "2:5-2:8|2:1-3:16|0|1|1|-1", "4:5-4:8|4:1-4:26|0|1|1|-1"], + "spell": "5:5-5:8|0|1|2|-1", + "extent": "5:1-5:36|0|1|0|-1", "bases": [], "derived": [], "vars": [14555488990109936920, 10963664335057337329], @@ -47,8 +47,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "b", "declarations": [], - "spell": "5:20-5:21|2747674671862363334|3|1026", - "extent": "5:16-5:21|2747674671862363334|3|0", + "spell": "5:20-5:21|2747674671862363334|3|1026|-1", + "extent": "5:16-5:21|2747674671862363334|3|0|-1", "type": 53, "uses": [], "kind": 253, @@ -59,8 +59,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "5:13-5:14|2747674671862363334|3|1026", - "extent": "5:9-5:14|2747674671862363334|3|0", + "spell": "5:13-5:14|2747674671862363334|3|1026|-1", + "extent": "5:9-5:14|2747674671862363334|3|0|-1", "type": 53, "uses": [], "kind": 253, diff --git a/index_tests/declaration_vs_definition/method.cc b/index_tests/declaration_vs_definition/method.cc index 18aed73a..da2b46fb 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|1025"], + "declarations": ["2:8-2:16|2:3-2:18|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -31,7 +31,7 @@ OUTPUT: "short_name": "purevirtual", "kind": 6, "storage": 0, - "declarations": ["3:16-3:27|15041163540773201510|2|1089"], + "declarations": ["3:16-3:27|3:3-3:33|15041163540773201510|2|1089|-1"], "bases": [], "derived": [], "vars": [], @@ -44,9 +44,9 @@ OUTPUT: "short_name": "def", "kind": 6, "storage": 0, - "declarations": ["4:8-4:11|15041163540773201510|2|1025"], - "spell": "7:11-7:14|15041163540773201510|2|1026", - "extent": "7:1-7:19|15041163540773201510|2|0", + "declarations": ["4:8-4:11|4:3-4:13|15041163540773201510|2|1025|-1"], + "spell": "7:11-7:14|15041163540773201510|2|1026|-1", + "extent": "7:1-7:19|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -60,8 +60,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-5:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -69,7 +69,7 @@ OUTPUT: "funcs": [4012226004228259562, 10939323144126021546, 15416083548883122431], "vars": [], "instances": [], - "uses": ["7:6-7:9|0|1|4"] + "uses": ["7:6-7:9|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/enums/enum_class_decl.cc b/index_tests/enums/enum_class_decl.cc index 3f3f78ca..a31baff5 100644 --- a/index_tests/enums/enum_class_decl.cc +++ b/index_tests/enums/enum_class_decl.cc @@ -17,8 +17,8 @@ OUTPUT: "short_name": "uint8_t", "kind": 252, "declarations": [], - "spell": "1:23-1:30|0|1|2", - "extent": "1:1-1:30|0|1|0", + "spell": "1:23-1:30|0|1|2|-1", + "extent": "1:1-1:30|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -34,8 +34,8 @@ OUTPUT: "short_name": "Foo", "kind": 10, "declarations": [], - "spell": "2:12-2:15|0|1|2", - "extent": "2:1-5:2|0|1|0", + "spell": "2:12-2:15|0|1|2|-1", + "extent": "2:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -52,8 +52,8 @@ OUTPUT: "short_name": "A", "hover": "Foo::A = 0", "declarations": [], - "spell": "3:3-3:4|16985894625255407295|2|1026", - "extent": "3:3-3:4|16985894625255407295|2|0", + "spell": "3:3-3:4|16985894625255407295|2|1026|-1", + "extent": "3:3-3:4|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -64,8 +64,8 @@ OUTPUT: "qual_name_offset": 0, "short_name": "B", "declarations": [], - "spell": "4:3-4:4|16985894625255407295|2|1026", - "extent": "4:3-4:9|16985894625255407295|2|0", + "spell": "4:3-4:4|16985894625255407295|2|1026|-1", + "extent": "4:3-4:9|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, diff --git a/index_tests/enums/enum_decl.cc b/index_tests/enums/enum_decl.cc index 6e44da9b..bf760444 100644 --- a/index_tests/enums/enum_decl.cc +++ b/index_tests/enums/enum_decl.cc @@ -16,8 +16,8 @@ OUTPUT: "short_name": "Foo", "kind": 10, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -34,8 +34,8 @@ OUTPUT: "short_name": "A", "hover": "A = 0", "declarations": [], - "spell": "2:3-2:4|16985894625255407295|2|1026", - "extent": "2:3-2:4|16985894625255407295|2|0", + "spell": "2:3-2:4|16985894625255407295|2|1026|-1", + "extent": "2:3-2:4|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -46,8 +46,8 @@ OUTPUT: "qual_name_offset": 0, "short_name": "B", "declarations": [], - "spell": "3:3-3:4|16985894625255407295|2|1026", - "extent": "3:3-3:9|16985894625255407295|2|0", + "spell": "3:3-3:4|16985894625255407295|2|1026|-1", + "extent": "3:3-3:9|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, diff --git a/index_tests/enums/enum_inherit.cc b/index_tests/enums/enum_inherit.cc index 08d84087..18cb37c0 100644 --- a/index_tests/enums/enum_inherit.cc +++ b/index_tests/enums/enum_inherit.cc @@ -23,8 +23,8 @@ OUTPUT: "short_name": "E", "kind": 10, "declarations": [], - "spell": "8:12-8:13|0|1|2", - "extent": "8:1-11:2|0|1|0", + "spell": "8:12-8:13|0|1|2|-1", + "extent": "8:1-11:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -40,8 +40,8 @@ OUTPUT: "short_name": "int32_t", "kind": 252, "declarations": [], - "spell": "6:13-6:20|0|1|2", - "extent": "6:1-6:20|0|1|0", + "spell": "6:13-6:20|0|1|2|-1", + "extent": "6:1-6:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -57,8 +57,8 @@ OUTPUT: "short_name": "Foo", "kind": 10, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -75,8 +75,8 @@ OUTPUT: "short_name": "A", "hover": "A = 0", "declarations": [], - "spell": "2:3-2:4|16985894625255407295|2|1026", - "extent": "2:3-2:4|16985894625255407295|2|0", + "spell": "2:3-2:4|16985894625255407295|2|1026|-1", + "extent": "2:3-2:4|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -87,8 +87,8 @@ OUTPUT: "qual_name_offset": 0, "short_name": "B", "declarations": [], - "spell": "3:3-3:4|16985894625255407295|2|1026", - "extent": "3:3-3:9|16985894625255407295|2|0", + "spell": "3:3-3:4|16985894625255407295|2|1026|-1", + "extent": "3:3-3:9|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -100,8 +100,8 @@ OUTPUT: "short_name": "E0", "hover": "E::E0 = 0", "declarations": [], - "spell": "9:3-9:5|2986879766914123941|2|1026", - "extent": "9:3-9:5|2986879766914123941|2|0", + "spell": "9:3-9:5|2986879766914123941|2|1026|-1", + "extent": "9:3-9:5|2986879766914123941|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -112,8 +112,8 @@ OUTPUT: "qual_name_offset": 0, "short_name": "E20", "declarations": [], - "spell": "10:3-10:6|2986879766914123941|2|1026", - "extent": "10:3-10:11|2986879766914123941|2|0", + "spell": "10:3-10:6|2986879766914123941|2|1026|-1", + "extent": "10:3-10:11|2986879766914123941|2|0|-1", "type": 0, "uses": [], "kind": 22, diff --git a/index_tests/enums/enum_usage.cc b/index_tests/enums/enum_usage.cc index bcee0c00..07475c77 100644 --- a/index_tests/enums/enum_usage.cc +++ b/index_tests/enums/enum_usage.cc @@ -18,8 +18,8 @@ OUTPUT: "short_name": "Foo", "kind": 10, "declarations": [], - "spell": "1:12-1:15|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:12-1:15|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -27,7 +27,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [10677751717622394455], - "uses": ["6:1-6:4|0|1|4", "6:9-6:12|0|1|4"] + "uses": ["6:1-6:4|0|1|4|-1", "6:9-6:12|0|1|4|-1"] }], "usr2var": [{ "usr": 439339022761937396, @@ -36,10 +36,10 @@ OUTPUT: "short_name": "A", "hover": "Foo::A = 0", "declarations": [], - "spell": "2:3-2:4|16985894625255407295|2|1026", - "extent": "2:3-2:4|16985894625255407295|2|0", + "spell": "2:3-2:4|16985894625255407295|2|1026|-1", + "extent": "2:3-2:4|16985894625255407295|2|0|-1", "type": 0, - "uses": ["6:14-6:15|0|1|4"], + "uses": ["6:14-6:15|0|1|4|-1"], "kind": 22, "storage": 0 }, { @@ -49,8 +49,8 @@ OUTPUT: "short_name": "x", "hover": "Foo x = Foo::A", "declarations": [], - "spell": "6:5-6:6|0|1|2", - "extent": "6:1-6:15|0|1|0", + "spell": "6:5-6:6|0|1|2|-1", + "extent": "6:1-6:15|0|1|0|-1", "type": 16985894625255407295, "uses": [], "kind": 13, @@ -61,8 +61,8 @@ OUTPUT: "qual_name_offset": 0, "short_name": "B", "declarations": [], - "spell": "3:3-3:4|16985894625255407295|2|1026", - "extent": "3:3-3:9|16985894625255407295|2|0", + "spell": "3:3-3:4|16985894625255407295|2|1026|-1", + "extent": "3:3-3:9|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, diff --git a/index_tests/foobar.cc b/index_tests/foobar.cc index f5d2e47b..e92f23cf 100644 --- a/index_tests/foobar.cc +++ b/index_tests/foobar.cc @@ -21,8 +21,8 @@ OUTPUT: "short_name": "A", "kind": 10, "declarations": [], - "spell": "1:6-1:7|0|1|2", - "extent": "1:1-1:10|0|1|0", + "spell": "1:6-1:7|0|1|2|-1", + "extent": "1:1-1:10|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -30,7 +30,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:5-9:6|0|1|4"] + "uses": ["9:5-9:6|0|1|4|-1"] }, { "usr": 7074603899792463171, "detailed_name": "Inner", @@ -38,8 +38,8 @@ OUTPUT: "short_name": "Inner", "kind": 26, "declarations": [], - "spell": "6:10-6:15|0|1|2", - "extent": "6:3-6:18|0|1|0", + "spell": "6:10-6:15|0|1|2|-1", + "extent": "6:3-6:18|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -55,8 +55,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "5:8-5:11|0|1|2", - "extent": "5:1-7:2|0|1|0", + "spell": "5:8-5:11|0|1|2|-1", + "extent": "5:1-7:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -64,7 +64,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:1-9:4|0|1|4", "10:1-10:4|0|1|4"] + "uses": ["9:1-9:4|0|1|4|-1", "10:1-10:4|0|1|4|-1"] }, { "usr": 11976530632376795217, "detailed_name": "Foo", @@ -72,8 +72,8 @@ OUTPUT: "short_name": "Foo", "kind": 26, "declarations": [], - "spell": "5:8-5:11|0|1|2", - "extent": "4:1-7:2|0|1|0", + "spell": "5:8-5:11|0|1|2|-1", + "extent": "4:1-7:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -89,8 +89,8 @@ OUTPUT: "short_name": "B", "kind": 10, "declarations": [], - "spell": "2:6-2:7|0|1|2", - "extent": "2:1-2:10|0|1|0", + "spell": "2:6-2:7|0|1|2|-1", + "extent": "2:1-2:10|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -98,7 +98,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["10:5-10:6|0|1|4"] + "uses": ["10:5-10:6|0|1|4|-1"] }, { "usr": 13938528237873543349, "detailed_name": "struct Foo::Inner {}", @@ -106,8 +106,8 @@ OUTPUT: "short_name": "Inner", "kind": 23, "declarations": [], - "spell": "6:10-6:15|10528472276654770367|2|1026", - "extent": "6:3-6:18|10528472276654770367|2|0", + "spell": "6:10-6:15|10528472276654770367|2|1026|-1", + "extent": "6:3-6:18|10528472276654770367|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -115,7 +115,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:9-9:14|0|1|4"] + "uses": ["9:9-9:14|0|1|4|-1"] }], "usr2var": [{ "usr": 12028309045033782423, @@ -123,8 +123,8 @@ OUTPUT: "qual_name_offset": 7, "short_name": "b", "declarations": [], - "spell": "10:8-10:9|0|1|2", - "extent": "10:1-10:9|0|1|0", + "spell": "10:8-10:9|0|1|2|-1", + "extent": "10:1-10:9|0|1|0|-1", "type": 11976530632376795217, "uses": [], "kind": 13, @@ -135,8 +135,8 @@ OUTPUT: "qual_name_offset": 14, "short_name": "a", "declarations": [], - "spell": "9:15-9:16|0|1|2", - "extent": "9:1-9:16|0|1|0", + "spell": "9:15-9:16|0|1|2|-1", + "extent": "9:1-9:16|0|1|0|-1", "type": 7074603899792463171, "uses": [], "kind": 13, diff --git a/index_tests/function_declaration.cc b/index_tests/function_declaration.cc index 2d23e7d9..9c38f574 100644 --- a/index_tests/function_declaration.cc +++ b/index_tests/function_declaration.cc @@ -12,7 +12,7 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["1:6-1:9|0|1|1"], + "declarations": ["1:6-1:9|1:1-1:23|0|1|1|-1"], "bases": [], "derived": [], "vars": [], diff --git a/index_tests/function_declaration_definition.cc b/index_tests/function_declaration_definition.cc index c35a6f77..1eb2ba75 100644 --- a/index_tests/function_declaration_definition.cc +++ b/index_tests/function_declaration_definition.cc @@ -14,9 +14,9 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["1:6-1:9|0|1|1"], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-3:14|0|1|0", + "declarations": ["1:6-1:9|1:1-1:11|0|1|1|-1"], + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-3:14|0|1|0|-1", "bases": [], "derived": [], "vars": [], diff --git a/index_tests/function_definition.cc b/index_tests/function_definition.cc index 1662c48a..7ceee636 100644 --- a/index_tests/function_definition.cc +++ b/index_tests/function_definition.cc @@ -13,8 +13,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-1:14|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-1:14|0|1|0|-1", "bases": [], "derived": [], "vars": [], diff --git a/index_tests/inheritance/class_inherit.cc b/index_tests/inheritance/class_inherit.cc index e38b20bd..701b0396 100644 --- a/index_tests/inheritance/class_inherit.cc +++ b/index_tests/inheritance/class_inherit.cc @@ -14,8 +14,8 @@ OUTPUT: "short_name": "Parent", "kind": 5, "declarations": [], - "spell": "1:7-1:13|0|1|2", - "extent": "1:1-1:16|0|1|0", + "spell": "1:7-1:13|0|1|2|-1", + "extent": "1:1-1:16|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [10963370434658308541], @@ -23,7 +23,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["2:24-2:30|10963370434658308541|2|2052"] + "uses": ["2:24-2:30|10963370434658308541|2|2052|-1"] }, { "usr": 10963370434658308541, "detailed_name": "class Derived : public Parent {}", @@ -31,8 +31,8 @@ OUTPUT: "short_name": "Derived", "kind": 5, "declarations": [], - "spell": "2:7-2:14|0|1|2", - "extent": "2:1-2:33|0|1|0", + "spell": "2:7-2:14|0|1|2|-1", + "extent": "2:1-2:33|0|1|0|-1", "alias_of": 0, "bases": [3866412049634585509], "derived": [], diff --git a/index_tests/inheritance/class_inherit_templated_parent.cc b/index_tests/inheritance/class_inherit_templated_parent.cc index 33b80bbb..4e20cd1b 100644 --- a/index_tests/inheritance/class_inherit_templated_parent.cc +++ b/index_tests/inheritance/class_inherit_templated_parent.cc @@ -25,8 +25,8 @@ OUTPUT: "short_name": "Derived1", "kind": 5, "declarations": [], - "spell": "8:7-8:15|0|1|2", - "extent": "8:1-8:29|0|1|0", + "spell": "8:7-8:15|0|1|2|-1", + "extent": "8:1-8:29|0|1|0|-1", "alias_of": 0, "bases": [11930058224338108382], "derived": [10963370434658308541], @@ -34,7 +34,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["13:43-13:51|10963370434658308541|2|2052"] + "uses": ["13:43-13:51|10963370434658308541|2|2052|-1"] }, { "usr": 10651399730831737929, "detailed_name": "class Derived2 : Base2 {}", @@ -42,8 +42,8 @@ OUTPUT: "short_name": "Derived2", "kind": 5, "declarations": [], - "spell": "11:7-11:15|0|1|2", - "extent": "11:1-11:29|0|1|0", + "spell": "11:7-11:15|0|1|2|-1", + "extent": "11:1-11:29|0|1|0|-1", "alias_of": 0, "bases": [11118288764693061434], "derived": [10963370434658308541], @@ -51,7 +51,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["13:56-13:64|10963370434658308541|2|2052"] + "uses": ["13:56-13:64|10963370434658308541|2|2052|-1"] }, { "usr": 10963370434658308541, "detailed_name": "class Derived : Base1<3>, Base2, Derived1<4>, Derived2 {}", @@ -59,8 +59,8 @@ OUTPUT: "short_name": "Derived", "kind": 5, "declarations": [], - "spell": "13:7-13:14|0|1|2", - "extent": "13:1-13:76|0|1|0", + "spell": "13:7-13:14|0|1|2|-1", + "extent": "13:1-13:76|0|1|0|-1", "alias_of": 0, "bases": [11930058224338108382, 11118288764693061434, 5863733211528032190, 10651399730831737929], "derived": [], @@ -68,7 +68,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["13:33-13:40|10963370434658308541|2|2052", "13:65-13:72|10963370434658308541|2|2052"] + "uses": ["13:33-13:40|10963370434658308541|2|2052|-1", "13:65-13:72|10963370434658308541|2|2052|-1"] }, { "usr": 11118288764693061434, "detailed_name": "class Base2 {}", @@ -76,8 +76,8 @@ OUTPUT: "short_name": "Base2", "kind": 5, "declarations": [], - "spell": "5:7-5:12|0|1|2", - "extent": "5:1-5:15|0|1|0", + "spell": "5:7-5:12|0|1|2|-1", + "extent": "5:1-5:15|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [10651399730831737929, 10963370434658308541], @@ -85,7 +85,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["13:27-13:32|10963370434658308541|2|2052"] + "uses": ["13:27-13:32|10963370434658308541|2|2052|-1"] }, { "usr": 11930058224338108382, "detailed_name": "class Base1 {}", @@ -93,8 +93,8 @@ OUTPUT: "short_name": "Base1", "kind": 5, "declarations": [], - "spell": "2:7-2:12|0|1|2", - "extent": "2:1-2:15|0|1|0", + "spell": "2:7-2:12|0|1|2|-1", + "extent": "2:1-2:15|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [5863733211528032190, 10963370434658308541], @@ -102,7 +102,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["13:17-13:22|10963370434658308541|2|2052"] + "uses": ["13:17-13:22|10963370434658308541|2|2052|-1"] }], "usr2var": [] } diff --git a/index_tests/inheritance/class_multiple_inherit.cc b/index_tests/inheritance/class_multiple_inherit.cc index ee1603b3..f8e171a2 100644 --- a/index_tests/inheritance/class_multiple_inherit.cc +++ b/index_tests/inheritance/class_multiple_inherit.cc @@ -16,8 +16,8 @@ OUTPUT: "short_name": "Root", "kind": 5, "declarations": [], - "spell": "1:7-1:11|0|1|2", - "extent": "1:1-1:14|0|1|0", + "spell": "1:7-1:11|0|1|2|-1", + "extent": "1:1-1:14|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [11863524815063131483, 14022569716337624303], @@ -25,7 +25,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["2:24-2:28|11863524815063131483|2|2052", "3:24-3:28|14022569716337624303|2|2052"] + "uses": ["2:24-2:28|11863524815063131483|2|2052|-1", "3:24-3:28|14022569716337624303|2|2052|-1"] }, { "usr": 10963370434658308541, "detailed_name": "class Derived : public MiddleA, public MiddleB {}", @@ -33,8 +33,8 @@ OUTPUT: "short_name": "Derived", "kind": 5, "declarations": [], - "spell": "4:7-4:14|0|1|2", - "extent": "4:1-4:50|0|1|0", + "spell": "4:7-4:14|0|1|2|-1", + "extent": "4:1-4:50|0|1|0|-1", "alias_of": 0, "bases": [11863524815063131483, 14022569716337624303], "derived": [], @@ -50,8 +50,8 @@ OUTPUT: "short_name": "MiddleA", "kind": 5, "declarations": [], - "spell": "2:7-2:14|0|1|2", - "extent": "2:1-2:31|0|1|0", + "spell": "2:7-2:14|0|1|2|-1", + "extent": "2:1-2:31|0|1|0|-1", "alias_of": 0, "bases": [3897841498936210886], "derived": [10963370434658308541], @@ -59,7 +59,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["4:24-4:31|10963370434658308541|2|2052"] + "uses": ["4:24-4:31|10963370434658308541|2|2052|-1"] }, { "usr": 14022569716337624303, "detailed_name": "class MiddleB : public Root {}", @@ -67,8 +67,8 @@ OUTPUT: "short_name": "MiddleB", "kind": 5, "declarations": [], - "spell": "3:7-3:14|0|1|2", - "extent": "3:1-3:31|0|1|0", + "spell": "3:7-3:14|0|1|2|-1", + "extent": "3:1-3:31|0|1|0|-1", "alias_of": 0, "bases": [3897841498936210886], "derived": [10963370434658308541], @@ -76,7 +76,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["4:40-4:47|10963370434658308541|2|2052"] + "uses": ["4:40-4:47|10963370434658308541|2|2052|-1"] }], "usr2var": [] } diff --git a/index_tests/inheritance/function_override.cc b/index_tests/inheritance/function_override.cc index 982a2cf1..14a5661a 100644 --- a/index_tests/inheritance/function_override.cc +++ b/index_tests/inheritance/function_override.cc @@ -18,8 +18,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "5:8-5:11|10963370434658308541|2|5186", - "extent": "5:3-5:25|10963370434658308541|2|0", + "spell": "5:8-5:11|10963370434658308541|2|5186|-1", + "extent": "5:3-5:25|10963370434658308541|2|0|-1", "bases": [9948027785633571339], "derived": [], "vars": [], @@ -32,7 +32,7 @@ OUTPUT: "short_name": "foo", "kind": 6, "storage": 0, - "declarations": ["2:16-2:19|3897841498936210886|2|1089"], + "declarations": ["2:16-2:19|2:3-2:21|3897841498936210886|2|1089|-1"], "bases": [], "derived": [6666242542855173890], "vars": [], @@ -46,8 +46,8 @@ OUTPUT: "short_name": "Root", "kind": 5, "declarations": [], - "spell": "1:7-1:11|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:11|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [10963370434658308541], @@ -55,7 +55,7 @@ OUTPUT: "funcs": [9948027785633571339], "vars": [], "instances": [], - "uses": ["4:24-4:28|10963370434658308541|2|2052"] + "uses": ["4:24-4:28|10963370434658308541|2|2052|-1"] }, { "usr": 10963370434658308541, "detailed_name": "class Derived : public Root {}", @@ -63,8 +63,8 @@ OUTPUT: "short_name": "Derived", "kind": 5, "declarations": [], - "spell": "4:7-4:14|0|1|2", - "extent": "4:1-6:2|0|1|0", + "spell": "4:7-4:14|0|1|2|-1", + "extent": "4:1-6:2|0|1|0|-1", "alias_of": 0, "bases": [3897841498936210886], "derived": [], diff --git a/index_tests/inheritance/interface_pure_virtual.cc b/index_tests/inheritance/interface_pure_virtual.cc index d002b0bd..58ee1d4f 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|1089"], + "declarations": ["2:16-2:19|2:3-2:25|9949214233977131946|2|1089|-1"], "bases": [], "derived": [], "vars": [], @@ -28,8 +28,8 @@ OUTPUT: "short_name": "IFoo", "kind": 5, "declarations": [], - "spell": "1:7-1:11|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:11|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/inheritance/multiple_base_functions.cc b/index_tests/inheritance/multiple_base_functions.cc index dcc0e781..11719475 100644 --- a/index_tests/inheritance/multiple_base_functions.cc +++ b/index_tests/inheritance/multiple_base_functions.cc @@ -21,8 +21,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "5:11-5:12|15826803741381445676|2|1090", - "extent": "5:3-5:23|15826803741381445676|2|0", + "spell": "5:11-5:12|15826803741381445676|2|1090|-1", + "extent": "5:3-5:23|15826803741381445676|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -36,8 +36,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "8:3-8:4|10963370434658308541|2|5186", - "extent": "8:3-8:26|10963370434658308541|2|0", + "spell": "8:3-8:4|10963370434658308541|2|5186|-1", + "extent": "8:3-8:26|10963370434658308541|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -51,8 +51,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "2:11-2:12|11628904180681204356|2|1090", - "extent": "2:3-2:23|11628904180681204356|2|0", + "spell": "2:11-2:12|11628904180681204356|2|1090|-1", + "extent": "2:3-2:23|11628904180681204356|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -66,8 +66,8 @@ OUTPUT: "short_name": "Derived", "kind": 23, "declarations": [], - "spell": "7:8-7:15|0|1|2", - "extent": "7:1-9:2|0|1|0", + "spell": "7:8-7:15|0|1|2|-1", + "extent": "7:1-9:2|0|1|0|-1", "alias_of": 0, "bases": [11628904180681204356, 15826803741381445676], "derived": [], @@ -75,7 +75,7 @@ OUTPUT: "funcs": [13164726294460837993], "vars": [], "instances": [], - "uses": ["8:4-8:11|10963370434658308541|2|4"] + "uses": ["8:4-8:11|10963370434658308541|2|4|-1"] }, { "usr": 11628904180681204356, "detailed_name": "struct Base0 {}", @@ -83,8 +83,8 @@ OUTPUT: "short_name": "Base0", "kind": 23, "declarations": [], - "spell": "1:8-1:13|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:13|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [10963370434658308541], @@ -92,7 +92,7 @@ OUTPUT: "funcs": [16347272523198263017], "vars": [], "instances": [], - "uses": ["2:12-2:17|11628904180681204356|2|4", "7:18-7:23|10963370434658308541|2|2052"] + "uses": ["2:12-2:17|11628904180681204356|2|4|-1", "7:18-7:23|10963370434658308541|2|2052|-1"] }, { "usr": 15826803741381445676, "detailed_name": "struct Base1 {}", @@ -100,8 +100,8 @@ OUTPUT: "short_name": "Base1", "kind": 23, "declarations": [], - "spell": "4:8-4:13|0|1|2", - "extent": "4:1-6:2|0|1|0", + "spell": "4:8-4:13|0|1|2|-1", + "extent": "4:1-6:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [10963370434658308541], @@ -109,7 +109,7 @@ OUTPUT: "funcs": [8401779086123965305], "vars": [], "instances": [], - "uses": ["5:12-5:17|15826803741381445676|2|4", "7:25-7:30|10963370434658308541|2|2052"] + "uses": ["5:12-5:17|15826803741381445676|2|4|-1", "7:25-7:30|10963370434658308541|2|2052|-1"] }], "usr2var": [] } diff --git a/index_tests/lambdas/lambda.cc b/index_tests/lambdas/lambda.cc index 357d6e32..2f5371f9 100644 --- a/index_tests/lambdas/lambda.cc +++ b/index_tests/lambdas/lambda.cc @@ -24,8 +24,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-12:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-12:2|0|1|0|-1", "bases": [], "derived": [], "vars": [12666114896600231317, 2981279427664991319], @@ -42,7 +42,7 @@ OUTPUT: "bases": [], "derived": [], "vars": [], - "uses": ["9:14-9:15|4259594751088586730|3|16420", "10:14-10:15|4259594751088586730|3|16420", "11:14-11:15|4259594751088586730|3|16420"], + "uses": ["9:14-9:15|4259594751088586730|3|16420|-1", "10:14-10:15|4259594751088586730|3|16420|-1", "11:14-11:15|4259594751088586730|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -67,8 +67,8 @@ OUTPUT: "short_name": "", "kind": 26, "declarations": [], - "spell": "4:22-4:23|4259594751088586730|3|2", - "extent": "4:22-4:23|4259594751088586730|3|0", + "spell": "4:22-4:23|4259594751088586730|3|2|-1", + "extent": "4:22-4:23|4259594751088586730|3|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -85,10 +85,10 @@ OUTPUT: "short_name": "dosomething", "hover": "(lambda) dosomething", "declarations": [], - "spell": "4:8-4:19|4259594751088586730|3|2", - "extent": "4:3-7:4|4259594751088586730|3|0", + "spell": "4:8-4:19|4259594751088586730|3|2|-1", + "extent": "4:3-7:4|4259594751088586730|3|0|-1", "type": 14635009347499519042, - "uses": ["9:3-9:14|4259594751088586730|3|4", "10:3-10:14|4259594751088586730|3|4", "11:3-11:14|4259594751088586730|3|4"], + "uses": ["9:3-9:14|4259594751088586730|3|4|-1", "10:3-10:14|4259594751088586730|3|4|-1", "11:3-11:14|4259594751088586730|3|4|-1"], "kind": 13, "storage": 0 }, { @@ -97,10 +97,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "x", "declarations": [], - "spell": "2:7-2:8|4259594751088586730|3|2", - "extent": "2:3-2:8|4259594751088586730|3|0", + "spell": "2:7-2:8|4259594751088586730|3|2|-1", + "extent": "2:3-2:8|4259594751088586730|3|0|-1", "type": 53, - "uses": ["4:24-4:25|4259594751088586730|3|4", "5:7-5:8|4259594751088586730|3|28"], + "uses": ["4:24-4:25|4259594751088586730|3|4|-1", "5:7-5:8|4259594751088586730|3|28|-1"], "kind": 13, "storage": 0 }, { @@ -109,10 +109,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "y", "declarations": [], - "spell": "4:31-4:32|17926497908620168464|3|2", - "extent": "4:27-4:32|4259594751088586730|3|0", + "spell": "4:31-4:32|17926497908620168464|3|2|-1", + "extent": "4:27-4:32|4259594751088586730|3|0|-1", "type": 0, - "uses": ["6:7-6:8|4259594751088586730|3|28"], + "uses": ["6:7-6:8|4259594751088586730|3|28|-1"], "kind": 253, "storage": 0 }] diff --git a/index_tests/macros/complex.cc b/index_tests/macros/complex.cc index a74be500..b88c3eaa 100644 --- a/index_tests/macros/complex.cc +++ b/index_tests/macros/complex.cc @@ -23,9 +23,9 @@ OUTPUT: "short_name": "a", "kind": 12, "storage": 0, - "declarations": ["12:1-12:20|0|1|1"], - "spell": "12:1-12:20|0|1|2", - "extent": "12:1-12:20|0|1|0", + "declarations": ["12:1-12:20|12:1-12:20|0|1|1|-1"], + "spell": "12:1-12:20|0|1|2|-1", + "extent": "12:1-12:20|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -39,12 +39,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "6:5-6:10|0|1|2", - "extent": "6:1-8:2|0|1|0", + "spell": "6:5-6:10|0|1|2|-1", + "extent": "6:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["12:5-12:10|9720930732776154610|3|16420", "12:5-12:10|0|1|64|0"], + "uses": ["12:5-12:10|9720930732776154610|3|16420|-1", "12:5-12:10|0|1|64|0"], "callees": [] }], "usr2type": [{ @@ -70,10 +70,10 @@ OUTPUT: "short_name": "make2", "hover": "const int make2 = 5", "declarations": [], - "spell": "9:11-9:16|0|1|2", - "extent": "9:1-9:20|0|1|0", + "spell": "9:11-9:16|0|1|2|-1", + "extent": "9:1-9:20|0|1|0|-1", "type": 53, - "uses": ["12:14-12:19|9720930732776154610|3|12", "12:14-12:19|0|1|64|0"], + "uses": ["12:14-12:19|9720930732776154610|3|12|-1", "12:14-12:19|0|1|64|0"], "kind": 13, "storage": 0 }, { @@ -83,10 +83,10 @@ OUTPUT: "short_name": "FOO", "hover": "#define FOO(aaa, bbb) \\\n int a();\\\n int a() { return aaa + bbb; }", "declarations": [], - "spell": "1:9-1:12|0|1|2", - "extent": "1:9-3:32|0|1|0", + "spell": "1:9-1:12|0|1|2|-1", + "extent": "1:9-3:32|0|1|0|-1", "type": 0, - "uses": ["12:1-12:4|0|1|64"], + "uses": ["12:1-12:4|0|1|64|-1"], "kind": 255, "storage": 0 }] diff --git a/index_tests/macros/foo.cc b/index_tests/macros/foo.cc index 7b7c8b04..156ab237 100644 --- a/index_tests/macros/foo.cc +++ b/index_tests/macros/foo.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 9, "storage": 0, "declarations": [], - "spell": "5:12-5:15|15041163540773201510|2|1026", - "extent": "5:12-5:15|15041163540773201510|2|0", + "spell": "5:12-5:15|15041163540773201510|2|1026|-1", + "extent": "5:12-5:15|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -50,8 +50,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "4:8-4:11|0|1|2", - "extent": "4:1-6:2|0|1|0", + "spell": "4:8-4:11|0|1|2|-1", + "extent": "4:1-6:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -59,7 +59,7 @@ OUTPUT: "funcs": [13788753348312146871], "vars": [], "instances": [], - "uses": ["5:12-5:15|15041163540773201510|2|4", "5:12-5:15|0|1|64|0"] + "uses": ["5:12-5:15|15041163540773201510|2|4|-1", "5:12-5:15|0|1|64|0"] }], "usr2var": [{ "usr": 1569772797058982873, @@ -68,10 +68,10 @@ OUTPUT: "short_name": "A", "hover": "#define A 5", "declarations": [], - "spell": "1:9-1:10|0|1|2", - "extent": "1:9-1:12|0|1|0", + "spell": "1:9-1:10|0|1|2|-1", + "extent": "1:9-1:12|0|1|0|-1", "type": 0, - "uses": ["8:9-8:10|0|1|64"], + "uses": ["8:9-8:10|0|1|64|-1"], "kind": 255, "storage": 0 }, { @@ -81,10 +81,10 @@ OUTPUT: "short_name": "DISALLOW", "hover": "#define DISALLOW(type) type(type&&) = delete;", "declarations": [], - "spell": "2:9-2:17|0|1|2", - "extent": "2:9-2:46|0|1|0", + "spell": "2:9-2:17|0|1|2|-1", + "extent": "2:9-2:46|0|1|0|-1", "type": 0, - "uses": ["5:3-5:11|0|1|64"], + "uses": ["5:3-5:11|0|1|64|-1"], "kind": 255, "storage": 0 }, { @@ -94,8 +94,8 @@ OUTPUT: "short_name": "x", "hover": "int x = A", "declarations": [], - "spell": "8:5-8:6|0|1|2", - "extent": "8:1-1:1|0|1|0", + "spell": "8:5-8:6|0|1|2|-1", + "extent": "8:1-1:1|0|1|0|-1", "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/method_declaration.cc b/index_tests/method_declaration.cc index 00edb4de..fae12cdc 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|1025"], + "declarations": ["2:8-2:11|2:3-2:13|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -32,8 +32,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/method_definition.cc b/index_tests/method_definition.cc index b79e9ba3..895eac04 100644 --- a/index_tests/method_definition.cc +++ b/index_tests/method_definition.cc @@ -16,9 +16,9 @@ OUTPUT: "short_name": "foo", "kind": 6, "storage": 0, - "declarations": ["2:8-2:11|15041163540773201510|2|1025"], - "spell": "5:11-5:14|15041163540773201510|2|1026", - "extent": "5:1-5:25|15041163540773201510|2|0", + "declarations": ["2:8-2:11|2:3-2:19|15041163540773201510|2|1025|-1"], + "spell": "5:11-5:14|15041163540773201510|2|1026|-1", + "extent": "5:1-5:25|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -32,8 +32,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -41,7 +41,7 @@ OUTPUT: "funcs": [6446764306530590711], "vars": [], "instances": [], - "uses": ["5:6-5:9|0|1|4"] + "uses": ["5:6-5:9|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/method_inline_declaration.cc b/index_tests/method_inline_declaration.cc index 64ced29b..f2294cd0 100644 --- a/index_tests/method_inline_declaration.cc +++ b/index_tests/method_inline_declaration.cc @@ -15,8 +15,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "2:8-2:11|15041163540773201510|2|1026", - "extent": "2:3-2:16|15041163540773201510|2|0", + "spell": "2:8-2:11|15041163540773201510|2|1026|-1", + "extent": "2:3-2:16|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -30,8 +30,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/multi_file/funky_enum.cc b/index_tests/multi_file/funky_enum.cc index 69f5ebdc..784f210d 100644 --- a/index_tests/multi_file/funky_enum.cc +++ b/index_tests/multi_file/funky_enum.cc @@ -35,8 +35,8 @@ OUTPUT: funky_enum.h "hover": "A = 0", "comments": "This file cannot be built directory. It is included in an enum definition of\nanother file.", "declarations": [], - "spell": "4:1-4:2|16985894625255407295|2|1026", - "extent": "4:1-4:2|16985894625255407295|2|0", + "spell": "4:1-4:2|16985894625255407295|2|1026|-1", + "extent": "4:1-4:2|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -49,8 +49,8 @@ OUTPUT: funky_enum.h "hover": "C = 2", "comments": "This file cannot be built directory. It is included in an enum definition of\nanother file.", "declarations": [], - "spell": "6:1-6:2|16985894625255407295|2|1026", - "extent": "6:1-6:2|16985894625255407295|2|0", + "spell": "6:1-6:2|16985894625255407295|2|1026|-1", + "extent": "6:1-6:2|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -63,8 +63,8 @@ OUTPUT: funky_enum.h "hover": "B = 1", "comments": "This file cannot be built directory. It is included in an enum definition of\nanother file.", "declarations": [], - "spell": "5:1-5:2|16985894625255407295|2|1026", - "extent": "5:1-5:2|16985894625255407295|2|0", + "spell": "5:1-5:2|16985894625255407295|2|1026|-1", + "extent": "5:1-5:2|16985894625255407295|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -86,8 +86,8 @@ OUTPUT: funky_enum.cc "short_name": "Foo", "kind": 10, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/multi_file/impl.cc b/index_tests/multi_file/impl.cc index 12a625b3..1ef51a20 100644 --- a/index_tests/multi_file/impl.cc +++ b/index_tests/multi_file/impl.cc @@ -17,8 +17,8 @@ OUTPUT: header.h "kind": 12, "storage": 0, "declarations": [], - "spell": "10:6-10:10|0|1|2", - "extent": "10:1-10:15|0|1|0", + "spell": "10:6-10:10|0|1|2|-1", + "extent": "10:1-10:15|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -47,8 +47,8 @@ OUTPUT: header.h "short_name": "Foo2", "kind": 23, "declarations": [], - "spell": "13:8-13:12|0|1|2", - "extent": "13:1-13:15|0|1|0", + "spell": "13:8-13:12|0|1|2|-1", + "extent": "13:1-13:15|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -64,8 +64,8 @@ OUTPUT: header.h "short_name": "Foo0", "kind": 252, "declarations": [], - "spell": "7:7-7:11|0|1|2", - "extent": "7:1-7:29|0|1|0", + "spell": "7:7-7:11|0|1|2|-1", + "extent": "7:1-7:29|0|1|0|-1", "alias_of": 16750616846959666305, "bases": [], "derived": [], @@ -81,8 +81,8 @@ OUTPUT: header.h "short_name": "Foo3", "kind": 10, "declarations": [], - "spell": "15:6-15:10|0|1|2", - "extent": "15:1-15:22|0|1|0", + "spell": "15:6-15:10|0|1|2|-1", + "extent": "15:1-15:22|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -98,8 +98,8 @@ OUTPUT: header.h "short_name": "Base", "kind": 23, "declarations": [], - "spell": "3:8-3:12|0|1|2", - "extent": "3:1-3:15|0|1|0", + "spell": "3:8-3:12|0|1|2|-1", + "extent": "3:1-3:15|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [16750616846959666305], @@ -107,7 +107,7 @@ OUTPUT: header.h "funcs": [], "vars": [], "instances": [], - "uses": ["5:26-5:30|16750616846959666305|2|2052"] + "uses": ["5:26-5:30|16750616846959666305|2|2052|-1"] }, { "usr": 16750616846959666305, "detailed_name": "struct SameFileDerived : Base {}", @@ -115,8 +115,8 @@ OUTPUT: header.h "short_name": "SameFileDerived", "kind": 23, "declarations": [], - "spell": "5:8-5:23|0|1|2", - "extent": "5:1-5:33|0|1|0", + "spell": "5:8-5:23|0|1|2|-1", + "extent": "5:1-5:33|0|1|0|-1", "alias_of": 0, "bases": [8420119006782424779], "derived": [], @@ -124,7 +124,7 @@ OUTPUT: header.h "funcs": [], "vars": [], "instances": [], - "uses": ["7:14-7:29|0|1|4"] + "uses": ["7:14-7:29|0|1|4|-1"] }], "usr2var": [{ "usr": 2638219001294786365, @@ -132,8 +132,8 @@ OUTPUT: header.h "qual_name_offset": 4, "short_name": "Foo4", "declarations": [], - "spell": "17:5-17:9|0|1|2", - "extent": "17:1-17:9|0|1|0", + "spell": "17:5-17:9|0|1|2|-1", + "extent": "17:1-17:9|0|1|0|-1", "type": 53, "uses": [], "kind": 13, @@ -145,8 +145,8 @@ OUTPUT: header.h "short_name": "A", "hover": "A = 0", "declarations": [], - "spell": "15:13-15:14|4481210672785600703|2|1026", - "extent": "15:13-15:14|4481210672785600703|2|0", + "spell": "15:13-15:14|4481210672785600703|2|1026|-1", + "extent": "15:13-15:14|4481210672785600703|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -158,8 +158,8 @@ OUTPUT: header.h "short_name": "C", "hover": "C = 2", "declarations": [], - "spell": "15:19-15:20|4481210672785600703|2|1026", - "extent": "15:19-15:20|4481210672785600703|2|0", + "spell": "15:19-15:20|4481210672785600703|2|1026|-1", + "extent": "15:19-15:20|4481210672785600703|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -170,8 +170,8 @@ OUTPUT: header.h "qual_name_offset": 11, "short_name": "Foo5", "declarations": [], - "spell": "18:12-18:16|0|1|2", - "extent": "18:1-18:16|0|1|0", + "spell": "18:12-18:16|0|1|2|-1", + "extent": "18:1-18:16|0|1|0|-1", "type": 53, "uses": [], "kind": 13, @@ -183,8 +183,8 @@ OUTPUT: header.h "short_name": "B", "hover": "B = 1", "declarations": [], - "spell": "15:16-15:17|4481210672785600703|2|1026", - "extent": "15:16-15:17|4481210672785600703|2|0", + "spell": "15:16-15:17|4481210672785600703|2|1026|-1", + "extent": "15:16-15:17|4481210672785600703|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -206,8 +206,8 @@ OUTPUT: impl.cc "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:10|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:10|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -224,7 +224,7 @@ OUTPUT: impl.cc "bases": [], "derived": [], "vars": [], - "uses": ["4:3-4:7|5817708529036841195|3|16420"], + "uses": ["4:3-4:7|5817708529036841195|3|16420|-1"], "callees": [] }], "usr2type": [], diff --git a/index_tests/multi_file/simple_impl.cc b/index_tests/multi_file/simple_impl.cc index df6d723e..75b57e37 100644 --- a/index_tests/multi_file/simple_impl.cc +++ b/index_tests/multi_file/simple_impl.cc @@ -16,7 +16,7 @@ OUTPUT: simple_header.h "short_name": "header", "kind": 12, "storage": 0, - "declarations": ["3:6-3:12|0|1|1"], + "declarations": ["3:6-3:12|3:1-3:14|0|1|1|-1"], "bases": [], "derived": [], "vars": [], @@ -41,8 +41,8 @@ OUTPUT: simple_impl.cc "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:10|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:10|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -59,7 +59,7 @@ OUTPUT: simple_impl.cc "bases": [], "derived": [], "vars": [], - "uses": ["4:3-4:9|3373269392705484958|3|16420"], + "uses": ["4:3-4:9|3373269392705484958|3|16420|-1"], "callees": [] }], "usr2type": [], diff --git a/index_tests/multi_file/static.cc b/index_tests/multi_file/static.cc index 7b255c5d..7f8d6c72 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": 254, "storage": 0, - "declarations": ["4:15-4:33|9411323049603567600|2|1025"], + "declarations": ["4:15-4:33|4:3-4:35|9411323049603567600|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -28,8 +28,8 @@ OUTPUT: static.h "short_name": "Buffer", "kind": 23, "declarations": [], - "spell": "3:8-3:14|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:8-3:14|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -56,8 +56,8 @@ OUTPUT: static.cc "kind": 254, "storage": 0, "declarations": [], - "spell": "3:14-3:32|9411323049603567600|2|1026", - "extent": "3:1-3:37|9411323049603567600|2|0", + "spell": "3:14-3:32|9411323049603567600|2|1026|-1", + "extent": "3:1-3:37|9411323049603567600|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -78,7 +78,7 @@ OUTPUT: static.cc "funcs": [14576076421851654759], "vars": [], "instances": [], - "uses": ["3:6-3:12|0|1|4"] + "uses": ["3:6-3:12|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/namespaces/anonymous_function.cc b/index_tests/namespaces/anonymous_function.cc index eb89d959..89d660a7 100644 --- a/index_tests/namespaces/anonymous_function.cc +++ b/index_tests/namespaces/anonymous_function.cc @@ -14,7 +14,7 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["2:6-2:9|7144845543074395457|2|1"], + "declarations": ["2:6-2:9|2:1-2:11|7144845543074395457|2|1|-1"], "bases": [], "derived": [], "vars": [], diff --git a/index_tests/namespaces/function_declaration.cc b/index_tests/namespaces/function_declaration.cc index ec694bc9..9ca5a4d8 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|1025"], + "declarations": ["2:6-2:9|2:1-2:23|2029211996748007610|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -27,7 +27,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "hello", "kind": 3, - "declarations": ["1:11-1:16|0|1|1"], + "declarations": ["1:11-1:16|1:1-3:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/namespaces/function_definition.cc b/index_tests/namespaces/function_definition.cc index ce784555..e732b06e 100644 --- a/index_tests/namespaces/function_definition.cc +++ b/index_tests/namespaces/function_definition.cc @@ -15,8 +15,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "2:6-2:9|2029211996748007610|2|1026", - "extent": "2:1-2:14|2029211996748007610|2|0", + "spell": "2:6-2:9|2029211996748007610|2|1026|-1", + "extent": "2:1-2:14|2029211996748007610|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -29,7 +29,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "hello", "kind": 3, - "declarations": ["1:11-1:16|0|1|1"], + "declarations": ["1:11-1:16|1:1-3:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/namespaces/method_declaration.cc b/index_tests/namespaces/method_declaration.cc index de02f813..b957b1d5 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|1025"], + "declarations": ["3:8-3:11|3:3-3:13|4508214972876735896|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -29,7 +29,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "hello", "kind": 3, - "declarations": ["1:11-1:16|0|1|1"], + "declarations": ["1:11-1:16|1:1-5:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -45,8 +45,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "2:7-2:10|2029211996748007610|2|1026", - "extent": "2:1-4:2|2029211996748007610|2|0", + "spell": "2:7-2:10|2029211996748007610|2|1026|-1", + "extent": "2:1-4:2|2029211996748007610|2|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/namespaces/method_definition.cc b/index_tests/namespaces/method_definition.cc index 5a25f7a9..00f55200 100644 --- a/index_tests/namespaces/method_definition.cc +++ b/index_tests/namespaces/method_definition.cc @@ -18,9 +18,9 @@ OUTPUT: "short_name": "foo", "kind": 6, "storage": 0, - "declarations": ["3:8-3:11|4508214972876735896|2|1025"], - "spell": "6:11-6:14|4508214972876735896|2|1026", - "extent": "6:1-6:19|4508214972876735896|2|0", + "declarations": ["3:8-3:11|3:3-3:13|4508214972876735896|2|1025|-1"], + "spell": "6:11-6:14|4508214972876735896|2|1026|-1", + "extent": "6:1-6:19|4508214972876735896|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -33,7 +33,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "hello", "kind": 3, - "declarations": ["1:11-1:16|0|1|1"], + "declarations": ["1:11-1:16|1:1-7:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -49,8 +49,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "2:7-2:10|2029211996748007610|2|1026", - "extent": "2:1-4:2|2029211996748007610|2|0", + "spell": "2:7-2:10|2029211996748007610|2|1026|-1", + "extent": "2:1-4:2|2029211996748007610|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -58,7 +58,7 @@ OUTPUT: "funcs": [10487325150128053272], "vars": [], "instances": [], - "uses": ["6:6-6:9|2029211996748007610|2|4"] + "uses": ["6:6-6:9|2029211996748007610|2|4|-1"] }], "usr2var": [] } diff --git a/index_tests/namespaces/method_inline_declaration.cc b/index_tests/namespaces/method_inline_declaration.cc index b4029c5f..4d048be1 100644 --- a/index_tests/namespaces/method_inline_declaration.cc +++ b/index_tests/namespaces/method_inline_declaration.cc @@ -17,8 +17,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "3:8-3:11|4508214972876735896|2|1026", - "extent": "3:3-3:16|4508214972876735896|2|0", + "spell": "3:8-3:11|4508214972876735896|2|1026|-1", + "extent": "3:3-3:16|4508214972876735896|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -31,7 +31,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "hello", "kind": 3, - "declarations": ["1:11-1:16|0|1|1"], + "declarations": ["1:11-1:16|1:1-5:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -47,8 +47,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "2:7-2:10|2029211996748007610|2|1026", - "extent": "2:1-4:2|2029211996748007610|2|0", + "spell": "2:7-2:10|2029211996748007610|2|1026|-1", + "extent": "2:1-4:2|2029211996748007610|2|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/namespaces/namespace_alias.cc b/index_tests/namespaces/namespace_alias.cc index 314890b8..b8cbce9c 100644 --- a/index_tests/namespaces/namespace_alias.cc +++ b/index_tests/namespaces/namespace_alias.cc @@ -26,8 +26,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "11:6-11:10|0|1|2", - "extent": "11:1-14:2|0|1|0", + "spell": "11:6-11:10|0|1|2|-1", + "extent": "11:1-14:2|0|1|0|-1", "bases": [], "derived": [], "vars": [6030927277961448585, 7657277353101371136], @@ -55,7 +55,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "foo", "kind": 3, - "declarations": ["1:11-1:14|0|1|1"], + "declarations": ["1:11-1:14|1:1-7:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [17805385787823406700], @@ -63,14 +63,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:17-9:20|0|1|4", "12:11-12:14|10818727483146447186|3|4"] + "uses": ["9:17-9:20|0|1|4|-1", "12:11-12:14|10818727483146447186|3|4|-1"] }, { "usr": 11879713791858506216, "detailed_name": "namespace fbz = foo::bar::baz", "qual_name_offset": 10, "short_name": "fbz", "kind": 252, - "declarations": ["9:11-9:14|0|1|1"], + "declarations": ["9:11-9:14|9:1-9:30|0|1|1|-1"], "alias_of": 14450849931009540802, "bases": [], "derived": [], @@ -78,14 +78,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["13:11-13:14|10818727483146447186|3|4"] + "uses": ["13:11-13:14|10818727483146447186|3|4|-1"] }, { "usr": 14450849931009540802, "detailed_name": "namespace foo::bar::baz {}", "qual_name_offset": 10, "short_name": "baz", "kind": 3, - "declarations": ["3:20-3:23|17805385787823406700|2|1025"], + "declarations": ["3:20-3:23|3:10-5:11|17805385787823406700|2|1025|-1"], "alias_of": 0, "bases": [17805385787823406700], "derived": [], @@ -96,14 +96,14 @@ OUTPUT: "R": -1 }], "instances": [], - "uses": ["9:27-9:30|0|1|4", "12:21-12:24|10818727483146447186|3|4"] + "uses": ["9:27-9:30|0|1|4|-1", "12:21-12:24|10818727483146447186|3|4|-1"] }, { "usr": 17805385787823406700, "detailed_name": "namespace foo::bar {}", "qual_name_offset": 10, "short_name": "bar", "kind": 3, - "declarations": ["2:15-2:18|926793467007732869|2|1025"], + "declarations": ["2:15-2:18|2:5-6:6|926793467007732869|2|1025|-1"], "alias_of": 0, "bases": [926793467007732869], "derived": [14450849931009540802], @@ -111,7 +111,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:22-9:25|0|1|4", "12:16-12:19|10818727483146447186|3|4"] + "uses": ["9:22-9:25|0|1|4|-1", "12:16-12:19|10818727483146447186|3|4|-1"] }], "usr2var": [{ "usr": 6030927277961448585, @@ -120,8 +120,8 @@ OUTPUT: "short_name": "a", "hover": "int a = foo::bar::baz::qux", "declarations": [], - "spell": "12:7-12:8|10818727483146447186|3|2", - "extent": "12:3-12:29|10818727483146447186|3|0", + "spell": "12:7-12:8|10818727483146447186|3|2|-1", + "extent": "12:3-12:29|10818727483146447186|3|0|-1", "type": 53, "uses": [], "kind": 13, @@ -133,8 +133,8 @@ OUTPUT: "short_name": "b", "hover": "int b = fbz::qux", "declarations": [], - "spell": "13:7-13:8|10818727483146447186|3|2", - "extent": "13:3-13:19|10818727483146447186|3|0", + "spell": "13:7-13:8|10818727483146447186|3|2|-1", + "extent": "13:3-13:19|10818727483146447186|3|0|-1", "type": 53, "uses": [], "kind": 13, @@ -146,10 +146,10 @@ OUTPUT: "short_name": "qux", "hover": "int foo::bar::baz::qux = 42", "declarations": [], - "spell": "4:18-4:21|14450849931009540802|2|1026", - "extent": "4:14-4:26|14450849931009540802|2|0", + "spell": "4:18-4:21|14450849931009540802|2|1026|-1", + "extent": "4:14-4:26|14450849931009540802|2|0|-1", "type": 53, - "uses": ["12:26-12:29|10818727483146447186|3|12", "13:16-13:19|10818727483146447186|3|12"], + "uses": ["12:26-12:29|10818727483146447186|3|12|-1", "13:16-13:19|10818727483146447186|3|12|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/namespaces/namespace_reference.cc b/index_tests/namespaces/namespace_reference.cc index 09919e03..4565040d 100644 --- a/index_tests/namespaces/namespace_reference.cc +++ b/index_tests/namespaces/namespace_reference.cc @@ -22,8 +22,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "6:6-6:12|0|1|2", - "extent": "6:1-10:2|0|1|0", + "spell": "6:6-6:12|0|1|2|-1", + "extent": "6:1-10:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -37,12 +37,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:8-3:14|11072669167287398027|2|1026", - "extent": "3:3-3:24|11072669167287398027|2|0", + "spell": "3:8-3:14|11072669167287398027|2|1026|-1", + "extent": "3:3-3:24|11072669167287398027|2|0|-1", "bases": [], "derived": [], "vars": [3649375698083002347], - "uses": ["7:7-7:13|631910859630953711|3|16420", "9:3-9:9|631910859630953711|3|16420"], + "uses": ["7:7-7:13|631910859630953711|3|16420|-1", "9:3-9:9|631910859630953711|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -66,7 +66,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "ns", "kind": 3, - "declarations": ["1:11-1:13|0|1|1"], + "declarations": ["1:11-1:13|1:1-4:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -77,7 +77,7 @@ OUTPUT: "R": -1 }], "instances": [], - "uses": ["7:3-7:5|631910859630953711|3|4", "7:14-7:16|631910859630953711|3|4", "8:19-8:21|631910859630953711|3|4"] + "uses": ["7:3-7:5|631910859630953711|3|4|-1", "7:14-7:16|631910859630953711|3|4|-1", "8:19-8:21|631910859630953711|3|4|-1"] }], "usr2var": [{ "usr": 3649375698083002347, @@ -85,8 +85,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "3:19-3:20|17328473273923617489|3|1026", - "extent": "3:15-3:20|17328473273923617489|3|0", + "spell": "3:19-3:20|17328473273923617489|3|1026|-1", + "extent": "3:15-3:20|17328473273923617489|3|0|-1", "type": 53, "uses": [], "kind": 253, @@ -97,10 +97,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "Foo", "declarations": [], - "spell": "2:7-2:10|11072669167287398027|2|1026", - "extent": "2:3-2:10|11072669167287398027|2|0", + "spell": "2:7-2:10|11072669167287398027|2|1026|-1", + "extent": "2:3-2:10|11072669167287398027|2|0|-1", "type": 53, - "uses": ["7:18-7:21|631910859630953711|3|12", "9:10-9:13|631910859630953711|3|12"], + "uses": ["7:18-7:21|631910859630953711|3|12|-1", "9:10-9:13|631910859630953711|3|12|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/operators/operator.cc b/index_tests/operators/operator.cc index e05be650..3a569983 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|1025"], + "declarations": ["3:8-3:16|3:3-3:24|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -31,7 +31,7 @@ OUTPUT: "short_name": "operator()", "kind": 6, "storage": 0, - "declarations": ["4:7-4:15|15041163540773201510|2|1025"], + "declarations": ["4:7-4:15|4:3-4:31|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -45,8 +45,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "2:8-2:16|15041163540773201510|2|1026", - "extent": "2:3-2:27|15041163540773201510|2|0", + "spell": "2:8-2:16|15041163540773201510|2|1026|-1", + "extent": "2:3-2:27|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -59,7 +59,7 @@ OUTPUT: "short_name": "operator+=", "kind": 12, "storage": 0, - "declarations": ["7:6-7:14|0|1|1"], + "declarations": ["7:6-7:14|7:1-7:42|0|1|1|-1"], "bases": [], "derived": [], "vars": [], @@ -73,8 +73,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-5:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -82,7 +82,7 @@ OUTPUT: "funcs": [7874436189163837815, 3545323327609582678, 3986818119971932909], "vars": [], "instances": [], - "uses": ["7:1-7:4|0|1|4", "7:25-7:28|0|1|4"] + "uses": ["7:1-7:4|0|1|4|-1", "7:25-7:28|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/outline/static_function_in_type.cc b/index_tests/outline/static_function_in_type.cc index 9826edca..7bf971e6 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": 254, "storage": 0, - "declarations": ["6:15-6:23|17262466801709381811|2|1025"], + "declarations": ["6:15-6:23|6:3-6:33|17262466801709381811|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -31,7 +31,7 @@ OUTPUT: static_function_in_type.h "qual_name_offset": 6, "short_name": "Manager", "kind": 5, - "declarations": ["3:7-3:14|11072669167287398027|2|1025"], + "declarations": ["3:7-3:14|3:1-3:14|11072669167287398027|2|1025|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -39,14 +39,14 @@ OUTPUT: static_function_in_type.h "funcs": [], "vars": [], "instances": [], - "uses": ["6:24-6:31|17262466801709381811|2|4"] + "uses": ["6:24-6:31|17262466801709381811|2|4|-1"] }, { "usr": 11072669167287398027, "detailed_name": "namespace ns {}", "qual_name_offset": 10, "short_name": "ns", "kind": 3, - "declarations": ["1:11-1:13|0|1|1"], + "declarations": ["1:11-1:13|1:1-9:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -62,8 +62,8 @@ OUTPUT: static_function_in_type.h "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "5:8-5:11|11072669167287398027|2|1026", - "extent": "5:1-7:2|11072669167287398027|2|0", + "spell": "5:8-5:11|11072669167287398027|2|1026|-1", + "extent": "5:1-7:2|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -91,8 +91,8 @@ OUTPUT: static_function_in_type.cc "storage": 0, "comments": "static", "declarations": [], - "spell": "5:11-5:19|17262466801709381811|2|1026", - "extent": "5:1-6:2|17262466801709381811|2|0", + "spell": "5:11-5:19|17262466801709381811|2|1026|-1", + "extent": "5:1-6:2|17262466801709381811|2|0|-1", "bases": [], "derived": [], "vars": [13569879755236306838], @@ -113,14 +113,14 @@ OUTPUT: static_function_in_type.cc "funcs": [], "vars": [], "instances": [13569879755236306838], - "uses": ["5:20-5:27|11072669167287398027|2|4"] + "uses": ["5:20-5:27|11072669167287398027|2|4|-1"] }, { "usr": 11072669167287398027, "detailed_name": "namespace ns {}", "qual_name_offset": 10, "short_name": "ns", "kind": 3, - "declarations": ["3:11-3:13|0|1|1"], + "declarations": ["3:11-3:13|3:1-7:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -143,7 +143,7 @@ OUTPUT: static_function_in_type.cc "funcs": [17019747379608639279], "vars": [], "instances": [], - "uses": ["5:6-5:9|11072669167287398027|2|4"] + "uses": ["5:6-5:9|11072669167287398027|2|4|-1"] }], "usr2var": [{ "usr": 13569879755236306838, @@ -151,8 +151,8 @@ OUTPUT: static_function_in_type.cc "qual_name_offset": 13, "short_name": "m", "declarations": [], - "spell": "5:29-5:30|17019747379608639279|3|1026", - "extent": "5:20-5:30|17019747379608639279|3|0", + "spell": "5:29-5:30|17019747379608639279|3|1026|-1", + "extent": "5:20-5:30|17019747379608639279|3|0|-1", "type": 1972401196751872203, "uses": [], "kind": 253, diff --git a/index_tests/preprocessor/include_guard.cc b/index_tests/preprocessor/include_guard.cc index 5b4ef807..d9d069f7 100644 --- a/index_tests/preprocessor/include_guard.cc +++ b/index_tests/preprocessor/include_guard.cc @@ -17,8 +17,8 @@ OUTPUT: "short_name": "FOO", "hover": "#define FOO", "declarations": [], - "spell": "2:9-2:12|0|1|2", - "extent": "2:9-2:12|0|1|0", + "spell": "2:9-2:12|0|1|2|-1", + "extent": "2:9-2:12|0|1|0|-1", "type": 0, "uses": [], "kind": 255, diff --git a/index_tests/templates/func_specialized_template_param.cc b/index_tests/templates/func_specialized_template_param.cc index 7d5f44be..32222811 100644 --- a/index_tests/templates/func_specialized_template_param.cc +++ b/index_tests/templates/func_specialized_template_param.cc @@ -19,9 +19,9 @@ OUTPUT: "short_name": "Bar", "kind": 6, "storage": 0, - "declarations": ["5:8-5:11|15041163540773201510|2|1025"], - "spell": "8:11-8:14|15041163540773201510|2|1026", - "extent": "8:1-8:36|15041163540773201510|2|0", + "declarations": ["5:8-5:11|5:3-5:30|15041163540773201510|2|1025|-1"], + "spell": "8:11-8:14|15041163540773201510|2|1026|-1", + "extent": "8:1-8:36|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -42,7 +42,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["5:12-5:20|15041163540773201510|2|4", "8:15-8:23|0|1|4"] + "uses": ["5:12-5:20|15041163540773201510|2|4|-1", "8:15-8:23|0|1|4|-1"] }, { "usr": 15041163540773201510, "detailed_name": "struct Foo {}", @@ -50,8 +50,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "4:8-4:11|0|1|2", - "extent": "4:1-6:2|0|1|0", + "spell": "4:8-4:11|0|1|2|-1", + "extent": "4:1-6:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -59,7 +59,7 @@ OUTPUT: "funcs": [8412238651648388423], "vars": [], "instances": [], - "uses": ["8:6-8:9|0|1|4"] + "uses": ["8:6-8:9|0|1|4|-1"] }, { "usr": 17107291254533526269, "detailed_name": "class Template {}", @@ -67,8 +67,8 @@ OUTPUT: "short_name": "Template", "kind": 5, "declarations": [], - "spell": "2:7-2:15|0|1|2", - "extent": "2:1-2:18|0|1|0", + "spell": "2:7-2:15|0|1|2|-1", + "extent": "2:1-2:18|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], diff --git a/index_tests/templates/implicit_variable_instantiation.cc b/index_tests/templates/implicit_variable_instantiation.cc index 36a97821..6548d39b 100644 --- a/index_tests/templates/implicit_variable_instantiation.cc +++ b/index_tests/templates/implicit_variable_instantiation.cc @@ -42,8 +42,8 @@ OUTPUT: "short_name": "VarType", "kind": 10, "declarations": [], - "spell": "2:8-2:15|11072669167287398027|2|1026", - "extent": "2:3-2:18|11072669167287398027|2|0", + "spell": "2:8-2:15|11072669167287398027|2|1026|-1", + "extent": "2:3-2:18|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -51,14 +51,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [4731849186641714451, 4731849186641714451], - "uses": ["6:22-6:29|12688716854043726585|2|4", "6:44-6:51|12688716854043726585|2|4", "10:18-10:25|11072669167287398027|2|4"] + "uses": ["6:22-6:29|12688716854043726585|2|4|-1", "6:44-6:51|12688716854043726585|2|4|-1", "10:18-10:25|11072669167287398027|2|4|-1"] }, { "usr": 11072669167287398027, "detailed_name": "namespace ns {}", "qual_name_offset": 10, "short_name": "ns", "kind": 3, - "declarations": ["1:11-1:13|0|1|1"], + "declarations": ["1:11-1:13|1:1-15:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -80,8 +80,8 @@ OUTPUT: "short_name": "Holder", "kind": 23, "declarations": [], - "spell": "5:10-5:16|11072669167287398027|2|1026", - "extent": "5:3-7:4|11072669167287398027|2|0", + "spell": "5:10-5:16|11072669167287398027|2|1026|-1", + "extent": "5:3-7:4|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -89,7 +89,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["10:26-10:32|11072669167287398027|2|4", "13:13-13:19|11072669167287398027|2|4", "14:14-14:20|11072669167287398027|2|4"] + "uses": ["10:26-10:32|11072669167287398027|2|4|-1", "13:13-13:19|11072669167287398027|2|4|-1", "14:14-14:20|11072669167287398027|2|4|-1"] }], "usr2var": [{ "usr": 4731849186641714451, @@ -97,11 +97,11 @@ 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|1025"], - "spell": "10:37-10:47|12688716854043726585|2|1026", - "extent": "9:3-10:47|12688716854043726585|2|0", + "declarations": ["6:30-6:40|6:5-6:55|12688716854043726585|2|1025|-1"], + "spell": "10:37-10:47|12688716854043726585|2|1026|-1", + "extent": "9:3-10:47|12688716854043726585|2|0|-1", "type": 1532099849728741556, - "uses": ["13:26-13:36|11072669167287398027|2|12", "14:27-14:37|11072669167287398027|2|12"], + "uses": ["13:26-13:36|11072669167287398027|2|12|-1", "14:27-14:37|11072669167287398027|2|12|-1"], "kind": 13, "storage": 2 }, { @@ -111,8 +111,8 @@ OUTPUT: "short_name": "Foo2", "hover": "int ns::Foo2 = Holder::static_var", "declarations": [], - "spell": "14:7-14:11|11072669167287398027|2|1026", - "extent": "14:3-14:37|11072669167287398027|2|0", + "spell": "14:7-14:11|11072669167287398027|2|1026|-1", + "extent": "14:3-14:37|11072669167287398027|2|0|-1", "type": 53, "uses": [], "kind": 13, @@ -124,8 +124,8 @@ OUTPUT: "short_name": "Foo", "hover": "int ns::Foo = Holder::static_var", "declarations": [], - "spell": "13:7-13:10|11072669167287398027|2|1026", - "extent": "13:3-13:36|11072669167287398027|2|0", + "spell": "13:7-13:10|11072669167287398027|2|1026|-1", + "extent": "13:3-13:36|11072669167287398027|2|0|-1", "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/templates/member_ref_in_template.cc b/index_tests/templates/member_ref_in_template.cc index e4b59391..312441e2 100644 --- a/index_tests/templates/member_ref_in_template.cc +++ b/index_tests/templates/member_ref_in_template.cc @@ -33,8 +33,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "8:6-8:9|0|1|2", - "extent": "8:1-8:11|0|1|0", + "spell": "8:6-8:9|0|1|2|-1", + "extent": "8:1-8:11|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -47,7 +47,7 @@ OUTPUT: "short_name": "bar", "kind": 6, "storage": 0, - "declarations": ["4:8-4:11|8402783583255987702|2|1025"], + "declarations": ["4:8-4:11|4:3-4:13|8402783583255987702|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -61,8 +61,8 @@ OUTPUT: "short_name": "C", "kind": 23, "declarations": [], - "spell": "2:8-2:9|0|1|2", - "extent": "2:1-5:2|0|1|0", + "spell": "2:8-2:9|0|1|2|-1", + "extent": "2:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -81,8 +81,8 @@ OUTPUT: "short_name": "T", "kind": 26, "declarations": [], - "spell": "1:17-1:18|8402783583255987702|2|2", - "extent": "1:11-1:18|8402783583255987702|2|0", + "spell": "1:17-1:18|8402783583255987702|2|2|-1", + "extent": "1:11-1:18|8402783583255987702|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -98,8 +98,8 @@ OUTPUT: "qual_name_offset": 2, "short_name": "x", "declarations": [], - "spell": "3:5-3:6|8402783583255987702|2|1026", - "extent": "3:3-3:6|8402783583255987702|2|0", + "spell": "3:5-3:6|8402783583255987702|2|1026|-1", + "extent": "3:3-3:6|8402783583255987702|2|0|-1", "type": 14750650276757822712, "uses": [], "kind": 8, 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 d0fb3cb4..a9005f18 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,12 +24,12 @@ OUTPUT: "kind": 254, "storage": 0, "declarations": [], - "spell": "5:16-5:19|14042997404480181958|2|1026", - "extent": "5:5-7:6|14042997404480181958|2|0", + "spell": "5:16-5:19|14042997404480181958|2|1026|-1", + "extent": "5:5-7:6|14042997404480181958|2|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["10:21-10:24|11072669167287398027|2|36", "11:22-11:25|11072669167287398027|2|36"], + "uses": ["10:21-10:24|11072669167287398027|2|36|-1", "11:22-11:25|11072669167287398027|2|36|-1"], "callees": [] }], "usr2type": [{ @@ -53,7 +53,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "ns", "kind": 3, - "declarations": ["1:11-1:13|0|1|1"], + "declarations": ["1:11-1:13|1:1-12:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -75,8 +75,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "3:10-3:13|11072669167287398027|2|1026", - "extent": "3:3-8:4|11072669167287398027|2|0", + "spell": "3:10-3:13|11072669167287398027|2|1026|-1", + "extent": "3:3-8:4|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -84,7 +84,7 @@ OUTPUT: "funcs": [8221803074608342407], "vars": [], "instances": [], - "uses": ["10:11-10:14|11072669167287398027|2|4", "11:11-11:14|11072669167287398027|2|4"] + "uses": ["10:11-10:14|11072669167287398027|2|4|-1", "11:11-11:14|11072669167287398027|2|4|-1"] }], "usr2var": [{ "usr": 3182917058194750998, @@ -93,8 +93,8 @@ OUTPUT: "short_name": "b", "hover": "int ns::b = Foo::foo()", "declarations": [], - "spell": "11:7-11:8|11072669167287398027|2|1026", - "extent": "11:3-11:35|11072669167287398027|2|0", + "spell": "11:7-11:8|11072669167287398027|2|1026|-1", + "extent": "11:3-11:35|11072669167287398027|2|0|-1", "type": 53, "uses": [], "kind": 13, @@ -106,8 +106,8 @@ OUTPUT: "short_name": "a", "hover": "int ns::a = Foo::foo()", "declarations": [], - "spell": "10:7-10:8|11072669167287398027|2|1026", - "extent": "10:3-10:33|11072669167287398027|2|0", + "spell": "10:7-10:8|11072669167287398027|2|1026|-1", + "extent": "10:3-10:33|11072669167287398027|2|0|-1", "type": 53, "uses": [], "kind": 13, 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 0476c03a..c7ce4fae 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,8 +19,8 @@ OUTPUT: "short_name": "Foo", "kind": 26, "declarations": [], - "spell": "3:9-3:12|11072669167287398027|2|2", - "extent": "2:3-3:15|11072669167287398027|2|0", + "spell": "3:9-3:12|11072669167287398027|2|2|-1", + "extent": "2:3-3:15|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -36,8 +36,8 @@ OUTPUT: "short_name": "Foo", "kind": 26, "declarations": [], - "spell": "3:9-3:12|11072669167287398027|2|2", - "extent": "2:3-3:15|11072669167287398027|2|0", + "spell": "3:9-3:12|11072669167287398027|2|2|-1", + "extent": "2:3-3:15|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -52,7 +52,7 @@ OUTPUT: "qual_name_offset": 10, "short_name": "ns", "kind": 3, - "declarations": ["1:11-1:13|0|1|1"], + "declarations": ["1:11-1:13|1:1-7:2|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -74,8 +74,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "3:9-3:12|11072669167287398027|2|1026", - "extent": "3:3-3:15|11072669167287398027|2|0", + "spell": "3:9-3:12|11072669167287398027|2|1026|-1", + "extent": "3:3-3:15|11072669167287398027|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -83,7 +83,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["5:3-5:6|11072669167287398027|2|4", "6:3-6:6|11072669167287398027|2|4"] + "uses": ["5:3-5:6|11072669167287398027|2|4|-1", "6:3-6:6|11072669167287398027|2|4|-1"] }], "usr2var": [{ "usr": 3182917058194750998, @@ -91,8 +91,8 @@ OUTPUT: "qual_name_offset": 10, "short_name": "b", "declarations": [], - "spell": "6:13-6:14|11072669167287398027|2|1026", - "extent": "6:3-6:14|11072669167287398027|2|0", + "spell": "6:13-6:14|11072669167287398027|2|1026|-1", + "extent": "6:3-6:14|11072669167287398027|2|0|-1", "type": 3948666349864691553, "uses": [], "kind": 13, @@ -103,8 +103,8 @@ OUTPUT: "qual_name_offset": 9, "short_name": "a", "declarations": [], - "spell": "5:12-5:13|11072669167287398027|2|1026", - "extent": "5:3-5:13|11072669167287398027|2|0", + "spell": "5:12-5:13|11072669167287398027|2|1026|-1", + "extent": "5:3-5:13|11072669167287398027|2|0|-1", "type": 8224244241460152567, "uses": [], "kind": 13, diff --git a/index_tests/templates/specialization.cc b/index_tests/templates/specialization.cc index 7b8960c1..d597a78c 100644 --- a/index_tests/templates/specialization.cc +++ b/index_tests/templates/specialization.cc @@ -54,7 +54,7 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["43:6-43:9|0|1|1"], + "declarations": ["43:6-43:9|42:1-43:50|0|1|1|-1"], "bases": [], "derived": [], "vars": [], @@ -67,7 +67,7 @@ OUTPUT: "short_name": "clear", "kind": 6, "storage": 0, - "declarations": ["27:8-27:13|1663022413889915338|2|1025"], + "declarations": ["27:8-27:13|27:3-27:15|1663022413889915338|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -81,8 +81,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "39:6-39:9|0|1|2", - "extent": "39:1-39:21|0|1|0", + "spell": "39:6-39:9|0|1|2|-1", + "extent": "39:1-39:21|0|1|0|-1", "bases": [], "derived": [], "vars": [17826688417349629938], @@ -95,7 +95,7 @@ OUTPUT: "short_name": "clear", "kind": 6, "storage": 0, - "declarations": ["13:8-13:13|7440942986741176606|2|1025"], + "declarations": ["13:8-13:13|13:3-13:15|7440942986741176606|2|1025|-1"], "bases": [], "derived": [], "vars": [], @@ -124,8 +124,8 @@ OUTPUT: "short_name": "function", "kind": 5, "declarations": [], - "spell": "5:7-5:15|0|1|2", - "extent": "4:1-5:30|0|1|0", + "spell": "5:7-5:15|0|1|2|-1", + "extent": "4:1-5:30|0|1|0|-1", "alias_of": 0, "bases": [15019211479263750068], "derived": [], @@ -133,7 +133,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["7:1-7:9|0|1|4"] + "uses": ["7:1-7:9|0|1|4|-1"] }, { "usr": 1663022413889915338, "detailed_name": "template<> class vector> {}", @@ -141,8 +141,8 @@ OUTPUT: "short_name": "vector", "kind": 5, "declarations": [], - "spell": "26:7-26:13|0|1|2", - "extent": "25:1-28:2|0|1|0", + "spell": "26:7-26:13|0|1|2|-1", + "extent": "25:1-28:2|0|1|0|-1", "alias_of": 0, "bases": [7440942986741176606], "derived": [], @@ -150,7 +150,7 @@ OUTPUT: "funcs": [6113470698424012876], "vars": [], "instances": [15931696253641284761], - "uses": ["26:7-26:13|0|1|4", "33:1-33:7|0|1|4"] + "uses": ["26:7-26:13|0|1|4|-1", "33:1-33:7|0|1|4|-1"] }, { "usr": 3231449734830406187, "detailed_name": "function", @@ -158,8 +158,8 @@ OUTPUT: "short_name": "function", "kind": 26, "declarations": [], - "spell": "5:7-5:15|0|1|2", - "extent": "4:1-5:30|0|1|0", + "spell": "5:7-5:15|0|1|2|-1", + "extent": "4:1-5:30|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -175,8 +175,8 @@ OUTPUT: "short_name": "Z1", "kind": 23, "declarations": [], - "spell": "19:8-19:10|0|1|2", - "extent": "19:1-19:13|0|1|0", + "spell": "19:8-19:10|0|1|2|-1", + "extent": "19:1-19:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -184,7 +184,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["21:23-21:25|0|1|4", "32:8-32:10|0|1|4"] + "uses": ["21:23-21:25|0|1|4|-1", "32:8-32:10|0|1|4|-1"] }, { "usr": 7440942986741176606, "detailed_name": "class vector {}", @@ -192,8 +192,8 @@ OUTPUT: "short_name": "vector", "kind": 5, "declarations": [], - "spell": "12:7-12:13|0|1|2", - "extent": "12:1-14:2|0|1|0", + "spell": "12:7-12:13|0|1|2|-1", + "extent": "12:1-14:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [16155717907537731864, 1663022413889915338], @@ -201,7 +201,7 @@ OUTPUT: "funcs": [18107614608385228556], "vars": [], "instances": [], - "uses": ["21:16-21:22|0|1|4", "30:1-30:7|0|1|4", "32:1-32:7|0|1|4"] + "uses": ["21:16-21:22|0|1|4|-1", "30:1-30:7|0|1|4|-1", "32:1-32:7|0|1|4|-1"] }, { "usr": 9201299975592934124, "detailed_name": "enum Enum {}", @@ -209,8 +209,8 @@ OUTPUT: "short_name": "Enum", "kind": 10, "declarations": [], - "spell": "35:6-35:10|0|1|2", - "extent": "35:1-37:2|0|1|0", + "spell": "35:6-35:10|0|1|2|-1", + "extent": "35:1-37:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -226,8 +226,8 @@ OUTPUT: "short_name": "Z2", "kind": 23, "declarations": [], - "spell": "23:8-23:10|0|1|2", - "extent": "23:1-23:13|0|1|0", + "spell": "23:8-23:10|0|1|2|-1", + "extent": "23:1-23:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -235,7 +235,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["26:14-26:16|0|1|4", "33:8-33:10|0|1|4"] + "uses": ["26:14-26:16|0|1|4|-1", "33:8-33:10|0|1|4|-1"] }, { "usr": 11153492883079050853, "detailed_name": "vector", @@ -243,8 +243,8 @@ OUTPUT: "short_name": "vector", "kind": 26, "declarations": [], - "spell": "17:7-17:13|0|1|2", - "extent": "16:1-17:20|0|1|0", + "spell": "17:7-17:13|0|1|2|-1", + "extent": "16:1-17:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -260,8 +260,8 @@ OUTPUT: "short_name": "vector", "kind": 26, "declarations": [], - "spell": "12:7-12:13|0|1|2", - "extent": "11:1-14:2|0|1|0", + "spell": "12:7-12:13|0|1|2|-1", + "extent": "11:1-14:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -277,8 +277,8 @@ OUTPUT: "short_name": "T", "kind": 26, "declarations": [], - "spell": "38:20-38:21|17498190318698490707|3|2", - "extent": "38:11-38:21|17498190318698490707|3|0", + "spell": "38:20-38:21|17498190318698490707|3|2|-1", + "extent": "38:11-38:21|17498190318698490707|3|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -293,7 +293,7 @@ OUTPUT: "qual_name_offset": 6, "short_name": "function", "kind": 5, - "declarations": ["2:7-2:15|0|1|1"], + "declarations": ["2:7-2:15|2:1-2:15|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [218068462278884837], @@ -309,8 +309,8 @@ OUTPUT: "short_name": "vector", "kind": 26, "declarations": [], - "spell": "21:16-21:22|0|1|2", - "extent": "21:1-21:26|0|1|0", + "spell": "21:16-21:22|0|1|2|-1", + "extent": "21:1-21:26|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -325,7 +325,7 @@ OUTPUT: "qual_name_offset": 6, "short_name": "allocator", "kind": 5, - "declarations": ["9:28-9:37|0|1|1"], + "declarations": ["9:28-9:37|9:22-9:37|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -341,8 +341,8 @@ OUTPUT: "short_name": "vector", "kind": 5, "declarations": [], - "spell": "17:7-17:13|0|1|2", - "extent": "16:1-17:20|0|1|0", + "spell": "17:7-17:13|0|1|2|-1", + "extent": "16:1-17:20|0|1|0|-1", "alias_of": 0, "bases": [7440942986741176606], "derived": [], @@ -350,7 +350,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["31:1-31:7|0|1|4"] + "uses": ["31:1-31:7|0|1|4|-1"] }], "usr2var": [{ "usr": 86949563628772958, @@ -358,8 +358,8 @@ OUTPUT: "qual_name_offset": 14, "short_name": "vip", "declarations": [], - "spell": "31:14-31:17|0|1|2", - "extent": "31:1-31:17|0|1|0", + "spell": "31:14-31:17|0|1|2|-1", + "extent": "31:1-31:17|0|1|0|-1", "type": 11153492883079050853, "uses": [], "kind": 13, @@ -370,8 +370,8 @@ OUTPUT: "qual_name_offset": 21, "short_name": "f", "declarations": [], - "spell": "7:21-7:22|0|1|2", - "extent": "7:1-7:22|0|1|0", + "spell": "7:21-7:22|0|1|2|-1", + "extent": "7:1-7:22|0|1|0|-1", "type": 3231449734830406187, "uses": [], "kind": 13, @@ -382,8 +382,8 @@ OUTPUT: "qual_name_offset": 11, "short_name": "vz1", "declarations": [], - "spell": "32:12-32:15|0|1|2", - "extent": "32:1-32:15|0|1|0", + "spell": "32:12-32:15|0|1|2|-1", + "extent": "32:1-32:15|0|1|0|-1", "type": 15440970074034693939, "uses": [], "kind": 13, @@ -395,8 +395,8 @@ OUTPUT: "short_name": "Enum1", "hover": "Enum1 = 1", "declarations": [], - "spell": "36:10-36:15|9201299975592934124|2|1026", - "extent": "36:10-36:15|9201299975592934124|2|0", + "spell": "36:10-36:15|9201299975592934124|2|1026|-1", + "extent": "36:10-36:15|9201299975592934124|2|0|-1", "type": 0, "uses": [], "kind": 22, @@ -407,8 +407,8 @@ OUTPUT: "qual_name_offset": 13, "short_name": "vc", "declarations": [], - "spell": "30:14-30:16|0|1|2", - "extent": "30:1-30:16|0|1|0", + "spell": "30:14-30:16|0|1|2|-1", + "extent": "30:1-30:16|0|1|0|-1", "type": 13322943937025195708, "uses": [], "kind": 13, @@ -420,10 +420,10 @@ OUTPUT: "short_name": "kOnst", "hover": "static const int kOnst = 7", "declarations": [], - "spell": "41:18-41:23|0|1|2", - "extent": "41:1-41:27|0|1|0", + "spell": "41:18-41:23|0|1|2|-1", + "extent": "41:1-41:27|0|1|0|-1", "type": 53, - "uses": ["43:27-43:32|0|1|12"], + "uses": ["43:27-43:32|0|1|12|-1"], "kind": 13, "storage": 2 }, { @@ -433,10 +433,10 @@ OUTPUT: "short_name": "Enum0", "hover": "Enum0 = 0", "declarations": [], - "spell": "36:3-36:8|9201299975592934124|2|1026", - "extent": "36:3-36:8|9201299975592934124|2|0", + "spell": "36:3-36:8|9201299975592934124|2|1026|-1", + "extent": "36:3-36:8|9201299975592934124|2|0|-1", "type": 0, - "uses": ["43:20-43:25|0|1|4"], + "uses": ["43:20-43:25|0|1|4|-1"], "kind": 22, "storage": 0 }, { @@ -445,8 +445,8 @@ OUTPUT: "qual_name_offset": 11, "short_name": "vz2", "declarations": [], - "spell": "33:12-33:15|0|1|2", - "extent": "33:1-33:15|0|1|0", + "spell": "33:12-33:15|0|1|2|-1", + "extent": "33:1-33:15|0|1|0|-1", "type": 1663022413889915338, "uses": [], "kind": 13, @@ -457,8 +457,8 @@ OUTPUT: "qual_name_offset": 2, "short_name": "Value", "declarations": [], - "spell": "39:12-39:17|17498190318698490707|3|1026", - "extent": "39:10-39:17|17498190318698490707|3|0", + "spell": "39:12-39:17|17498190318698490707|3|1026|-1", + "extent": "39:10-39:17|17498190318698490707|3|0|-1", "type": 14111105212951082474, "uses": [], "kind": 253, diff --git a/index_tests/templates/specialized_func_definition.cc b/index_tests/templates/specialized_func_definition.cc index 07c0d475..17dfb783 100644 --- a/index_tests/templates/specialized_func_definition.cc +++ b/index_tests/templates/specialized_func_definition.cc @@ -30,8 +30,8 @@ OUTPUT: "kind": 6, "storage": 0, "declarations": [], - "spell": "10:22-10:25|17649312483543982122|2|1026", - "extent": "9:1-10:30|17649312483543982122|2|0", + "spell": "10:22-10:25|17649312483543982122|2|1026|-1", + "extent": "9:1-10:30|17649312483543982122|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -44,9 +44,9 @@ OUTPUT: "short_name": "Foo", "kind": 6, "storage": 0, - "declarations": ["3:8-3:11|17107291254533526269|2|1025"], - "spell": "7:19-7:22|17107291254533526269|2|1026", - "extent": "6:1-7:24|17107291254533526269|2|0", + "declarations": ["3:8-3:11|3:3-3:13|17107291254533526269|2|1025|-1"], + "spell": "7:19-7:22|17107291254533526269|2|1026|-1", + "extent": "6:1-7:24|17107291254533526269|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -60,8 +60,8 @@ OUTPUT: "short_name": "Template", "kind": 5, "declarations": [], - "spell": "2:7-2:15|0|1|2", - "extent": "2:1-4:2|0|1|0", + "spell": "2:7-2:15|0|1|2|-1", + "extent": "2:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -69,7 +69,7 @@ OUTPUT: "funcs": [11994188353303124840], "vars": [], "instances": [], - "uses": ["7:6-7:14|0|1|4", "10:6-10:14|0|1|4"] + "uses": ["7:6-7:14|0|1|4|-1", "10:6-10:14|0|1|4|-1"] }, { "usr": 17649312483543982122, "detailed_name": "", 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 93d12998..2297d996 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,12 +21,12 @@ OUTPUT: "kind": 254, "storage": 0, "declarations": [], - "spell": "3:14-3:17|10528472276654770367|2|1026", - "extent": "3:3-5:4|10528472276654770367|2|0", + "spell": "3:14-3:17|10528472276654770367|2|1026|-1", + "extent": "3:3-5:4|10528472276654770367|2|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["8:19-8:22|0|1|36", "9:20-9:23|0|1|36"], + "uses": ["8:19-8:22|0|1|36|-1", "9:20-9:23|0|1|36|-1"], "callees": [] }], "usr2type": [{ @@ -51,8 +51,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "2:8-2:11|0|1|2", - "extent": "2:1-6:2|0|1|0", + "spell": "2:8-2:11|0|1|2|-1", + "extent": "2:1-6:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -60,7 +60,7 @@ OUTPUT: "funcs": [8340731781048851399], "vars": [], "instances": [], - "uses": ["8:9-8:12|0|1|4", "9:9-9:12|0|1|4"] + "uses": ["8:9-8:12|0|1|4|-1", "9:9-9:12|0|1|4|-1"] }], "usr2var": [{ "usr": 12028309045033782423, @@ -69,8 +69,8 @@ OUTPUT: "short_name": "b", "hover": "int b = Foo::foo()", "declarations": [], - "spell": "9:5-9:6|0|1|2", - "extent": "9:1-9:25|0|1|0", + "spell": "9:5-9:6|0|1|2|-1", + "extent": "9:1-9:25|0|1|0|-1", "type": 53, "uses": [], "kind": 13, @@ -82,8 +82,8 @@ OUTPUT: "short_name": "a", "hover": "int a = Foo::foo()", "declarations": [], - "spell": "8:5-8:6|0|1|2", - "extent": "8:1-8:24|0|1|0", + "spell": "8:5-8:6|0|1|2|-1", + "extent": "8:1-8:24|0|1|0|-1", "type": 53, "uses": [], "kind": 13, 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 a38322c3..3fcb3672 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,12 +22,12 @@ OUTPUT: "kind": 254, "storage": 0, "declarations": [], - "spell": "4:14-4:17|10528472276654770367|2|1026", - "extent": "4:3-6:4|10528472276654770367|2|0", + "spell": "4:14-4:17|10528472276654770367|2|1026|-1", + "extent": "4:3-6:4|10528472276654770367|2|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["9:19-9:22|0|1|36", "10:20-10:23|0|1|36"], + "uses": ["9:19-9:22|0|1|36|-1", "10:20-10:23|0|1|36|-1"], "callees": [] }], "usr2type": [{ @@ -52,8 +52,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "2:8-2:11|0|1|2", - "extent": "2:1-7:2|0|1|0", + "spell": "2:8-2:11|0|1|2|-1", + "extent": "2:1-7:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -61,7 +61,7 @@ OUTPUT: "funcs": [9034026360701857235], "vars": [], "instances": [], - "uses": ["9:9-9:12|0|1|4", "10:9-10:12|0|1|4"] + "uses": ["9:9-9:12|0|1|4|-1", "10:9-10:12|0|1|4|-1"] }], "usr2var": [{ "usr": 12028309045033782423, @@ -70,8 +70,8 @@ OUTPUT: "short_name": "b", "hover": "int b = Foo::foo()", "declarations": [], - "spell": "10:5-10:6|0|1|2", - "extent": "10:1-10:33|0|1|0", + "spell": "10:5-10:6|0|1|2|-1", + "extent": "10:1-10:33|0|1|0|-1", "type": 53, "uses": [], "kind": 13, @@ -83,8 +83,8 @@ OUTPUT: "short_name": "a", "hover": "int a = Foo::foo()", "declarations": [], - "spell": "9:5-9:6|0|1|2", - "extent": "9:1-9:31|0|1|0", + "spell": "9:5-9:6|0|1|2|-1", + "extent": "9:1-9:31|0|1|0|-1", "type": 53, "uses": [], "kind": 13, 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 7115ebc9..e1b1b829 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 @@ -40,8 +40,8 @@ OUTPUT: "short_name": "A", "kind": 10, "declarations": [], - "spell": "1:6-1:7|0|1|2", - "extent": "1:1-1:10|0|1|0", + "spell": "1:6-1:7|0|1|2|-1", + "extent": "1:1-1:10|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -49,7 +49,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:5-9:6|0|1|4"] + "uses": ["9:5-9:6|0|1|4|-1"] }, { "usr": 7074603899792463171, "detailed_name": "Inner", @@ -57,8 +57,8 @@ OUTPUT: "short_name": "Inner", "kind": 26, "declarations": [], - "spell": "6:10-6:15|0|1|2", - "extent": "6:3-6:18|0|1|0", + "spell": "6:10-6:15|0|1|2|-1", + "extent": "6:3-6:18|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -74,8 +74,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "5:8-5:11|0|1|2", - "extent": "5:1-7:2|0|1|0", + "spell": "5:8-5:11|0|1|2|-1", + "extent": "5:1-7:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -83,7 +83,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:1-9:4|0|1|4", "10:1-10:4|0|1|4"] + "uses": ["9:1-9:4|0|1|4|-1", "10:1-10:4|0|1|4|-1"] }, { "usr": 13892793056005362145, "detailed_name": "enum B {}", @@ -91,8 +91,8 @@ OUTPUT: "short_name": "B", "kind": 10, "declarations": [], - "spell": "2:6-2:7|0|1|2", - "extent": "2:1-2:10|0|1|0", + "spell": "2:6-2:7|0|1|2|-1", + "extent": "2:1-2:10|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -100,7 +100,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["10:5-10:6|0|1|4"] + "uses": ["10:5-10:6|0|1|4|-1"] }, { "usr": 13938528237873543349, "detailed_name": "struct Foo::Inner {}", @@ -108,8 +108,8 @@ OUTPUT: "short_name": "Inner", "kind": 23, "declarations": [], - "spell": "6:10-6:15|10528472276654770367|2|1026", - "extent": "6:3-6:18|10528472276654770367|2|0", + "spell": "6:10-6:15|10528472276654770367|2|1026|-1", + "extent": "6:3-6:18|10528472276654770367|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -117,7 +117,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:9-9:14|0|1|4", "10:9-10:14|0|1|4"] + "uses": ["9:9-9:14|0|1|4|-1", "10:9-10:14|0|1|4|-1"] }, { "usr": 15961308565836244174, "detailed_name": "Inner", @@ -125,8 +125,8 @@ OUTPUT: "short_name": "Inner", "kind": 26, "declarations": [], - "spell": "6:10-6:15|0|1|2", - "extent": "6:3-6:18|0|1|0", + "spell": "6:10-6:15|0|1|2|-1", + "extent": "6:3-6:18|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -142,8 +142,8 @@ OUTPUT: "qual_name_offset": 14, "short_name": "b", "declarations": [], - "spell": "10:15-10:16|0|1|2", - "extent": "10:1-10:16|0|1|0", + "spell": "10:15-10:16|0|1|2|-1", + "extent": "10:1-10:16|0|1|0|-1", "type": 15961308565836244174, "uses": [], "kind": 13, @@ -154,8 +154,8 @@ OUTPUT: "qual_name_offset": 14, "short_name": "a", "declarations": [], - "spell": "9:15-9:16|0|1|2", - "extent": "9:1-9:16|0|1|0", + "spell": "9:15-9:16|0|1|2|-1", + "extent": "9:1-9:16|0|1|0|-1", "type": 7074603899792463171, "uses": [], "kind": 13, 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 fd172671..23d2ed6a 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 @@ -34,8 +34,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "2:8-2:11|0|1|2", - "extent": "2:1-4:2|0|1|0", + "spell": "2:8-2:11|0|1|2|-1", + "extent": "2:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -43,7 +43,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["6:9-6:12|0|1|4", "7:9-7:12|0|1|4"] + "uses": ["6:9-6:12|0|1|4|-1", "7:9-7:12|0|1|4|-1"] }], "usr2var": [{ "usr": 12028309045033782423, @@ -52,8 +52,8 @@ OUTPUT: "short_name": "b", "hover": "int b = Foo::var", "declarations": [], - "spell": "7:5-7:6|0|1|2", - "extent": "7:1-7:23|0|1|0", + "spell": "7:5-7:6|0|1|2|-1", + "extent": "7:1-7:23|0|1|0|-1", "type": 53, "uses": [], "kind": 13, @@ -64,9 +64,9 @@ OUTPUT: "qual_name_offset": 21, "short_name": "var", "hover": "static constexpr int Foo::var = 3", - "declarations": ["3:24-3:27|10528472276654770367|2|1025"], + "declarations": ["3:24-3:27|3:3-3:31|10528472276654770367|2|1025|-1"], "type": 53, - "uses": ["6:19-6:22|0|1|12", "7:20-7:23|0|1|12"], + "uses": ["6:19-6:22|0|1|12|-1", "7:20-7:23|0|1|12|-1"], "kind": 13, "storage": 2 }, { @@ -76,8 +76,8 @@ OUTPUT: "short_name": "a", "hover": "int a = Foo::var", "declarations": [], - "spell": "6:5-6:6|0|1|2", - "extent": "6:1-6:22|0|1|0", + "spell": "6:5-6:6|0|1|2|-1", + "extent": "6:1-6:22|0|1|0|-1", "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/templates/template_func_usage_folded_into_one.cc b/index_tests/templates/template_func_usage_folded_into_one.cc index 8fccd50a..c9329711 100644 --- a/index_tests/templates/template_func_usage_folded_into_one.cc +++ b/index_tests/templates/template_func_usage_folded_into_one.cc @@ -22,12 +22,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "2:12-2:15|0|1|2", - "extent": "2:1-4:2|0|1|0", + "spell": "2:12-2:15|0|1|2|-1", + "extent": "2:1-4:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["6:9-6:12|0|1|36", "7:9-7:12|0|1|36"], + "uses": ["6:9-6:12|0|1|36|-1", "7:9-7:12|0|1|36|-1"], "callees": [] }], "usr2type": [{ @@ -53,8 +53,8 @@ OUTPUT: "short_name": "b", "hover": "int b = foo()", "declarations": [], - "spell": "7:5-7:6|0|1|2", - "extent": "7:1-7:20|0|1|0", + "spell": "7:5-7:6|0|1|2|-1", + "extent": "7:1-7:20|0|1|0|-1", "type": 53, "uses": [], "kind": 13, @@ -66,8 +66,8 @@ OUTPUT: "short_name": "a", "hover": "int a = foo()", "declarations": [], - "spell": "6:5-6:6|0|1|2", - "extent": "6:1-6:19|0|1|0", + "spell": "6:5-6:6|0|1|2|-1", + "extent": "6:1-6:19|0|1|0|-1", "type": 53, "uses": [], "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 0c83f7d8..bb9745e8 100644 --- a/index_tests/templates/template_type_usage_folded_into_one.cc +++ b/index_tests/templates/template_type_usage_folded_into_one.cc @@ -17,8 +17,8 @@ OUTPUT: "short_name": "Foo", "kind": 26, "declarations": [], - "spell": "2:7-2:10|0|1|2", - "extent": "1:1-2:13|0|1|0", + "spell": "2:7-2:10|0|1|2|-1", + "extent": "1:1-2:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -34,8 +34,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "2:7-2:10|0|1|2", - "extent": "2:1-2:13|0|1|0", + "spell": "2:7-2:10|0|1|2|-1", + "extent": "2:1-2:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -43,7 +43,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["4:1-4:4|0|1|4", "5:1-5:4|0|1|4"] + "uses": ["4:1-4:4|0|1|4|-1", "5:1-5:4|0|1|4|-1"] }, { "usr": 14134940367505932005, "detailed_name": "Foo", @@ -51,8 +51,8 @@ OUTPUT: "short_name": "Foo", "kind": 26, "declarations": [], - "spell": "2:7-2:10|0|1|2", - "extent": "1:1-2:13|0|1|0", + "spell": "2:7-2:10|0|1|2|-1", + "extent": "1:1-2:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -68,8 +68,8 @@ OUTPUT: "qual_name_offset": 10, "short_name": "b", "declarations": [], - "spell": "5:11-5:12|0|1|2", - "extent": "5:1-5:12|0|1|0", + "spell": "5:11-5:12|0|1|2|-1", + "extent": "5:1-5:12|0|1|0|-1", "type": 14134940367505932005, "uses": [], "kind": 13, @@ -80,8 +80,8 @@ OUTPUT: "qual_name_offset": 9, "short_name": "a", "declarations": [], - "spell": "4:10-4:11|0|1|2", - "extent": "4:1-4:11|0|1|0", + "spell": "4:10-4:11|0|1|2|-1", + "extent": "4:1-4:11|0|1|0|-1", "type": 5123806965838456033, "uses": [], "kind": 13, 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 844baece..44489203 100644 --- a/index_tests/templates/template_var_usage_folded_into_one.cc +++ b/index_tests/templates/template_var_usage_folded_into_one.cc @@ -43,8 +43,8 @@ OUTPUT: "short_name": "A", "kind": 10, "declarations": [], - "spell": "1:6-1:7|0|1|2", - "extent": "1:1-1:10|0|1|0", + "spell": "1:6-1:7|0|1|2|-1", + "extent": "1:1-1:10|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -52,7 +52,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [16721564935990383768], - "uses": ["7:1-7:2|0|1|4", "7:11-7:12|0|1|4"] + "uses": ["7:1-7:2|0|1|4|-1", "7:11-7:12|0|1|4|-1"] }, { "usr": 11919899838872947844, "detailed_name": "T", @@ -60,8 +60,8 @@ OUTPUT: "short_name": "T", "kind": 26, "declarations": [], - "spell": "4:19-4:20|0|1|2", - "extent": "4:10-4:20|0|1|0", + "spell": "4:19-4:20|0|1|2|-1", + "extent": "4:10-4:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -77,8 +77,8 @@ OUTPUT: "short_name": "B", "kind": 10, "declarations": [], - "spell": "2:6-2:7|0|1|2", - "extent": "2:1-2:10|0|1|0", + "spell": "2:6-2:7|0|1|2|-1", + "extent": "2:1-2:10|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -86,7 +86,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [12028309045033782423], - "uses": ["8:1-8:2|0|1|4", "8:11-8:12|0|1|4"] + "uses": ["8:1-8:2|0|1|4|-1", "8:11-8:12|0|1|4|-1"] }], "usr2var": [{ "usr": 8096973118640070624, @@ -95,10 +95,10 @@ OUTPUT: "short_name": "var", "hover": "T var = T()", "declarations": [], - "spell": "5:3-5:6|0|1|2", - "extent": "5:1-5:12|0|1|0", + "spell": "5:3-5:6|0|1|2|-1", + "extent": "5:1-5:12|0|1|0|-1", "type": 11919899838872947844, - "uses": ["7:7-7:10|0|1|12", "8:7-8:10|0|1|12"], + "uses": ["7:7-7:10|0|1|12|-1", "8:7-8:10|0|1|12|-1"], "kind": 13, "storage": 0 }, { @@ -108,8 +108,8 @@ OUTPUT: "short_name": "b", "hover": "B b = var", "declarations": [], - "spell": "8:3-8:4|0|1|2", - "extent": "8:1-8:13|0|1|0", + "spell": "8:3-8:4|0|1|2|-1", + "extent": "8:1-8:13|0|1|0|-1", "type": 13892793056005362145, "uses": [], "kind": 13, @@ -121,8 +121,8 @@ OUTPUT: "short_name": "a", "hover": "A a = var", "declarations": [], - "spell": "7:3-7:4|0|1|2", - "extent": "7:1-7:13|0|1|0", + "spell": "7:3-7:4|0|1|2|-1", + "extent": "7:1-7:13|0|1|0|-1", "type": 6697181287623958829, "uses": [], "kind": 13, diff --git a/index_tests/types/anonymous_struct.cc b/index_tests/types/anonymous_struct.cc index 8a75ecf9..b3dbecc3 100644 --- a/index_tests/types/anonymous_struct.cc +++ b/index_tests/types/anonymous_struct.cc @@ -31,8 +31,8 @@ OUTPUT: "short_name": "", "kind": 23, "declarations": [], - "spell": "2:3-2:9|17937907487590875128|2|1026", - "extent": "2:3-2:28|17937907487590875128|2|0", + "spell": "2:3-2:9|17937907487590875128|2|1026|-1", + "extent": "2:3-2:28|17937907487590875128|2|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -57,8 +57,8 @@ OUTPUT: "short_name": "vector3", "kind": 5, "declarations": [], - "spell": "1:7-1:14|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:7-1:14|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -86,8 +86,8 @@ OUTPUT: "qual_name_offset": 6, "short_name": "v", "declarations": [], - "spell": "3:9-3:10|17937907487590875128|2|1026", - "extent": "3:3-3:13|17937907487590875128|2|0", + "spell": "3:9-3:10|17937907487590875128|2|1026|-1", + "extent": "3:3-3:13|17937907487590875128|2|0|-1", "type": 0, "uses": [], "kind": 8, @@ -98,8 +98,8 @@ OUTPUT: "qual_name_offset": 6, "short_name": "x", "declarations": [], - "spell": "2:18-2:19|1428566502523368801|2|1026", - "extent": "2:12-2:19|1428566502523368801|2|0", + "spell": "2:18-2:19|1428566502523368801|2|1026|-1", + "extent": "2:12-2:19|1428566502523368801|2|0|-1", "type": 82, "uses": [], "kind": 8, @@ -110,8 +110,8 @@ OUTPUT: "qual_name_offset": 6, "short_name": "y", "declarations": [], - "spell": "2:21-2:22|1428566502523368801|2|1026", - "extent": "2:12-2:22|1428566502523368801|2|0", + "spell": "2:21-2:22|1428566502523368801|2|1026|-1", + "extent": "2:12-2:22|1428566502523368801|2|0|-1", "type": 82, "uses": [], "kind": 8, @@ -122,8 +122,8 @@ OUTPUT: "qual_name_offset": 6, "short_name": "z", "declarations": [], - "spell": "2:24-2:25|1428566502523368801|2|1026", - "extent": "2:12-2:25|1428566502523368801|2|0", + "spell": "2:24-2:25|1428566502523368801|2|1026|-1", + "extent": "2:12-2:25|1428566502523368801|2|0|-1", "type": 82, "uses": [], "kind": 8, diff --git a/index_tests/types/typedefs.cc b/index_tests/types/typedefs.cc index 38505c29..17d3fcbd 100644 --- a/index_tests/types/typedefs.cc +++ b/index_tests/types/typedefs.cc @@ -13,7 +13,7 @@ OUTPUT: "short_name": "g", "kind": 12, "storage": 0, - "declarations": ["2:13-2:14|0|1|1"], + "declarations": ["2:13-2:14|2:1-2:14|0|1|1|-1"], "bases": [], "derived": [], "vars": [], @@ -27,8 +27,8 @@ OUTPUT: "short_name": "func", "kind": 252, "declarations": [], - "spell": "1:14-1:18|0|1|2", - "extent": "1:1-1:47|0|1|0", + "spell": "1:14-1:18|0|1|2|-1", + "extent": "1:1-1:47|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -36,7 +36,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["2:8-2:12|0|1|4"] + "uses": ["2:8-2:12|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/unions/union_decl.cc b/index_tests/unions/union_decl.cc index 83b94e90..7861f8ff 100644 --- a/index_tests/unions/union_decl.cc +++ b/index_tests/unions/union_decl.cc @@ -46,8 +46,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -69,8 +69,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "b", "declarations": [], - "spell": "3:8-3:9|8501689086387244262|2|1026", - "extent": "3:3-3:9|8501689086387244262|2|0", + "spell": "3:8-3:9|8501689086387244262|2|1026|-1", + "extent": "3:3-3:9|8501689086387244262|2|0|-1", "type": 37, "uses": [], "kind": 8, @@ -81,8 +81,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "2:7-2:8|8501689086387244262|2|1026", - "extent": "2:3-2:8|8501689086387244262|2|0", + "spell": "2:7-2:8|8501689086387244262|2|1026|-1", + "extent": "2:3-2:8|8501689086387244262|2|0|-1", "type": 53, "uses": [], "kind": 8, diff --git a/index_tests/unions/union_usage.cc b/index_tests/unions/union_usage.cc index 253c4a34..248f5975 100644 --- a/index_tests/unions/union_usage.cc +++ b/index_tests/unions/union_usage.cc @@ -24,8 +24,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "8:6-8:9|0|1|2", - "extent": "8:1-10:2|0|1|0", + "spell": "8:6-8:9|0|1|2|-1", + "extent": "8:1-10:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -69,8 +69,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -84,7 +84,7 @@ OUTPUT: "R": 0 }], "instances": [2933643612409209903], - "uses": ["6:1-6:4|0|1|4", "8:10-8:13|0|1|4"] + "uses": ["6:1-6:4|0|1|4|-1", "8:10-8:13|0|1|4|-1"] }], "usr2var": [{ "usr": 2933643612409209903, @@ -92,10 +92,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "f", "declarations": [], - "spell": "6:5-6:6|0|1|2", - "extent": "6:1-6:6|0|1|0", + "spell": "6:5-6:6|0|1|2|-1", + "extent": "6:1-6:6|0|1|0|-1", "type": 8501689086387244262, - "uses": ["9:3-9:4|13982179977217945200|3|4"], + "uses": ["9:3-9:4|13982179977217945200|3|4|-1"], "kind": 13, "storage": 0 }, { @@ -104,8 +104,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "b", "declarations": [], - "spell": "3:8-3:9|8501689086387244262|2|1026", - "extent": "3:3-3:13|8501689086387244262|2|0", + "spell": "3:8-3:9|8501689086387244262|2|1026|-1", + "extent": "3:3-3:13|8501689086387244262|2|0|-1", "type": 37, "uses": [], "kind": 8, @@ -116,10 +116,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "2:7-2:8|8501689086387244262|2|1026", - "extent": "2:3-2:12|8501689086387244262|2|0", + "spell": "2:7-2:8|8501689086387244262|2|1026|-1", + "extent": "2:3-2:12|8501689086387244262|2|0|-1", "type": 53, - "uses": ["9:5-9:6|13982179977217945200|3|20"], + "uses": ["9:5-9:6|13982179977217945200|3|20|-1"], "kind": 8, "storage": 0 }] diff --git a/index_tests/usage/func_called_from_constructor.cc b/index_tests/usage/func_called_from_constructor.cc index 69269d9e..53c43669 100644 --- a/index_tests/usage/func_called_from_constructor.cc +++ b/index_tests/usage/func_called_from_constructor.cc @@ -21,12 +21,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:12|0|1|2", - "extent": "1:1-1:17|0|1|0", + "spell": "1:6-1:12|0|1|2|-1", + "extent": "1:1-1:17|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["8:3-8:9|3385168158331140247|3|16420"], + "uses": ["8:3-8:9|3385168158331140247|3|16420|-1"], "callees": [] }, { "usr": 3385168158331140247, @@ -35,9 +35,9 @@ OUTPUT: "short_name": "Foo", "kind": 9, "storage": 0, - "declarations": ["4:3-4:6|15041163540773201510|2|1025"], - "spell": "7:6-7:9|15041163540773201510|2|1026", - "extent": "7:1-9:2|15041163540773201510|2|0", + "declarations": ["4:3-4:6|4:3-4:8|15041163540773201510|2|1025|-1"], + "spell": "7:6-7:9|15041163540773201510|2|1026|-1", + "extent": "7:1-9:2|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -51,8 +51,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "3:8-3:11|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:8-3:11|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -60,7 +60,7 @@ OUTPUT: "funcs": [3385168158331140247], "vars": [], "instances": [], - "uses": ["4:3-4:6|15041163540773201510|2|4", "7:1-7:4|0|1|4", "7:6-7:9|15041163540773201510|2|4"] + "uses": ["4:3-4:6|15041163540773201510|2|4|-1", "7:1-7:4|0|1|4|-1", "7:6-7:9|15041163540773201510|2|4|-1"] }], "usr2var": [] } diff --git a/index_tests/usage/func_called_from_macro_argument.cc b/index_tests/usage/func_called_from_macro_argument.cc index 1312ef95..868db9e8 100644 --- a/index_tests/usage/func_called_from_macro_argument.cc +++ b/index_tests/usage/func_called_from_macro_argument.cc @@ -18,11 +18,11 @@ OUTPUT: "short_name": "called", "kind": 12, "storage": 0, - "declarations": ["3:6-3:12|0|1|1"], + "declarations": ["3:6-3:12|3:1-3:28|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["6:14-6:20|11404881820527069090|3|16420", "6:14-6:20|0|1|64|0"], + "uses": ["6:14-6:20|11404881820527069090|3|16420|-1", "6:14-6:20|0|1|64|0"], "callees": [] }, { "usr": 11404881820527069090, @@ -32,8 +32,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:12|0|1|2", - "extent": "5:1-7:2|0|1|0", + "spell": "5:6-5:12|0|1|2|-1", + "extent": "5:1-7:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -48,10 +48,10 @@ OUTPUT: "short_name": "MACRO_CALL", "hover": "#define MACRO_CALL(e) e", "declarations": [], - "spell": "1:9-1:19|0|1|2", - "extent": "1:9-1:24|0|1|0", + "spell": "1:9-1:19|0|1|2|-1", + "extent": "1:9-1:24|0|1|0|-1", "type": 0, - "uses": ["6:3-6:13|0|1|64"], + "uses": ["6:3-6:13|0|1|64|-1"], "kind": 255, "storage": 0 }] diff --git a/index_tests/usage/func_called_from_template.cc b/index_tests/usage/func_called_from_template.cc index becca51b..0d223bec 100644 --- a/index_tests/usage/func_called_from_template.cc +++ b/index_tests/usage/func_called_from_template.cc @@ -23,11 +23,11 @@ OUTPUT: "short_name": "called", "kind": 12, "storage": 0, - "declarations": ["1:6-1:12|0|1|1"], + "declarations": ["1:6-1:12|1:1-1:14|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["5:3-5:9|10177235824697315808|3|16420"], + "uses": ["5:3-5:9|10177235824697315808|3|16420|-1"], "callees": [] }, { "usr": 2459767597003442547, @@ -50,8 +50,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "8:6-8:9|0|1|2", - "extent": "8:1-10:2|0|1|0", + "spell": "8:6-8:9|0|1|2|-1", + "extent": "8:1-10:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -65,12 +65,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "4:6-4:12|0|1|2", - "extent": "4:1-6:2|0|1|0", + "spell": "4:6-4:12|0|1|2|-1", + "extent": "4:1-6:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["9:3-9:9|4259594751088586730|3|16420"], + "uses": ["9:3-9:9|4259594751088586730|3|16420|-1"], "callees": ["5:3-5:9|468307235068920063|3|16420"] }], "usr2type": [], diff --git a/index_tests/usage/func_called_implicit_ctor.cc b/index_tests/usage/func_called_implicit_ctor.cc index 522158bd..63a13f2b 100644 --- a/index_tests/usage/func_called_implicit_ctor.cc +++ b/index_tests/usage/func_called_implicit_ctor.cc @@ -21,12 +21,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:5-5:11|0|1|2", - "extent": "5:1-5:27|0|1|0", + "spell": "5:5-5:11|0|1|2|-1", + "extent": "5:1-5:27|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["8:10-8:16|11404881820527069090|3|16420"], + "uses": ["8:10-8:16|11404881820527069090|3|16420|-1"], "callees": [] }, { "usr": 10544127002917214589, @@ -35,11 +35,11 @@ OUTPUT: "short_name": "Wrapper", "kind": 9, "storage": 0, - "declarations": ["2:3-2:10|13611487872560323389|2|1025"], + "declarations": ["2:3-2:10|2:3-2:17|13611487872560323389|2|1025|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["8:10-8:16|11404881820527069090|3|16676"], + "uses": ["8:10-8:16|11404881820527069090|3|16676|-1"], "callees": [] }, { "usr": 11404881820527069090, @@ -49,8 +49,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "7:9-7:15|0|1|2", - "extent": "7:1-9:2|0|1|0", + "spell": "7:9-7:15|0|1|2|-1", + "extent": "7:1-9:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -64,8 +64,8 @@ OUTPUT: "short_name": "Wrapper", "kind": 23, "declarations": [], - "spell": "1:8-1:15|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:15|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -73,7 +73,7 @@ OUTPUT: "funcs": [10544127002917214589], "vars": [], "instances": [], - "uses": ["2:3-2:10|13611487872560323389|2|4", "7:1-7:8|0|1|4"] + "uses": ["2:3-2:10|13611487872560323389|2|4|-1", "7:1-7:8|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/usage/func_usage_addr_func.cc b/index_tests/usage/func_usage_addr_func.cc index 294b6f5e..9d4efdb6 100644 --- a/index_tests/usage/func_usage_addr_func.cc +++ b/index_tests/usage/func_usage_addr_func.cc @@ -20,12 +20,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:10|0|1|2", - "extent": "3:1-3:15|0|1|0", + "spell": "3:6-3:10|0|1|2|-1", + "extent": "3:1-3:15|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["6:18-6:22|9376923949268137283|3|132", "7:12-7:16|9376923949268137283|3|132"], + "uses": ["6:18-6:22|9376923949268137283|3|132|-1", "7:12-7:16|9376923949268137283|3|132|-1"], "callees": [] }, { "usr": 9376923949268137283, @@ -35,8 +35,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:10|0|1|2", - "extent": "5:1-8:2|0|1|0", + "spell": "5:6-5:10|0|1|2|-1", + "extent": "5:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [16088407831770615719], @@ -50,12 +50,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:13|0|1|2", - "extent": "1:1-1:28|0|1|0", + "spell": "1:6-1:13|0|1|2|-1", + "extent": "1:1-1:28|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["7:3-7:10|9376923949268137283|3|16420"], + "uses": ["7:3-7:10|9376923949268137283|3|16420|-1"], "callees": [] }], "usr2type": [], @@ -66,8 +66,8 @@ OUTPUT: "short_name": "x", "hover": "void (*x)() = &used", "declarations": [], - "spell": "6:10-6:11|9376923949268137283|3|2", - "extent": "6:3-6:22|9376923949268137283|3|0", + "spell": "6:10-6:11|9376923949268137283|3|2|-1", + "extent": "6:3-6:22|9376923949268137283|3|0|-1", "type": 0, "uses": [], "kind": 13, diff --git a/index_tests/usage/func_usage_addr_method.cc b/index_tests/usage/func_usage_addr_method.cc index 3dfdda35..e8242960 100644 --- a/index_tests/usage/func_usage_addr_method.cc +++ b/index_tests/usage/func_usage_addr_method.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:10|0|1|2", - "extent": "5:1-7:2|0|1|0", + "spell": "5:6-5:10|0|1|2|-1", + "extent": "5:1-7:2|0|1|0|-1", "bases": [], "derived": [], "vars": [4636142131003982569], @@ -34,11 +34,11 @@ OUTPUT: "short_name": "Used", "kind": 6, "storage": 0, - "declarations": ["2:8-2:12|15041163540773201510|2|1025"], + "declarations": ["2:8-2:12|2:3-2:14|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["6:18-6:22|9376923949268137283|3|132"], + "uses": ["6:18-6:22|9376923949268137283|3|132|-1"], "callees": [] }], "usr2type": [{ @@ -48,8 +48,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "1:8-1:11|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:11|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -57,7 +57,7 @@ OUTPUT: "funcs": [18417145003926999463], "vars": [], "instances": [], - "uses": ["6:13-6:16|9376923949268137283|3|4"] + "uses": ["6:13-6:16|9376923949268137283|3|4|-1"] }], "usr2var": [{ "usr": 4636142131003982569, @@ -66,8 +66,8 @@ OUTPUT: "short_name": "x", "hover": "void (Foo::*)() x = &Foo::Used", "declarations": [], - "spell": "6:8-6:9|9376923949268137283|3|2", - "extent": "6:3-6:22|9376923949268137283|3|0", + "spell": "6:8-6:9|9376923949268137283|3|2|-1", + "extent": "6:3-6:22|9376923949268137283|3|0|-1", "type": 0, "uses": [], "kind": 13, diff --git a/index_tests/usage/func_usage_call_func.cc b/index_tests/usage/func_usage_call_func.cc index b6d82740..0ec91f0a 100644 --- a/index_tests/usage/func_usage_call_func.cc +++ b/index_tests/usage/func_usage_call_func.cc @@ -16,12 +16,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:12|0|1|2", - "extent": "1:1-1:17|0|1|0", + "spell": "1:6-1:12|0|1|2|-1", + "extent": "1:1-1:17|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["3:3-3:9|11404881820527069090|3|16420"], + "uses": ["3:3-3:9|11404881820527069090|3|16420|-1"], "callees": [] }, { "usr": 11404881820527069090, @@ -31,8 +31,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "2:6-2:12|0|1|2", - "extent": "2:1-4:2|0|1|0", + "spell": "2:6-2:12|0|1|2|-1", + "extent": "2:1-4:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], diff --git a/index_tests/usage/func_usage_call_method.cc b/index_tests/usage/func_usage_call_method.cc index e16be451..726f13fd 100644 --- a/index_tests/usage/func_usage_call_method.cc +++ b/index_tests/usage/func_usage_call_method.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:10|0|1|2", - "extent": "5:1-8:2|0|1|0", + "spell": "5:6-5:10|0|1|2|-1", + "extent": "5:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [14045150712868309451], @@ -34,11 +34,11 @@ OUTPUT: "short_name": "Used", "kind": 6, "storage": 0, - "declarations": ["2:8-2:12|15041163540773201510|2|1025"], + "declarations": ["2:8-2:12|2:3-2:14|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["7:6-7:10|9376923949268137283|3|16420"], + "uses": ["7:6-7:10|9376923949268137283|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -48,8 +48,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "1:8-1:11|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:11|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -57,7 +57,7 @@ OUTPUT: "funcs": [18417145003926999463], "vars": [], "instances": [14045150712868309451], - "uses": ["6:3-6:6|9376923949268137283|3|4"] + "uses": ["6:3-6:6|9376923949268137283|3|4|-1"] }], "usr2var": [{ "usr": 14045150712868309451, @@ -66,10 +66,10 @@ OUTPUT: "short_name": "f", "hover": "Foo *f = nullptr", "declarations": [], - "spell": "6:8-6:9|9376923949268137283|3|2", - "extent": "6:3-6:19|9376923949268137283|3|0", + "spell": "6:8-6:9|9376923949268137283|3|2|-1", + "extent": "6:3-6:19|9376923949268137283|3|0|-1", "type": 15041163540773201510, - "uses": ["7:3-7:4|9376923949268137283|3|12"], + "uses": ["7:3-7:4|9376923949268137283|3|12|-1"], "kind": 13, "storage": 0 }] 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 41392385..6872016b 100644 --- a/index_tests/usage/func_usage_class_inline_var_def.cc +++ b/index_tests/usage/func_usage_class_inline_var_def.cc @@ -19,12 +19,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:12-1:18|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:12-1:18|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["6:11-6:17|15041163540773201510|2|36"], + "uses": ["6:11-6:17|15041163540773201510|2|36|-1"], "callees": [] }], "usr2type": [{ @@ -49,8 +49,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "5:7-5:10|0|1|2", - "extent": "5:1-7:2|0|1|0", + "spell": "5:7-5:10|0|1|2|-1", + "extent": "5:1-7:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -70,8 +70,8 @@ OUTPUT: "short_name": "x", "hover": "int Foo::x = helper()", "declarations": [], - "spell": "6:7-6:8|15041163540773201510|2|1026", - "extent": "6:3-6:19|15041163540773201510|2|0", + "spell": "6:7-6:8|15041163540773201510|2|1026|-1", + "extent": "6:3-6:19|15041163540773201510|2|0|-1", "type": 53, "uses": [], "kind": 8, diff --git a/index_tests/usage/func_usage_forward_decl_func.cc b/index_tests/usage/func_usage_forward_decl_func.cc index 775595fd..1e7cef98 100644 --- a/index_tests/usage/func_usage_forward_decl_func.cc +++ b/index_tests/usage/func_usage_forward_decl_func.cc @@ -15,11 +15,11 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["1:6-1:9|0|1|1"], + "declarations": ["1:6-1:9|1:1-1:11|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["4:3-4:6|6767773193109753523|3|16420"], + "uses": ["4:3-4:6|6767773193109753523|3|16420|-1"], "callees": [] }, { "usr": 6767773193109753523, @@ -29,8 +29,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:11|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:11|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], diff --git a/index_tests/usage/func_usage_forward_decl_method.cc b/index_tests/usage/func_usage_forward_decl_method.cc index d27dadec..9fdfb1ed 100644 --- a/index_tests/usage/func_usage_forward_decl_method.cc +++ b/index_tests/usage/func_usage_forward_decl_method.cc @@ -19,8 +19,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:11|0|1|2", - "extent": "5:1-8:2|0|1|0", + "spell": "5:6-5:11|0|1|2|-1", + "extent": "5:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [16229832321010999607], @@ -33,11 +33,11 @@ OUTPUT: "short_name": "foo", "kind": 6, "storage": 0, - "declarations": ["2:8-2:11|15041163540773201510|2|1025"], + "declarations": ["2:8-2:11|2:3-2:13|15041163540773201510|2|1025|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["7:6-7:9|6767773193109753523|3|16420"], + "uses": ["7:6-7:9|6767773193109753523|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -47,8 +47,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "1:8-1:11|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:11|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -56,7 +56,7 @@ OUTPUT: "funcs": [17922201480358737771], "vars": [], "instances": [16229832321010999607], - "uses": ["6:3-6:6|6767773193109753523|3|4"] + "uses": ["6:3-6:6|6767773193109753523|3|4|-1"] }], "usr2var": [{ "usr": 16229832321010999607, @@ -65,10 +65,10 @@ OUTPUT: "short_name": "f", "hover": "Foo *f = nullptr", "declarations": [], - "spell": "6:8-6:9|6767773193109753523|3|2", - "extent": "6:3-6:19|6767773193109753523|3|0", + "spell": "6:8-6:9|6767773193109753523|3|2|-1", + "extent": "6:3-6:19|6767773193109753523|3|0|-1", "type": 15041163540773201510, - "uses": ["7:3-7:4|6767773193109753523|3|12"], + "uses": ["7:3-7:4|6767773193109753523|3|12|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/usage/func_usage_template_func.cc b/index_tests/usage/func_usage_template_func.cc index 422d5952..72e6e670 100644 --- a/index_tests/usage/func_usage_template_func.cc +++ b/index_tests/usage/func_usage_template_func.cc @@ -19,8 +19,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "4:6-4:9|0|1|2", - "extent": "4:1-7:2|0|1|0", + "spell": "4:6-4:9|0|1|2|-1", + "extent": "4:1-7:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -33,11 +33,11 @@ OUTPUT: "short_name": "accept", "kind": 12, "storage": 0, - "declarations": ["2:6-2:12|0|1|1"], + "declarations": ["2:6-2:12|2:1-2:15|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["5:3-5:9|4259594751088586730|3|16420", "6:3-6:9|4259594751088586730|3|16420"], + "uses": ["5:3-5:9|4259594751088586730|3|16420|-1", "6:3-6:9|4259594751088586730|3|16420|-1"], "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 74d2c025..5c4dc824 100644 --- a/index_tests/usage/type_usage_as_template_parameter.cc +++ b/index_tests/usage/type_usage_as_template_parameter.cc @@ -23,8 +23,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "9:16-9:27|0|1|2", - "extent": "9:1-12:2|0|1|0", + "spell": "9:16-9:27|0|1|2|-1", + "extent": "9:1-12:2|0|1|0|-1", "bases": [], "derived": [], "vars": [3364438781074774169], @@ -38,8 +38,8 @@ OUTPUT: "short_name": "unique_ptr", "kind": 5, "declarations": [], - "spell": "2:7-2:17|0|1|2", - "extent": "2:1-2:20|0|1|0", + "spell": "2:7-2:17|0|1|2|-1", + "extent": "2:1-2:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -47,7 +47,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["6:8-6:18|0|1|4", "7:8-7:18|0|1|4", "9:1-9:11|0|1|4", "10:3-10:13|16359708726068806331|3|4"] + "uses": ["6:8-6:18|0|1|4|-1", "7:8-7:18|0|1|4|-1", "9:1-9:11|0|1|4|-1", "10:3-10:13|16359708726068806331|3|4|-1"] }, { "usr": 4186953406371619898, "detailed_name": "unique_ptr", @@ -55,8 +55,8 @@ OUTPUT: "short_name": "unique_ptr", "kind": 26, "declarations": [], - "spell": "2:7-2:17|0|1|2", - "extent": "1:1-2:20|0|1|0", + "spell": "2:7-2:17|0|1|2|-1", + "extent": "1:1-2:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -72,8 +72,8 @@ OUTPUT: "short_name": "S", "kind": 23, "declarations": [], - "spell": "4:8-4:9|0|1|2", - "extent": "4:1-4:12|0|1|0", + "spell": "4:8-4:9|0|1|2|-1", + "extent": "4:1-4:12|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -81,7 +81,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["7:19-7:20|0|1|4", "9:12-9:13|0|1|4", "10:14-10:15|16359708726068806331|3|4"] + "uses": ["7:19-7:20|0|1|4|-1", "9:12-9:13|0|1|4|-1", "10:14-10:15|16359708726068806331|3|4|-1"] }, { "usr": 16848604152578034754, "detailed_name": "unique_ptr", @@ -89,8 +89,8 @@ OUTPUT: "short_name": "unique_ptr", "kind": 26, "declarations": [], - "spell": "2:7-2:17|0|1|2", - "extent": "1:1-2:20|0|1|0", + "spell": "2:7-2:17|0|1|2|-1", + "extent": "1:1-2:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -106,8 +106,8 @@ OUTPUT: "qual_name_offset": 15, "short_name": "local", "declarations": [], - "spell": "10:18-10:23|16359708726068806331|3|2", - "extent": "10:3-10:23|16359708726068806331|3|0", + "spell": "10:18-10:23|16359708726068806331|3|2|-1", + "extent": "10:3-10:23|16359708726068806331|3|0|-1", "type": 4186953406371619898, "uses": [], "kind": 13, @@ -118,8 +118,8 @@ OUTPUT: "qual_name_offset": 24, "short_name": "f0", "declarations": [], - "spell": "6:25-6:27|0|1|2", - "extent": "6:1-6:27|0|1|0", + "spell": "6:25-6:27|0|1|2|-1", + "extent": "6:1-6:27|0|1|0|-1", "type": 16848604152578034754, "uses": [], "kind": 13, @@ -130,8 +130,8 @@ OUTPUT: "qual_name_offset": 21, "short_name": "f1", "declarations": [], - "spell": "7:22-7:24|0|1|2", - "extent": "7:1-7:24|0|1|0", + "spell": "7:22-7:24|0|1|2|-1", + "extent": "7:1-7:24|0|1|0|-1", "type": 4186953406371619898, "uses": [], "kind": 13, 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 7b5ebc54..0b4e20e0 100644 --- a/index_tests/usage/type_usage_as_template_parameter_complex.cc +++ b/index_tests/usage/type_usage_as_template_parameter_complex.cc @@ -91,8 +91,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "33:37-33:51|0|1|2", - "extent": "33:1-33:92|0|1|0", + "spell": "33:37-33:51|0|1|2|-1", + "extent": "33:1-33:92|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -106,8 +106,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "40:6-40:20|0|1|2", - "extent": "40:1-40:28|0|1|0", + "spell": "40:6-40:20|0|1|2|-1", + "extent": "40:1-40:28|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -120,9 +120,9 @@ OUTPUT: "short_name": "foo", "kind": 6, "storage": 0, - "declarations": ["65:23-65:26|15041163540773201510|2|1025"], - "spell": "79:26-79:29|15041163540773201510|2|1026", - "extent": "79:1-79:51|15041163540773201510|2|0", + "declarations": ["65:23-65:26|65:3-65:28|15041163540773201510|2|1025|-1"], + "spell": "79:26-79:29|15041163540773201510|2|1026|-1", + "extent": "79:1-79:51|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -136,8 +136,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "53:6-53:11|0|1|2", - "extent": "53:1-55:2|0|1|0", + "spell": "53:6-53:11|0|1|2|-1", + "extent": "53:1-55:2|0|1|0|-1", "bases": [], "derived": [], "vars": [500112618220246], @@ -150,7 +150,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "S1", "kind": 23, - "declarations": ["4:8-4:10|0|1|1"], + "declarations": ["4:8-4:10|4:1-4:10|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -158,7 +158,7 @@ OUTPUT: "funcs": [], "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|18320186404467436976|3|4", "65:14-65:16|15041163540773201510|2|4", "79:12-79:14|0|1|4"] + "uses": ["15:30-15:32|0|1|4|-1", "33:23-33:25|0|1|4|-1", "33:63-33:65|0|1|4|-1", "54:25-54:27|18320186404467436976|3|4|-1", "65:14-65:16|15041163540773201510|2|4|-1", "79:12-79:14|0|1|4|-1"] }, { "usr": 7147635971744144194, "detailed_name": "template<> class unique_ptr", @@ -173,14 +173,14 @@ OUTPUT: "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|18320186404467436976|3|4", "65:3-65:13|15041163540773201510|2|4", "79:1-79:11|0|1|4"] + "uses": ["15:19-15:29|0|1|4|-1", "33:12-33:22|0|1|4|-1", "33:52-33:62|0|1|4|-1", "54:14-54:24|18320186404467436976|3|4|-1", "65:3-65:13|15041163540773201510|2|4|-1", "79:1-79:11|0|1|4|-1"] }, { "usr": 12728490517004312484, "detailed_name": "struct S2", "qual_name_offset": 7, "short_name": "S2", "kind": 23, - "declarations": ["5:8-5:10|0|1|1"], + "declarations": ["5:8-5:10|5:1-5:10|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -188,14 +188,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["15:34-15:36|0|1|4", "15:39-15:41|0|1|4", "33:27-33:29|0|1|4", "33:32-33:34|0|1|4", "33:67-33:69|0|1|4", "54:29-54:31|18320186404467436976|3|4", "54:34-54:36|18320186404467436976|3|4", "65:18-65:20|15041163540773201510|2|4", "79:16-79:18|0|1|4"] + "uses": ["15:34-15:36|0|1|4|-1", "15:39-15:41|0|1|4|-1", "33:27-33:29|0|1|4|-1", "33:32-33:34|0|1|4|-1", "33:67-33:69|0|1|4|-1", "54:29-54:31|18320186404467436976|3|4|-1", "54:34-54:36|18320186404467436976|3|4|-1", "65:18-65:20|15041163540773201510|2|4|-1", "79:16-79:18|0|1|4|-1"] }, { "usr": 14209198335088845323, "detailed_name": "class unique_ptr", "qual_name_offset": 6, "short_name": "unique_ptr", "kind": 5, - "declarations": ["2:7-2:17|0|1|1"], + "declarations": ["2:7-2:17|2:1-2:17|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -211,8 +211,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "64:7-64:10|0|1|2", - "extent": "64:1-66:2|0|1|0", + "spell": "64:7-64:10|0|1|2|-1", + "extent": "64:1-66:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -220,7 +220,7 @@ OUTPUT: "funcs": [17922201480358737771], "vars": [], "instances": [], - "uses": ["79:21-79:24|0|1|4"] + "uses": ["79:21-79:24|0|1|4|-1"] }, { "usr": 18153735331422331128, "detailed_name": "unique_ptr", @@ -228,8 +228,8 @@ OUTPUT: "short_name": "unique_ptr", "kind": 5, "declarations": [], - "spell": "2:7-2:17|0|1|2", - "extent": "1:1-2:17|0|1|0", + "spell": "2:7-2:17|0|1|2|-1", + "extent": "1:1-2:17|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -237,7 +237,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [2933643612409209903, 500112618220246], - "uses": ["15:8-15:18|0|1|4", "33:1-33:11|0|1|4", "54:3-54:13|18320186404467436976|3|4"] + "uses": ["15:8-15:18|0|1|4|-1", "33:1-33:11|0|1|4|-1", "54:3-54:13|18320186404467436976|3|4|-1"] }], "usr2var": [{ "usr": 500112618220246, @@ -245,8 +245,8 @@ OUTPUT: "qual_name_offset": 36, "short_name": "local", "declarations": [], - "spell": "54:39-54:44|18320186404467436976|3|2", - "extent": "54:3-54:44|18320186404467436976|3|0", + "spell": "54:39-54:44|18320186404467436976|3|2|-1", + "extent": "54:3-54:44|18320186404467436976|3|0|-1", "type": 18153735331422331128, "uses": [], "kind": 13, @@ -256,7 +256,7 @@ OUTPUT: "detailed_name": "extern unique_ptr, S2> f", "qual_name_offset": 42, "short_name": "f", - "declarations": ["15:43-15:44|0|1|1"], + "declarations": ["15:43-15:44|15:1-15:44|0|1|1|-1"], "type": 18153735331422331128, "uses": [], "kind": 13, 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 1b904ef7..1893c26e 100644 --- a/index_tests/usage/type_usage_as_template_parameter_simple.cc +++ b/index_tests/usage/type_usage_as_template_parameter_simple.cc @@ -18,8 +18,8 @@ OUTPUT: "short_name": "unique_ptr", "kind": 5, "declarations": [], - "spell": "2:7-2:17|0|1|2", - "extent": "2:1-2:20|0|1|0", + "spell": "2:7-2:17|0|1|2|-1", + "extent": "2:1-2:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -27,7 +27,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["6:8-6:18|0|1|4"] + "uses": ["6:8-6:18|0|1|4|-1"] }, { "usr": 4186953406371619898, "detailed_name": "unique_ptr", @@ -35,8 +35,8 @@ OUTPUT: "short_name": "unique_ptr", "kind": 26, "declarations": [], - "spell": "2:7-2:17|0|1|2", - "extent": "1:1-2:20|0|1|0", + "spell": "2:7-2:17|0|1|2|-1", + "extent": "1:1-2:20|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -51,7 +51,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "S", "kind": 23, - "declarations": ["4:8-4:9|0|1|1"], + "declarations": ["4:8-4:9|4:1-4:9|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -59,7 +59,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["6:19-6:20|0|1|4"] + "uses": ["6:19-6:20|0|1|4|-1"] }], "usr2var": [{ "usr": 3398408600781120939, @@ -67,8 +67,8 @@ OUTPUT: "qual_name_offset": 21, "short_name": "foo", "declarations": [], - "spell": "6:22-6:25|0|1|2", - "extent": "6:1-6:25|0|1|0", + "spell": "6:22-6:25|0|1|2|-1", + "extent": "6:1-6:25|0|1|0|-1", "type": 4186953406371619898, "uses": [], "kind": 13, diff --git a/index_tests/usage/type_usage_declare_extern.cc b/index_tests/usage/type_usage_declare_extern.cc index 2fd67216..4d09cd85 100644 --- a/index_tests/usage/type_usage_declare_extern.cc +++ b/index_tests/usage/type_usage_declare_extern.cc @@ -14,8 +14,8 @@ OUTPUT: "short_name": "T", "kind": 23, "declarations": [], - "spell": "1:8-1:9|0|1|2", - "extent": "1:1-1:12|0|1|0", + "spell": "1:8-1:9|0|1|2|-1", + "extent": "1:1-1:12|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -23,14 +23,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [1346710425945444872], - "uses": ["3:8-3:9|0|1|4"] + "uses": ["3:8-3:9|0|1|4|-1"] }], "usr2var": [{ "usr": 1346710425945444872, "detailed_name": "extern T t", "qual_name_offset": 9, "short_name": "t", - "declarations": ["3:10-3:11|0|1|1"], + "declarations": ["3:10-3:11|3:1-3:11|0|1|1|-1"], "type": 5673439900521455039, "uses": [], "kind": 13, diff --git a/index_tests/usage/type_usage_declare_field.cc b/index_tests/usage/type_usage_declare_field.cc index 114d6a86..09cae9e5 100644 --- a/index_tests/usage/type_usage_declare_field.cc +++ b/index_tests/usage/type_usage_declare_field.cc @@ -19,8 +19,8 @@ OUTPUT: "short_name": "ImplementedType", "kind": 23, "declarations": [], - "spell": "2:8-2:23|0|1|2", - "extent": "2:1-2:26|0|1|0", + "spell": "2:8-2:23|0|1|2|-1", + "extent": "2:1-2:26|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -28,14 +28,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [14727441168849658842], - "uses": ["6:3-6:18|15041163540773201510|2|4"] + "uses": ["6:3-6:18|15041163540773201510|2|4|-1"] }, { "usr": 13749354388332789217, "detailed_name": "struct ForwardType", "qual_name_offset": 7, "short_name": "ForwardType", "kind": 23, - "declarations": ["1:8-1:19|0|1|1"], + "declarations": ["1:8-1:19|1:1-1:19|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -43,7 +43,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [14314859014962085433], - "uses": ["5:3-5:14|15041163540773201510|2|4"] + "uses": ["5:3-5:14|15041163540773201510|2|4|-1"] }, { "usr": 15041163540773201510, "detailed_name": "struct Foo {}", @@ -51,8 +51,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "4:8-4:11|0|1|2", - "extent": "4:1-7:2|0|1|0", + "spell": "4:8-4:11|0|1|2|-1", + "extent": "4:1-7:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -74,8 +74,8 @@ OUTPUT: "qual_name_offset": 13, "short_name": "a", "declarations": [], - "spell": "5:16-5:17|15041163540773201510|2|1026", - "extent": "5:3-5:17|15041163540773201510|2|0", + "spell": "5:16-5:17|15041163540773201510|2|1026|-1", + "extent": "5:3-5:17|15041163540773201510|2|0|-1", "type": 13749354388332789217, "uses": [], "kind": 8, @@ -86,8 +86,8 @@ OUTPUT: "qual_name_offset": 16, "short_name": "b", "declarations": [], - "spell": "6:19-6:20|15041163540773201510|2|1026", - "extent": "6:3-6:20|15041163540773201510|2|0", + "spell": "6:19-6:20|15041163540773201510|2|1026|-1", + "extent": "6:3-6:20|15041163540773201510|2|0|-1", "type": 8508299082070213750, "uses": [], "kind": 8, diff --git a/index_tests/usage/type_usage_declare_local.cc b/index_tests/usage/type_usage_declare_local.cc index 0b037bc5..39fd917d 100644 --- a/index_tests/usage/type_usage_declare_local.cc +++ b/index_tests/usage/type_usage_declare_local.cc @@ -19,8 +19,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "4:6-4:9|0|1|2", - "extent": "4:1-7:2|0|1|0", + "spell": "4:6-4:9|0|1|2|-1", + "extent": "4:1-7:2|0|1|0|-1", "bases": [], "derived": [], "vars": [16374832544037266261, 2580122838476012357], @@ -34,8 +34,8 @@ OUTPUT: "short_name": "ImplementedType", "kind": 23, "declarations": [], - "spell": "2:8-2:23|0|1|2", - "extent": "2:1-2:26|0|1|0", + "spell": "2:8-2:23|0|1|2|-1", + "extent": "2:1-2:26|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -43,14 +43,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [2580122838476012357], - "uses": ["6:3-6:18|4654328188330986029|3|4"] + "uses": ["6:3-6:18|4654328188330986029|3|4|-1"] }, { "usr": 13749354388332789217, "detailed_name": "struct ForwardType", "qual_name_offset": 7, "short_name": "ForwardType", "kind": 23, - "declarations": ["1:8-1:19|0|1|1"], + "declarations": ["1:8-1:19|1:1-1:19|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -58,7 +58,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [16374832544037266261], - "uses": ["5:3-5:14|4654328188330986029|3|4"] + "uses": ["5:3-5:14|4654328188330986029|3|4|-1"] }], "usr2var": [{ "usr": 2580122838476012357, @@ -66,8 +66,8 @@ OUTPUT: "qual_name_offset": 16, "short_name": "b", "declarations": [], - "spell": "6:19-6:20|4654328188330986029|3|2", - "extent": "6:3-6:20|4654328188330986029|3|0", + "spell": "6:19-6:20|4654328188330986029|3|2|-1", + "extent": "6:3-6:20|4654328188330986029|3|0|-1", "type": 8508299082070213750, "uses": [], "kind": 13, @@ -78,8 +78,8 @@ OUTPUT: "qual_name_offset": 13, "short_name": "a", "declarations": [], - "spell": "5:16-5:17|4654328188330986029|3|2", - "extent": "5:3-5:17|4654328188330986029|3|0", + "spell": "5:16-5:17|4654328188330986029|3|2|-1", + "extent": "5:3-5:17|4654328188330986029|3|0|-1", "type": 13749354388332789217, "uses": [], "kind": 13, diff --git a/index_tests/usage/type_usage_declare_param.cc b/index_tests/usage/type_usage_declare_param.cc index 4495b5ed..1570ef02 100644 --- a/index_tests/usage/type_usage_declare_param.cc +++ b/index_tests/usage/type_usage_declare_param.cc @@ -16,8 +16,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "4:6-4:9|0|1|2", - "extent": "4:1-4:47|0|1|0", + "spell": "4:6-4:9|0|1|2|-1", + "extent": "4:1-4:47|0|1|0|-1", "bases": [], "derived": [], "vars": [13058491096576226774, 11055777568039014776], @@ -31,8 +31,8 @@ OUTPUT: "short_name": "ImplementedType", "kind": 23, "declarations": [], - "spell": "2:8-2:23|0|1|2", - "extent": "2:1-2:26|0|1|0", + "spell": "2:8-2:23|0|1|2|-1", + "extent": "2:1-2:26|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -40,14 +40,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [11055777568039014776], - "uses": ["4:26-4:41|0|1|4"] + "uses": ["4:26-4:41|0|1|4|-1"] }, { "usr": 13749354388332789217, "detailed_name": "struct ForwardType", "qual_name_offset": 7, "short_name": "ForwardType", "kind": 23, - "declarations": ["1:8-1:19|0|1|1"], + "declarations": ["1:8-1:19|1:1-1:19|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -55,7 +55,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [13058491096576226774], - "uses": ["4:10-4:21|0|1|4"] + "uses": ["4:10-4:21|0|1|4|-1"] }], "usr2var": [{ "usr": 11055777568039014776, @@ -63,8 +63,8 @@ OUTPUT: "qual_name_offset": 16, "short_name": "a", "declarations": [], - "spell": "4:42-4:43|1699390678058422036|3|1026", - "extent": "4:26-4:43|1699390678058422036|3|0", + "spell": "4:42-4:43|1699390678058422036|3|1026|-1", + "extent": "4:26-4:43|1699390678058422036|3|0|-1", "type": 8508299082070213750, "uses": [], "kind": 253, @@ -75,8 +75,8 @@ OUTPUT: "qual_name_offset": 13, "short_name": "f", "declarations": [], - "spell": "4:23-4:24|1699390678058422036|3|1026", - "extent": "4:10-4:24|1699390678058422036|3|0", + "spell": "4:23-4:24|1699390678058422036|3|1026|-1", + "extent": "4:10-4:24|1699390678058422036|3|0|-1", "type": 13749354388332789217, "uses": [], "kind": 253, diff --git a/index_tests/usage/type_usage_declare_param_prototype.cc b/index_tests/usage/type_usage_declare_param_prototype.cc index cee27557..3f205c9d 100644 --- a/index_tests/usage/type_usage_declare_param_prototype.cc +++ b/index_tests/usage/type_usage_declare_param_prototype.cc @@ -20,9 +20,9 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["3:6-3:9|0|1|1"], - "spell": "4:6-4:9|0|1|2", - "extent": "4:1-4:26|0|1|0", + "declarations": ["3:6-3:9|3:1-3:23|0|1|1|-1"], + "spell": "4:6-4:9|0|1|2|-1", + "extent": "4:1-4:26|0|1|0|-1", "bases": [], "derived": [], "vars": [13823260660189154978], @@ -35,7 +35,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "Foo", "kind": 23, - "declarations": ["1:8-1:11|0|1|1"], + "declarations": ["1:8-1:11|1:1-1:11|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -43,7 +43,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [13823260660189154978], - "uses": ["3:10-3:13|0|1|4", "3:18-3:21|0|1|4", "4:10-4:13|0|1|4", "4:18-4:21|0|1|4"] + "uses": ["3:10-3:13|0|1|4|-1", "3:18-3:21|0|1|4|-1", "4:10-4:13|0|1|4|-1", "4:18-4:21|0|1|4|-1"] }], "usr2var": [{ "usr": 13823260660189154978, @@ -51,8 +51,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "f", "declarations": [], - "spell": "4:15-4:16|8908726657907936744|3|1026", - "extent": "4:10-4:16|8908726657907936744|3|0", + "spell": "4:15-4:16|8908726657907936744|3|1026|-1", + "extent": "4:10-4:16|8908726657907936744|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 253, diff --git a/index_tests/usage/type_usage_declare_param_unnamed.cc b/index_tests/usage/type_usage_declare_param_unnamed.cc index f0cda536..f50fab00 100644 --- a/index_tests/usage/type_usage_declare_param_unnamed.cc +++ b/index_tests/usage/type_usage_declare_param_unnamed.cc @@ -13,8 +13,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "2:6-2:9|0|1|2", - "extent": "2:1-2:26|0|1|0", + "spell": "2:6-2:9|0|1|2|-1", + "extent": "2:1-2:26|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -27,7 +27,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "ForwardType", "kind": 23, - "declarations": ["1:8-1:19|0|1|1"], + "declarations": ["1:8-1:19|1:1-1:19|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -35,7 +35,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["2:10-2:21|0|1|4"] + "uses": ["2:10-2:21|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/usage/type_usage_declare_qualifiers.cc b/index_tests/usage/type_usage_declare_qualifiers.cc index 41dfc325..ec1f4d9c 100644 --- a/index_tests/usage/type_usage_declare_qualifiers.cc +++ b/index_tests/usage/type_usage_declare_qualifiers.cc @@ -19,8 +19,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-8:2|0|1|0", + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [7997456978847868736, 17228576662112939520, 15429032129697337561, 6081981442495435784, 5004072032239834773, 14939253431683105646], @@ -34,8 +34,8 @@ OUTPUT: "short_name": "Type", "kind": 23, "declarations": [], - "spell": "1:8-1:12|0|1|2", - "extent": "1:1-1:15|0|1|0", + "spell": "1:8-1:12|0|1|2|-1", + "extent": "1:1-1:15|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -43,7 +43,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [7997456978847868736, 17228576662112939520, 15429032129697337561, 6081981442495435784, 5004072032239834773, 14939253431683105646], - "uses": ["3:10-3:14|0|1|4", "3:26-3:30|0|1|4", "4:3-4:7|16858540520096802573|3|4", "5:3-5:7|16858540520096802573|3|4", "6:9-6:13|16858540520096802573|3|4", "7:9-7:13|16858540520096802573|3|4"] + "uses": ["3:10-3:14|0|1|4|-1", "3:26-3:30|0|1|4|-1", "4:3-4:7|16858540520096802573|3|4|-1", "5:3-5:7|16858540520096802573|3|4|-1", "6:9-6:13|16858540520096802573|3|4|-1", "7:9-7:13|16858540520096802573|3|4|-1"] }], "usr2var": [{ "usr": 5004072032239834773, @@ -51,8 +51,8 @@ OUTPUT: "qual_name_offset": 12, "short_name": "a4", "declarations": [], - "spell": "6:15-6:17|16858540520096802573|3|2", - "extent": "6:3-6:17|16858540520096802573|3|0", + "spell": "6:15-6:17|16858540520096802573|3|2|-1", + "extent": "6:3-6:17|16858540520096802573|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, @@ -63,8 +63,8 @@ OUTPUT: "qual_name_offset": 6, "short_name": "a3", "declarations": [], - "spell": "5:9-5:11|16858540520096802573|3|2", - "extent": "5:3-5:11|16858540520096802573|3|0", + "spell": "5:9-5:11|16858540520096802573|3|2|-1", + "extent": "5:3-5:11|16858540520096802573|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, @@ -75,8 +75,8 @@ OUTPUT: "qual_name_offset": 6, "short_name": "a0", "declarations": [], - "spell": "3:16-3:18|16858540520096802573|3|1026", - "extent": "3:10-3:18|16858540520096802573|3|0", + "spell": "3:16-3:18|16858540520096802573|3|1026|-1", + "extent": "3:10-3:18|16858540520096802573|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 253, @@ -88,8 +88,8 @@ OUTPUT: "short_name": "a5", "hover": "const Type *const a5 = nullptr", "declarations": [], - "spell": "7:21-7:23|16858540520096802573|3|2", - "extent": "7:3-7:33|16858540520096802573|3|0", + "spell": "7:21-7:23|16858540520096802573|3|2|-1", + "extent": "7:3-7:33|16858540520096802573|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, @@ -100,8 +100,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "a2", "declarations": [], - "spell": "4:8-4:10|16858540520096802573|3|2", - "extent": "4:3-4:10|16858540520096802573|3|0", + "spell": "4:8-4:10|16858540520096802573|3|2|-1", + "extent": "4:3-4:10|16858540520096802573|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, @@ -112,8 +112,8 @@ OUTPUT: "qual_name_offset": 12, "short_name": "a1", "declarations": [], - "spell": "3:32-3:34|16858540520096802573|3|1026", - "extent": "3:20-3:34|16858540520096802573|3|0", + "spell": "3:32-3:34|16858540520096802573|3|1026|-1", + "extent": "3:20-3:34|16858540520096802573|3|0|-1", "type": 13487927231218873822, "uses": [], "kind": 253, diff --git a/index_tests/usage/type_usage_declare_static.cc b/index_tests/usage/type_usage_declare_static.cc index 102c156a..ccff19e2 100644 --- a/index_tests/usage/type_usage_declare_static.cc +++ b/index_tests/usage/type_usage_declare_static.cc @@ -13,8 +13,8 @@ OUTPUT: "short_name": "Type", "kind": 23, "declarations": [], - "spell": "1:8-1:12|0|1|2", - "extent": "1:1-1:15|0|1|0", + "spell": "1:8-1:12|0|1|2|-1", + "extent": "1:1-1:15|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -22,7 +22,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [6601831367240627080], - "uses": ["2:8-2:12|0|1|4"] + "uses": ["2:8-2:12|0|1|4|-1"] }], "usr2var": [{ "usr": 6601831367240627080, @@ -30,8 +30,8 @@ OUTPUT: "qual_name_offset": 12, "short_name": "t", "declarations": [], - "spell": "2:13-2:14|0|1|2", - "extent": "2:1-2:14|0|1|0", + "spell": "2:13-2:14|0|1|2|-1", + "extent": "2:1-2:14|0|1|0|-1", "type": 13487927231218873822, "uses": [], "kind": 13, diff --git a/index_tests/usage/type_usage_on_return_type.cc b/index_tests/usage/type_usage_on_return_type.cc index 04e84860..7a07f973 100644 --- a/index_tests/usage/type_usage_on_return_type.cc +++ b/index_tests/usage/type_usage_on_return_type.cc @@ -29,9 +29,9 @@ OUTPUT: "short_name": "Empty", "kind": 6, "storage": 0, - "declarations": ["9:8-9:13|15041163540773201510|2|1025"], - "spell": "13:11-13:16|15041163540773201510|2|1026", - "extent": "13:1-13:21|15041163540773201510|2|0", + "declarations": ["9:8-9:13|9:3-9:15|15041163540773201510|2|1025|-1"], + "spell": "13:11-13:16|15041163540773201510|2|1026|-1", + "extent": "13:1-13:21|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -44,9 +44,9 @@ OUTPUT: "short_name": "foo", "kind": 12, "storage": 0, - "declarations": ["3:7-3:10|0|1|1", "4:7-4:10|0|1|1"], - "spell": "5:7-5:10|0|1|2", - "extent": "5:1-5:32|0|1|0", + "declarations": ["3:7-3:10|3:1-3:12|0|1|1|-1", "4:7-4:10|4:1-4:12|0|1|1|-1"], + "spell": "5:7-5:10|0|1|2|-1", + "extent": "5:1-5:32|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -59,7 +59,7 @@ OUTPUT: "short_name": "external", "kind": 12, "storage": 0, - "declarations": ["15:20-15:28|0|1|1"], + "declarations": ["15:20-15:28|15:1-15:30|0|1|1|-1"], "bases": [], "derived": [], "vars": [], @@ -72,9 +72,9 @@ OUTPUT: "short_name": "Get", "kind": 6, "storage": 0, - "declarations": ["8:9-8:12|15041163540773201510|2|1025"], - "spell": "12:12-12:15|15041163540773201510|2|1026", - "extent": "12:1-12:40|15041163540773201510|2|0", + "declarations": ["8:9-8:12|8:3-8:17|15041163540773201510|2|1025|-1"], + "spell": "12:12-12:15|15041163540773201510|2|1026|-1", + "extent": "12:1-12:40|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [], @@ -87,9 +87,9 @@ OUTPUT: "short_name": "bar", "kind": 12, "storage": 0, - "declarations": ["17:14-17:17|0|1|1"], - "spell": "18:14-18:17|0|1|2", - "extent": "18:1-18:39|0|1|0", + "declarations": ["17:14-17:17|17:1-17:19|0|1|1|-1"], + "spell": "18:14-18:17|0|1|2|-1", + "extent": "18:1-18:39|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -102,7 +102,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "Type", "kind": 23, - "declarations": ["1:8-1:12|0|1|1"], + "declarations": ["1:8-1:12|1:1-1:12|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -110,7 +110,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["3:1-3:5|0|1|4", "4:1-4:5|0|1|4", "5:1-5:5|0|1|4", "8:3-8:7|15041163540773201510|2|4", "12:1-12:5|0|1|4", "15:14-15:18|0|1|4", "17:8-17:12|0|1|4", "18:8-18:12|0|1|4"] + "uses": ["3:1-3:5|0|1|4|-1", "4:1-4:5|0|1|4|-1", "5:1-5:5|0|1|4|-1", "8:3-8:7|15041163540773201510|2|4|-1", "12:1-12:5|0|1|4|-1", "15:14-15:18|0|1|4|-1", "17:8-17:12|0|1|4|-1", "18:8-18:12|0|1|4|-1"] }, { "usr": 15041163540773201510, "detailed_name": "class Foo {}", @@ -118,8 +118,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "7:7-7:10|0|1|2", - "extent": "7:1-10:2|0|1|0", + "spell": "7:7-7:10|0|1|2|-1", + "extent": "7:1-10:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -127,7 +127,7 @@ OUTPUT: "funcs": [13402221340333431092, 4240751906910175539], "vars": [], "instances": [], - "uses": ["12:7-12:10|0|1|4", "13:6-13:9|0|1|4"] + "uses": ["12:7-12:10|0|1|4|-1", "13:6-13:9|0|1|4|-1"] }], "usr2var": [] } diff --git a/index_tests/usage/type_usage_typedef_and_using.cc b/index_tests/usage/type_usage_typedef_and_using.cc index ded74f43..65ca72f3 100644 --- a/index_tests/usage/type_usage_typedef_and_using.cc +++ b/index_tests/usage/type_usage_typedef_and_using.cc @@ -22,8 +22,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "8:6-8:13|0|1|2", - "extent": "8:1-8:23|0|1|0", + "spell": "8:6-8:13|0|1|2|-1", + "extent": "8:1-8:23|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -37,8 +37,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "7:6-7:12|0|1|2", - "extent": "7:1-7:21|0|1|0", + "spell": "7:6-7:12|0|1|2|-1", + "extent": "7:1-7:21|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -52,8 +52,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "9:6-9:13|0|1|2", - "extent": "9:1-9:23|0|1|0", + "spell": "9:6-9:13|0|1|2|-1", + "extent": "9:1-9:23|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -67,8 +67,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "10:6-10:13|0|1|2", - "extent": "10:1-10:23|0|1|0", + "spell": "10:6-10:13|0|1|2|-1", + "extent": "10:1-10:23|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -82,8 +82,8 @@ OUTPUT: "short_name": "Foo1", "kind": 252, "declarations": [], - "spell": "2:7-2:11|0|1|2", - "extent": "2:1-2:18|0|1|0", + "spell": "2:7-2:11|0|1|2|-1", + "extent": "2:1-2:18|0|1|0|-1", "alias_of": 15041163540773201510, "bases": [], "derived": [], @@ -91,7 +91,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["4:14-4:18|0|1|4", "8:14-8:18|0|1|4"] + "uses": ["4:14-4:18|0|1|4|-1", "8:14-8:18|0|1|4|-1"] }, { "usr": 2638219001294786365, "detailed_name": "using Foo4 = int", @@ -99,8 +99,8 @@ OUTPUT: "short_name": "Foo4", "kind": 252, "declarations": [], - "spell": "5:7-5:11|0|1|2", - "extent": "5:1-5:17|0|1|0", + "spell": "5:7-5:11|0|1|2|-1", + "extent": "5:1-5:17|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -115,7 +115,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "Foo", "kind": 23, - "declarations": ["1:8-1:11|0|1|1"], + "declarations": ["1:8-1:11|1:1-1:11|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -123,7 +123,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["2:14-2:17|0|1|4", "3:9-3:12|0|1|4", "7:13-7:16|0|1|4"] + "uses": ["2:14-2:17|0|1|4|-1", "3:9-3:12|0|1|4|-1", "7:13-7:16|0|1|4|-1"] }, { "usr": 15466821155413653804, "detailed_name": "typedef Foo Foo2", @@ -131,8 +131,8 @@ OUTPUT: "short_name": "Foo2", "kind": 252, "declarations": [], - "spell": "3:13-3:17|0|1|2", - "extent": "3:1-3:17|0|1|0", + "spell": "3:13-3:17|0|1|2|-1", + "extent": "3:1-3:17|0|1|0|-1", "alias_of": 15041163540773201510, "bases": [], "derived": [], @@ -140,7 +140,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["9:14-9:18|0|1|4"] + "uses": ["9:14-9:18|0|1|4|-1"] }, { "usr": 17897026942631673064, "detailed_name": "using Foo3 = Foo1", @@ -148,8 +148,8 @@ OUTPUT: "short_name": "Foo3", "kind": 252, "declarations": [], - "spell": "4:7-4:11|0|1|2", - "extent": "4:1-4:18|0|1|0", + "spell": "4:7-4:11|0|1|2|-1", + "extent": "4:1-4:18|0|1|0|-1", "alias_of": 1544499294580512394, "bases": [], "derived": [], @@ -157,7 +157,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["10:14-10:18|0|1|4"] + "uses": ["10:14-10:18|0|1|4|-1"] }], "usr2var": [] } 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 c9328477..e7043557 100644 --- a/index_tests/usage/type_usage_typedef_and_using_template.cc +++ b/index_tests/usage/type_usage_typedef_and_using_template.cc @@ -17,8 +17,8 @@ OUTPUT: "short_name": "Foo1", "kind": 252, "declarations": [], - "spell": "4:7-4:11|0|1|2", - "extent": "4:1-4:22|0|1|0", + "spell": "4:7-4:11|0|1|2|-1", + "extent": "4:1-4:22|0|1|0|-1", "alias_of": 5123806965838456033, "bases": [], "derived": [], @@ -26,7 +26,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["5:13-5:17|0|1|4"] + "uses": ["5:13-5:17|0|1|4|-1"] }, { "usr": 5123806965838456033, "detailed_name": "template<> struct Foo", @@ -41,14 +41,14 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["4:14-4:17|0|1|4"] + "uses": ["4:14-4:17|0|1|4|-1"] }, { "usr": 10528472276654770367, "detailed_name": "struct Foo", "qual_name_offset": 7, "short_name": "Foo", "kind": 23, - "declarations": ["2:8-2:11|0|1|1"], + "declarations": ["2:8-2:11|2:1-2:11|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -71,7 +71,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["5:9-5:12|0|1|4"] + "uses": ["5:9-5:12|0|1|4|-1"] }, { "usr": 15933698173231330933, "detailed_name": "typedef Foo Foo2", @@ -79,8 +79,8 @@ OUTPUT: "short_name": "Foo2", "kind": 252, "declarations": [], - "spell": "5:19-5:23|0|1|2", - "extent": "5:1-5:23|0|1|0", + "spell": "5:19-5:23|0|1|2|-1", + "extent": "5:1-5:23|0|1|0|-1", "alias_of": 14491685842684954828, "bases": [], "derived": [], diff --git a/index_tests/usage/type_usage_various.cc b/index_tests/usage/type_usage_various.cc index fead6f19..5baaf0f8 100644 --- a/index_tests/usage/type_usage_various.cc +++ b/index_tests/usage/type_usage_various.cc @@ -21,9 +21,9 @@ OUTPUT: "short_name": "make", "kind": 6, "storage": 0, - "declarations": ["2:8-2:12|15041163540773201510|2|1025"], - "spell": "5:11-5:15|15041163540773201510|2|1026", - "extent": "5:1-8:2|15041163540773201510|2|0", + "declarations": ["2:8-2:12|2:3-2:14|15041163540773201510|2|1025|-1"], + "spell": "5:11-5:15|15041163540773201510|2|1026|-1", + "extent": "5:1-8:2|15041163540773201510|2|0|-1", "bases": [], "derived": [], "vars": [16380484338511689669], @@ -37,8 +37,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -46,14 +46,14 @@ OUTPUT: "funcs": [9488177941273031343], "vars": [], "instances": [16380484338511689669, 14455976355866885943], - "uses": ["2:3-2:6|15041163540773201510|2|4", "5:1-5:4|0|1|4", "5:6-5:9|0|1|4", "6:3-6:6|9488177941273031343|3|4", "10:8-10:11|0|1|4"] + "uses": ["2:3-2:6|15041163540773201510|2|4|-1", "5:1-5:4|0|1|4|-1", "5:6-5:9|0|1|4|-1", "6:3-6:6|9488177941273031343|3|4|-1", "10:8-10:11|0|1|4|-1"] }], "usr2var": [{ "usr": 14455976355866885943, "detailed_name": "extern Foo foo", "qual_name_offset": 11, "short_name": "foo", - "declarations": ["10:12-10:15|0|1|1"], + "declarations": ["10:12-10:15|10:1-10:15|0|1|1|-1"], "type": 15041163540773201510, "uses": [], "kind": 13, @@ -64,8 +64,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "f", "declarations": [], - "spell": "6:7-6:8|9488177941273031343|3|2", - "extent": "6:3-6:8|9488177941273031343|3|0", + "spell": "6:7-6:8|9488177941273031343|3|2|-1", + "extent": "6:3-6:8|9488177941273031343|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, diff --git a/index_tests/usage/usage_inside_of_call.cc b/index_tests/usage/usage_inside_of_call.cc index 036671a4..39ef7456 100644 --- a/index_tests/usage/usage_inside_of_call.cc +++ b/index_tests/usage/usage_inside_of_call.cc @@ -27,8 +27,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "12:6-12:9|0|1|2", - "extent": "12:1-15:2|0|1|0", + "spell": "12:6-12:9|0|1|2|-1", + "extent": "12:1-15:2|0|1|0|-1", "bases": [], "derived": [], "vars": [8039186520399841081], @@ -41,11 +41,11 @@ OUTPUT: "short_name": "gen", "kind": 12, "storage": 0, - "declarations": ["3:5-3:8|0|1|1"], + "declarations": ["3:5-3:8|3:1-3:10|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["14:14-14:17|4259594751088586730|3|16420"], + "uses": ["14:14-14:17|4259594751088586730|3|16420|-1"], "callees": [] }, { "usr": 18319417758892371313, @@ -54,11 +54,11 @@ OUTPUT: "short_name": "called", "kind": 12, "storage": 0, - "declarations": ["1:6-1:12|0|1|1"], + "declarations": ["1:6-1:12|1:1-1:19|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["14:3-14:9|4259594751088586730|3|16420"], + "uses": ["14:3-14:9|4259594751088586730|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -83,8 +83,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "5:8-5:11|0|1|2", - "extent": "5:1-8:2|0|1|0", + "spell": "5:8-5:11|0|1|2|-1", + "extent": "5:1-8:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -95,7 +95,7 @@ OUTPUT: "R": 0 }], "instances": [], - "uses": ["10:5-10:8|0|1|4", "14:22-14:25|4259594751088586730|3|4", "14:40-14:43|4259594751088586730|3|4"] + "uses": ["10:5-10:8|0|1|4|-1", "14:22-14:25|4259594751088586730|3|4|-1", "14:40-14:43|4259594751088586730|3|4|-1"] }], "usr2var": [{ "usr": 8039186520399841081, @@ -104,10 +104,10 @@ OUTPUT: "short_name": "a", "hover": "int a = 5", "declarations": [], - "spell": "13:7-13:8|4259594751088586730|3|2", - "extent": "13:3-13:12|4259594751088586730|3|0", + "spell": "13:7-13:8|4259594751088586730|3|2|-1", + "extent": "13:3-13:12|4259594751088586730|3|0|-1", "type": 53, - "uses": ["14:10-14:11|4259594751088586730|3|12"], + "uses": ["14:10-14:11|4259594751088586730|3|12|-1"], "kind": 13, "storage": 0 }, { @@ -116,10 +116,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "field_var", "declarations": [], - "spell": "7:7-7:16|15041163540773201510|2|1026", - "extent": "7:3-7:16|15041163540773201510|2|0", + "spell": "7:7-7:16|15041163540773201510|2|1026|-1", + "extent": "7:3-7:16|15041163540773201510|2|0|-1", "type": 53, - "uses": ["14:28-14:37|4259594751088586730|3|12"], + "uses": ["14:28-14:37|4259594751088586730|3|12|-1"], "kind": 8, "storage": 0 }, { @@ -127,11 +127,11 @@ OUTPUT: "detailed_name": "static int Foo::static_var", "qual_name_offset": 11, "short_name": "static_var", - "declarations": ["6:14-6:24|15041163540773201510|2|1025"], - "spell": "10:10-10:20|15041163540773201510|2|1026", - "extent": "10:1-10:24|15041163540773201510|2|0", + "declarations": ["6:14-6:24|6:3-6:24|15041163540773201510|2|1025|-1"], + "spell": "10:10-10:20|15041163540773201510|2|1026|-1", + "extent": "10:1-10:24|15041163540773201510|2|0|-1", "type": 53, - "uses": ["14:45-14:55|4259594751088586730|3|12"], + "uses": ["14:45-14:55|4259594751088586730|3|12|-1"], "kind": 13, "storage": 2 }] diff --git a/index_tests/usage/usage_inside_of_call_simple.cc b/index_tests/usage/usage_inside_of_call_simple.cc index 9bb67ba9..db2c738e 100644 --- a/index_tests/usage/usage_inside_of_call_simple.cc +++ b/index_tests/usage/usage_inside_of_call_simple.cc @@ -19,8 +19,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "5:6-5:9|0|1|2", - "extent": "5:1-7:2|0|1|0", + "spell": "5:6-5:9|0|1|2|-1", + "extent": "5:1-7:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -34,12 +34,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:5-3:8|0|1|2", - "extent": "3:1-3:24|0|1|0", + "spell": "3:5-3:8|0|1|2|-1", + "extent": "3:1-3:24|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["6:10-6:13|4259594751088586730|3|16420", "6:18-6:21|4259594751088586730|3|16420"], + "uses": ["6:10-6:13|4259594751088586730|3|16420|-1", "6:18-6:21|4259594751088586730|3|16420|-1"], "callees": [] }, { "usr": 18319417758892371313, @@ -48,11 +48,11 @@ OUTPUT: "short_name": "called", "kind": 12, "storage": 0, - "declarations": ["1:6-1:12|0|1|1"], + "declarations": ["1:6-1:12|1:1-1:19|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["6:3-6:9|4259594751088586730|3|16420"], + "uses": ["6:3-6:9|4259594751088586730|3|16420|-1"], "callees": [] }], "usr2type": [], diff --git a/index_tests/usage/var_usage_call_function.cc b/index_tests/usage/var_usage_call_function.cc index 5ac9d0fa..e28d0954 100644 --- a/index_tests/usage/var_usage_call_function.cc +++ b/index_tests/usage/var_usage_call_function.cc @@ -20,12 +20,12 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:12|0|1|2", - "extent": "1:1-1:17|0|1|0", + "spell": "1:6-1:12|0|1|2|-1", + "extent": "1:1-1:17|0|1|0|-1", "bases": [], "derived": [], "vars": [], - "uses": ["4:13-4:19|11404881820527069090|3|132", "7:3-7:9|11404881820527069090|3|16420"], + "uses": ["4:13-4:19|11404881820527069090|3|132|-1", "7:3-7:9|11404881820527069090|3|16420|-1"], "callees": [] }, { "usr": 11404881820527069090, @@ -35,8 +35,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:12|0|1|2", - "extent": "3:1-8:2|0|1|0", + "spell": "3:6-3:12|0|1|2|-1", + "extent": "3:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [9121974011454213596], @@ -51,10 +51,10 @@ OUTPUT: "short_name": "x", "hover": "auto x = &called", "declarations": [], - "spell": "4:8-4:9|11404881820527069090|3|2", - "extent": "4:3-4:19|11404881820527069090|3|0", + "spell": "4:8-4:9|11404881820527069090|3|2|-1", + "extent": "4:3-4:19|11404881820527069090|3|0|-1", "type": 0, - "uses": ["5:3-5:4|11404881820527069090|3|16428"], + "uses": ["5:3-5:4|11404881820527069090|3|16428|-1"], "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 93667b6d..1a25fe9f 100644 --- a/index_tests/usage/var_usage_class_member.cc +++ b/index_tests/usage/var_usage_class_member.cc @@ -30,8 +30,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "10:6-10:9|0|1|2", - "extent": "10:1-18:2|0|1|0", + "spell": "10:6-10:9|0|1|2|-1", + "extent": "10:1-18:2|0|1|0|-1", "bases": [], "derived": [], "vars": [14669930844300034456], @@ -44,11 +44,11 @@ OUTPUT: "short_name": "accept", "kind": 12, "storage": 0, - "declarations": ["8:6-8:12|0|1|1"], + "declarations": ["8:6-8:12|8:1-8:18|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["16:3-16:9|4259594751088586730|3|16420"], + "uses": ["16:3-16:9|4259594751088586730|3|16420|-1"], "callees": [] }, { "usr": 17175780305784503374, @@ -57,11 +57,11 @@ OUTPUT: "short_name": "accept", "kind": 12, "storage": 0, - "declarations": ["7:6-7:12|0|1|1"], + "declarations": ["7:6-7:12|7:1-7:17|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["14:3-14:9|4259594751088586730|3|16420", "15:3-15:9|4259594751088586730|3|16420", "17:3-17:9|4259594751088586730|3|16420"], + "uses": ["14:3-14:9|4259594751088586730|3|16420|-1", "15:3-15:9|4259594751088586730|3|16420|-1", "17:3-17:9|4259594751088586730|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -86,8 +86,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-5:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -101,7 +101,7 @@ OUTPUT: "R": 32 }], "instances": [14669930844300034456], - "uses": ["11:3-11:6|4259594751088586730|3|4"] + "uses": ["11:3-11:6|4259594751088586730|3|4|-1"] }], "usr2var": [{ "usr": 3873837747174060388, @@ -109,10 +109,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "y", "declarations": [], - "spell": "4:7-4:8|15041163540773201510|2|1026", - "extent": "4:3-4:8|15041163540773201510|2|0", + "spell": "4:7-4:8|15041163540773201510|2|1026|-1", + "extent": "4:3-4:8|15041163540773201510|2|0|-1", "type": 53, - "uses": ["17:12-17:13|4259594751088586730|3|12"], + "uses": ["17:12-17:13|4259594751088586730|3|12|-1"], "kind": 8, "storage": 0 }, { @@ -121,10 +121,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "x", "declarations": [], - "spell": "3:7-3:8|15041163540773201510|2|1026", - "extent": "3:3-3:8|15041163540773201510|2|0", + "spell": "3:7-3:8|15041163540773201510|2|1026|-1", + "extent": "3:3-3:8|15041163540773201510|2|0|-1", "type": 53, - "uses": ["12:5-12:6|4259594751088586730|3|20", "13:5-13:6|4259594751088586730|3|4", "14:12-14:13|4259594751088586730|3|12", "15:12-15:13|4259594751088586730|3|12", "16:13-16:14|4259594751088586730|3|132"], + "uses": ["12:5-12:6|4259594751088586730|3|20|-1", "13:5-13:6|4259594751088586730|3|4|-1", "14:12-14:13|4259594751088586730|3|12|-1", "15:12-15:13|4259594751088586730|3|12|-1", "16:13-16:14|4259594751088586730|3|132|-1"], "kind": 8, "storage": 0 }, { @@ -133,10 +133,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "f", "declarations": [], - "spell": "11:7-11:8|4259594751088586730|3|2", - "extent": "11:3-11:8|4259594751088586730|3|0", + "spell": "11:7-11:8|4259594751088586730|3|2|-1", + "extent": "11:3-11:8|4259594751088586730|3|0|-1", "type": 15041163540773201510, - "uses": ["12:3-12:4|4259594751088586730|3|4", "13:3-13:4|4259594751088586730|3|4", "14:10-14:11|4259594751088586730|3|4", "15:10-15:11|4259594751088586730|3|4", "16:11-16:12|4259594751088586730|3|4", "17:10-17:11|4259594751088586730|3|4"], + "uses": ["12:3-12:4|4259594751088586730|3|4|-1", "13:3-13:4|4259594751088586730|3|4|-1", "14:10-14:11|4259594751088586730|3|4|-1", "15:10-15:11|4259594751088586730|3|4|-1", "16:11-16:12|4259594751088586730|3|4|-1", "17:10-17:11|4259594751088586730|3|4|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/usage/var_usage_class_member_static.cc b/index_tests/usage/var_usage_class_member_static.cc index 6f2eee7d..8c21456f 100644 --- a/index_tests/usage/var_usage_class_member_static.cc +++ b/index_tests/usage/var_usage_class_member_static.cc @@ -21,8 +21,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "7:6-7:9|0|1|2", - "extent": "7:1-9:2|0|1|0", + "spell": "7:6-7:9|0|1|2|-1", + "extent": "7:1-9:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -35,11 +35,11 @@ OUTPUT: "short_name": "accept", "kind": 12, "storage": 0, - "declarations": ["5:6-5:12|0|1|1"], + "declarations": ["5:6-5:12|5:1-5:17|0|1|1|-1"], "bases": [], "derived": [], "vars": [], - "uses": ["8:3-8:9|4259594751088586730|3|16420"], + "uses": ["8:3-8:9|4259594751088586730|3|16420|-1"], "callees": [] }], "usr2type": [{ @@ -64,8 +64,8 @@ OUTPUT: "short_name": "Foo", "kind": 23, "declarations": [], - "spell": "1:8-1:11|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:8-1:11|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -73,16 +73,16 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["8:10-8:13|4259594751088586730|3|4"] + "uses": ["8:10-8:13|4259594751088586730|3|4|-1"] }], "usr2var": [{ "usr": 8599782646965457351, "detailed_name": "static int Foo::x", "qual_name_offset": 11, "short_name": "x", - "declarations": ["2:14-2:15|15041163540773201510|2|1025"], + "declarations": ["2:14-2:15|2:3-2:15|15041163540773201510|2|1025|-1"], "type": 53, - "uses": ["8:15-8:16|4259594751088586730|3|12"], + "uses": ["8:15-8:16|4259594751088586730|3|12|-1"], "kind": 13, "storage": 2 }] diff --git a/index_tests/usage/var_usage_cstyle_cast.cc b/index_tests/usage/var_usage_cstyle_cast.cc index 09991182..dd3fe708 100644 --- a/index_tests/usage/var_usage_cstyle_cast.cc +++ b/index_tests/usage/var_usage_cstyle_cast.cc @@ -20,8 +20,8 @@ OUTPUT: "short_name": "VarType", "kind": 10, "declarations": [], - "spell": "1:6-1:13|0|1|2", - "extent": "1:1-1:16|0|1|0", + "spell": "1:6-1:13|0|1|2|-1", + "extent": "1:1-1:16|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -29,7 +29,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [7057400933868440116, 7057400933868440116], - "uses": ["4:20-4:27|10028537921178202800|2|4", "4:42-4:49|10028537921178202800|2|4", "7:7-7:14|0|1|4"] + "uses": ["4:20-4:27|10028537921178202800|2|4|-1", "4:42-4:49|10028537921178202800|2|4|-1", "7:7-7:14|0|1|4|-1"] }, { "usr": 10028537921178202800, "detailed_name": "struct Holder {}", @@ -37,8 +37,8 @@ OUTPUT: "short_name": "Holder", "kind": 23, "declarations": [], - "spell": "3:8-3:14|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:8-3:14|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -46,7 +46,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["7:15-7:21|0|1|4"] + "uses": ["7:15-7:21|0|1|4|-1"] }], "usr2var": [{ "usr": 7057400933868440116, @@ -54,9 +54,9 @@ 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|1025"], - "spell": "7:23-7:33|10028537921178202800|2|1026", - "extent": "7:1-7:33|10028537921178202800|2|0", + "declarations": ["4:28-4:38|4:3-4:53|10028537921178202800|2|1025|-1"], + "spell": "7:23-7:33|10028537921178202800|2|1026|-1", + "extent": "7:1-7:33|10028537921178202800|2|0|-1", "type": 5792006888140599735, "uses": [], "kind": 13, diff --git a/index_tests/usage/var_usage_extern.cc b/index_tests/usage/var_usage_extern.cc index 09442598..0d3469e6 100644 --- a/index_tests/usage/var_usage_extern.cc +++ b/index_tests/usage/var_usage_extern.cc @@ -16,8 +16,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -45,9 +45,9 @@ OUTPUT: "detailed_name": "extern int a", "qual_name_offset": 11, "short_name": "a", - "declarations": ["1:12-1:13|0|1|1"], + "declarations": ["1:12-1:13|1:1-1:13|0|1|1|-1"], "type": 53, - "uses": ["4:3-4:4|4259594751088586730|3|20"], + "uses": ["4:3-4:4|4259594751088586730|3|20|-1"], "kind": 13, "storage": 1 }] diff --git a/index_tests/usage/var_usage_func_parameter.cc b/index_tests/usage/var_usage_func_parameter.cc index 9bfd50aa..2a5e0867 100644 --- a/index_tests/usage/var_usage_func_parameter.cc +++ b/index_tests/usage/var_usage_func_parameter.cc @@ -14,8 +14,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "bases": [], "derived": [], "vars": [10063793875496522529], @@ -44,10 +44,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "1:14-1:15|11998306017310352355|3|1026", - "extent": "1:10-1:15|11998306017310352355|3|0", + "spell": "1:14-1:15|11998306017310352355|3|1026|-1", + "extent": "1:10-1:15|11998306017310352355|3|0|-1", "type": 53, - "uses": ["2:3-2:4|11998306017310352355|3|4"], + "uses": ["2:3-2:4|11998306017310352355|3|4|-1"], "kind": 253, "storage": 0 }] diff --git a/index_tests/usage/var_usage_local.cc b/index_tests/usage/var_usage_local.cc index f6eb9d02..b4ed3842 100644 --- a/index_tests/usage/var_usage_local.cc +++ b/index_tests/usage/var_usage_local.cc @@ -15,8 +15,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-4:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-4:2|0|1|0|-1", "bases": [], "derived": [], "vars": [14014650769929566957], @@ -45,10 +45,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "x", "declarations": [], - "spell": "2:7-2:8|4259594751088586730|3|2", - "extent": "2:3-2:8|4259594751088586730|3|0", + "spell": "2:7-2:8|4259594751088586730|3|2|-1", + "extent": "2:3-2:8|4259594751088586730|3|0|-1", "type": 53, - "uses": ["3:3-3:4|4259594751088586730|3|20"], + "uses": ["3:3-3:4|4259594751088586730|3|20|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/usage/var_usage_shadowed_local.cc b/index_tests/usage/var_usage_shadowed_local.cc index d0f9a35f..2aaf27be 100644 --- a/index_tests/usage/var_usage_shadowed_local.cc +++ b/index_tests/usage/var_usage_shadowed_local.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-9:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-9:2|0|1|0|-1", "bases": [], "derived": [], "vars": [13311055950748663970, 14036425367303419504], @@ -50,10 +50,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "2:7-2:8|4259594751088586730|3|2", - "extent": "2:3-2:8|4259594751088586730|3|0", + "spell": "2:7-2:8|4259594751088586730|3|2|-1", + "extent": "2:3-2:8|4259594751088586730|3|0|-1", "type": 53, - "uses": ["3:3-3:4|4259594751088586730|3|20", "8:3-8:4|4259594751088586730|3|20"], + "uses": ["3:3-3:4|4259594751088586730|3|20|-1", "8:3-8:4|4259594751088586730|3|20|-1"], "kind": 13, "storage": 0 }, { @@ -62,10 +62,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "5:9-5:10|4259594751088586730|3|2", - "extent": "5:5-5:10|4259594751088586730|3|0", + "spell": "5:9-5:10|4259594751088586730|3|2|-1", + "extent": "5:5-5:10|4259594751088586730|3|0|-1", "type": 53, - "uses": ["6:5-6:6|4259594751088586730|3|20"], + "uses": ["6:5-6:6|4259594751088586730|3|20|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/usage/var_usage_shadowed_parameter.cc b/index_tests/usage/var_usage_shadowed_parameter.cc index 8a99171d..801f3a75 100644 --- a/index_tests/usage/var_usage_shadowed_parameter.cc +++ b/index_tests/usage/var_usage_shadowed_parameter.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-8:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-8:2|0|1|0|-1", "bases": [], "derived": [], "vars": [11608231465452906059, 6997229590862003559], @@ -50,10 +50,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "4:9-4:10|11998306017310352355|3|2", - "extent": "4:5-4:10|11998306017310352355|3|0", + "spell": "4:9-4:10|11998306017310352355|3|2|-1", + "extent": "4:5-4:10|11998306017310352355|3|0|-1", "type": 53, - "uses": ["5:5-5:6|11998306017310352355|3|20"], + "uses": ["5:5-5:6|11998306017310352355|3|20|-1"], "kind": 13, "storage": 0 }, { @@ -62,10 +62,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "1:14-1:15|11998306017310352355|3|1026", - "extent": "1:10-1:15|11998306017310352355|3|0", + "spell": "1:14-1:15|11998306017310352355|3|1026|-1", + "extent": "1:10-1:15|11998306017310352355|3|0|-1", "type": 53, - "uses": ["2:3-2:4|11998306017310352355|3|20", "7:3-7:4|11998306017310352355|3|20"], + "uses": ["2:3-2:4|11998306017310352355|3|20|-1", "7:3-7:4|11998306017310352355|3|20|-1"], "kind": 253, "storage": 0 }] diff --git a/index_tests/usage/var_usage_static.cc b/index_tests/usage/var_usage_static.cc index 9c825830..396f3ded 100644 --- a/index_tests/usage/var_usage_static.cc +++ b/index_tests/usage/var_usage_static.cc @@ -17,8 +17,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [], @@ -47,10 +47,10 @@ OUTPUT: "qual_name_offset": 11, "short_name": "a", "declarations": [], - "spell": "1:12-1:13|0|1|2", - "extent": "1:1-1:13|0|1|0", + "spell": "1:12-1:13|0|1|2|-1", + "extent": "1:1-1:13|0|1|0|-1", "type": 53, - "uses": ["4:3-4:4|4259594751088586730|3|20"], + "uses": ["4:3-4:4|4259594751088586730|3|20|-1"], "kind": 13, "storage": 2 }] diff --git a/index_tests/vars/class_member.cc b/index_tests/vars/class_member.cc index 4b3925a7..7bb7bc97 100644 --- a/index_tests/vars/class_member.cc +++ b/index_tests/vars/class_member.cc @@ -14,8 +14,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -26,7 +26,7 @@ OUTPUT: "R": 0 }], "instances": [13799811842374292251], - "uses": ["2:3-2:6|15041163540773201510|2|4"] + "uses": ["2:3-2:6|15041163540773201510|2|4|-1"] }], "usr2var": [{ "usr": 13799811842374292251, @@ -34,8 +34,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "member", "declarations": [], - "spell": "2:8-2:14|15041163540773201510|2|1026", - "extent": "2:3-2:14|15041163540773201510|2|0", + "spell": "2:8-2:14|15041163540773201510|2|1026|-1", + "extent": "2:3-2:14|15041163540773201510|2|0|-1", "type": 15041163540773201510, "uses": [], "kind": 8, diff --git a/index_tests/vars/class_static_member.cc b/index_tests/vars/class_static_member.cc index 1dcb0699..86e09041 100644 --- a/index_tests/vars/class_static_member.cc +++ b/index_tests/vars/class_static_member.cc @@ -16,8 +16,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -25,16 +25,16 @@ OUTPUT: "funcs": [], "vars": [], "instances": [5844987037615239736, 5844987037615239736], - "uses": ["2:10-2:13|15041163540773201510|2|4", "4:1-4:4|0|1|4", "4:6-4:9|0|1|4"] + "uses": ["2:10-2:13|15041163540773201510|2|4|-1", "4:1-4:4|0|1|4|-1", "4:6-4:9|0|1|4|-1"] }], "usr2var": [{ "usr": 5844987037615239736, "detailed_name": "static Foo *Foo::member", "qual_name_offset": 12, "short_name": "member", - "declarations": ["2:15-2:21|15041163540773201510|2|1025"], - "spell": "4:11-4:17|15041163540773201510|2|1026", - "extent": "4:1-4:27|15041163540773201510|2|0", + "declarations": ["2:15-2:21|2:3-2:21|15041163540773201510|2|1025|-1"], + "spell": "4:11-4:17|15041163540773201510|2|1026|-1", + "extent": "4:1-4:27|15041163540773201510|2|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, diff --git a/index_tests/vars/class_static_member_decl_only.cc b/index_tests/vars/class_static_member_decl_only.cc index b0f84d67..d01c6220 100644 --- a/index_tests/vars/class_static_member_decl_only.cc +++ b/index_tests/vars/class_static_member_decl_only.cc @@ -29,8 +29,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -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|1025"], + "declarations": ["2:14-2:20|2:3-2:20|15041163540773201510|2|1025|-1"], "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/vars/deduce_auto_type.cc b/index_tests/vars/deduce_auto_type.cc index 3823df90..f76c0460 100644 --- a/index_tests/vars/deduce_auto_type.cc +++ b/index_tests/vars/deduce_auto_type.cc @@ -17,8 +17,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "2:6-2:7|0|1|2", - "extent": "2:1-5:2|0|1|0", + "spell": "2:6-2:7|0|1|2|-1", + "extent": "2:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [10601729374837386290, 18422884837902130475], @@ -32,8 +32,8 @@ OUTPUT: "short_name": "Foo", "kind": 5, "declarations": [], - "spell": "1:7-1:10|0|1|2", - "extent": "1:1-1:13|0|1|0", + "spell": "1:7-1:10|0|1|2|-1", + "extent": "1:1-1:13|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -41,7 +41,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [10601729374837386290, 18422884837902130475], - "uses": ["3:16-3:19|880549676430489861|3|4", "4:17-4:20|880549676430489861|3|4"] + "uses": ["3:16-3:19|880549676430489861|3|4|-1", "4:17-4:20|880549676430489861|3|4|-1"] }], "usr2var": [{ "usr": 10601729374837386290, @@ -50,8 +50,8 @@ OUTPUT: "short_name": "x", "hover": "auto x = new Foo()", "declarations": [], - "spell": "3:8-3:9|880549676430489861|3|2", - "extent": "3:3-3:21|880549676430489861|3|0", + "spell": "3:8-3:9|880549676430489861|3|2|-1", + "extent": "3:3-3:21|880549676430489861|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, @@ -63,8 +63,8 @@ OUTPUT: "short_name": "y", "hover": "Foo *y = new Foo()", "declarations": [], - "spell": "4:9-4:10|880549676430489861|3|2", - "extent": "4:3-4:22|880549676430489861|3|0", + "spell": "4:9-4:10|880549676430489861|3|2|-1", + "extent": "4:3-4:22|880549676430489861|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, diff --git a/index_tests/vars/function_local.cc b/index_tests/vars/function_local.cc index b6197c40..66b96573 100644 --- a/index_tests/vars/function_local.cc +++ b/index_tests/vars/function_local.cc @@ -17,8 +17,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [13198746475679542317], @@ -31,7 +31,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "Foo", "kind": 23, - "declarations": ["1:8-1:11|0|1|1"], + "declarations": ["1:8-1:11|1:1-1:11|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -39,7 +39,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [13198746475679542317], - "uses": ["4:3-4:6|4259594751088586730|3|4"] + "uses": ["4:3-4:6|4259594751088586730|3|4|-1"] }], "usr2var": [{ "usr": 13198746475679542317, @@ -47,8 +47,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "a", "declarations": [], - "spell": "4:8-4:9|4259594751088586730|3|2", - "extent": "4:3-4:9|4259594751088586730|3|0", + "spell": "4:8-4:9|4259594751088586730|3|2|-1", + "extent": "4:3-4:9|4259594751088586730|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 13, diff --git a/index_tests/vars/function_param.cc b/index_tests/vars/function_param.cc index 96a844ad..a9c8683f 100644 --- a/index_tests/vars/function_param.cc +++ b/index_tests/vars/function_param.cc @@ -15,8 +15,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-3:30|0|1|0", + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-3:30|0|1|0|-1", "bases": [], "derived": [], "vars": [8730439006497971620, 2525014371090380500], @@ -29,7 +29,7 @@ OUTPUT: "qual_name_offset": 7, "short_name": "Foo", "kind": 23, - "declarations": ["1:8-1:11|0|1|1"], + "declarations": ["1:8-1:11|1:1-1:11|0|1|1|-1"], "alias_of": 0, "bases": [], "derived": [], @@ -37,7 +37,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [8730439006497971620, 2525014371090380500], - "uses": ["3:10-3:13|0|1|4", "3:19-3:22|0|1|4"] + "uses": ["3:10-3:13|0|1|4|-1", "3:19-3:22|0|1|4|-1"] }], "usr2var": [{ "usr": 2525014371090380500, @@ -45,8 +45,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "p1", "declarations": [], - "spell": "3:24-3:26|8908726657907936744|3|1026", - "extent": "3:19-3:26|8908726657907936744|3|0", + "spell": "3:24-3:26|8908726657907936744|3|1026|-1", + "extent": "3:19-3:26|8908726657907936744|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 253, @@ -57,8 +57,8 @@ OUTPUT: "qual_name_offset": 5, "short_name": "p0", "declarations": [], - "spell": "3:15-3:17|8908726657907936744|3|1026", - "extent": "3:10-3:17|8908726657907936744|3|0", + "spell": "3:15-3:17|8908726657907936744|3|1026|-1", + "extent": "3:10-3:17|8908726657907936744|3|0|-1", "type": 15041163540773201510, "uses": [], "kind": 253, diff --git a/index_tests/vars/function_param_unnamed.cc b/index_tests/vars/function_param_unnamed.cc index 6ecfe2fa..48b4f60b 100644 --- a/index_tests/vars/function_param_unnamed.cc +++ b/index_tests/vars/function_param_unnamed.cc @@ -12,8 +12,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-1:22|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-1:22|0|1|0|-1", "bases": [], "derived": [], "vars": [], diff --git a/index_tests/vars/function_shadow_local.cc b/index_tests/vars/function_shadow_local.cc index 27c7b00b..d6ffa4ef 100644 --- a/index_tests/vars/function_shadow_local.cc +++ b/index_tests/vars/function_shadow_local.cc @@ -20,8 +20,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-9:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-9:2|0|1|0|-1", "bases": [], "derived": [], "vars": [1894874819807168345, 4508045017817092115], @@ -50,10 +50,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "2:7-2:8|4259594751088586730|3|2", - "extent": "2:3-2:8|4259594751088586730|3|0", + "spell": "2:7-2:8|4259594751088586730|3|2|-1", + "extent": "2:3-2:8|4259594751088586730|3|0|-1", "type": 53, - "uses": ["3:3-3:4|4259594751088586730|3|20", "8:3-8:4|4259594751088586730|3|20"], + "uses": ["3:3-3:4|4259594751088586730|3|20|-1", "8:3-8:4|4259594751088586730|3|20|-1"], "kind": 13, "storage": 0 }, { @@ -62,10 +62,10 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "declarations": [], - "spell": "5:9-5:10|4259594751088586730|3|2", - "extent": "5:5-5:10|4259594751088586730|3|0", + "spell": "5:9-5:10|4259594751088586730|3|2|-1", + "extent": "5:5-5:10|4259594751088586730|3|0|-1", "type": 53, - "uses": ["6:5-6:6|4259594751088586730|3|20"], + "uses": ["6:5-6:6|4259594751088586730|3|20|-1"], "kind": 13, "storage": 0 }] diff --git a/index_tests/vars/function_shadow_param.cc b/index_tests/vars/function_shadow_param.cc index f2d52211..9ef35ec9 100644 --- a/index_tests/vars/function_shadow_param.cc +++ b/index_tests/vars/function_shadow_param.cc @@ -14,8 +14,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "1:6-1:9|0|1|2", - "extent": "1:1-3:2|0|1|0", + "spell": "1:6-1:9|0|1|2|-1", + "extent": "1:1-3:2|0|1|0|-1", "bases": [], "derived": [], "vars": [5875271969926422921, 11404600766177939811], @@ -44,8 +44,8 @@ OUTPUT: "qual_name_offset": 4, "short_name": "p", "declarations": [], - "spell": "1:14-1:15|11998306017310352355|3|1026", - "extent": "1:10-1:15|11998306017310352355|3|0", + "spell": "1:14-1:15|11998306017310352355|3|1026|-1", + "extent": "1:10-1:15|11998306017310352355|3|0|-1", "type": 53, "uses": [], "kind": 253, @@ -57,8 +57,8 @@ OUTPUT: "short_name": "p", "hover": "int p = 0", "declarations": [], - "spell": "2:9-2:10|11998306017310352355|3|2", - "extent": "2:5-2:14|11998306017310352355|3|0", + "spell": "2:9-2:10|11998306017310352355|3|2|-1", + "extent": "2:5-2:14|11998306017310352355|3|0|-1", "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/vars/global_variable.cc b/index_tests/vars/global_variable.cc index c76dd406..0f563a73 100644 --- a/index_tests/vars/global_variable.cc +++ b/index_tests/vars/global_variable.cc @@ -28,8 +28,8 @@ OUTPUT: "short_name": "global", "hover": "static int global = 0", "declarations": [], - "spell": "1:12-1:18|0|1|2", - "extent": "1:1-1:22|0|1|0", + "spell": "1:12-1:18|0|1|2|-1", + "extent": "1:1-1:22|0|1|0|-1", "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/vars/global_variable_decl_only.cc b/index_tests/vars/global_variable_decl_only.cc index 8ca10b9e..0ecf84a2 100644 --- a/index_tests/vars/global_variable_decl_only.cc +++ b/index_tests/vars/global_variable_decl_only.cc @@ -26,7 +26,7 @@ OUTPUT: "detailed_name": "extern int global", "qual_name_offset": 11, "short_name": "global", - "declarations": ["1:12-1:18|0|1|1"], + "declarations": ["1:12-1:18|1:1-1:18|0|1|1|-1"], "type": 53, "uses": [], "kind": 13, diff --git a/index_tests/vars/type_instance_on_using_type.cc b/index_tests/vars/type_instance_on_using_type.cc index 7a6ebcf6..b924afd5 100644 --- a/index_tests/vars/type_instance_on_using_type.cc +++ b/index_tests/vars/type_instance_on_using_type.cc @@ -19,8 +19,8 @@ OUTPUT: "kind": 12, "storage": 0, "declarations": [], - "spell": "3:6-3:9|0|1|2", - "extent": "3:1-5:2|0|1|0", + "spell": "3:6-3:9|0|1|2|-1", + "extent": "3:1-5:2|0|1|0|-1", "bases": [], "derived": [], "vars": [6975456769752895964], @@ -34,8 +34,8 @@ OUTPUT: "short_name": "S", "kind": 23, "declarations": [], - "spell": "1:8-1:9|0|1|2", - "extent": "1:1-1:12|0|1|0", + "spell": "1:8-1:9|0|1|2|-1", + "extent": "1:1-1:12|0|1|0|-1", "alias_of": 0, "bases": [], "derived": [], @@ -43,7 +43,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [], - "uses": ["2:11-2:12|0|1|4"] + "uses": ["2:11-2:12|0|1|4|-1"] }, { "usr": 7434820806199665424, "detailed_name": "using F = S", @@ -51,8 +51,8 @@ OUTPUT: "short_name": "F", "kind": 252, "declarations": [], - "spell": "2:7-2:8|0|1|2", - "extent": "2:1-2:12|0|1|0", + "spell": "2:7-2:8|0|1|2|-1", + "extent": "2:1-2:12|0|1|0|-1", "alias_of": 4750332761459066907, "bases": [], "derived": [], @@ -60,7 +60,7 @@ OUTPUT: "funcs": [], "vars": [], "instances": [6975456769752895964], - "uses": ["4:3-4:4|4654328188330986029|3|4"] + "uses": ["4:3-4:4|4654328188330986029|3|4|-1"] }], "usr2var": [{ "usr": 6975456769752895964, @@ -68,8 +68,8 @@ OUTPUT: "qual_name_offset": 2, "short_name": "a", "declarations": [], - "spell": "4:5-4:6|4654328188330986029|3|2", - "extent": "4:3-4:6|4654328188330986029|3|0", + "spell": "4:5-4:6|4654328188330986029|3|2|-1", + "extent": "4:3-4:6|4654328188330986029|3|0|-1", "type": 7434820806199665424, "uses": [], "kind": 13, diff --git a/src/indexer.cc b/src/indexer.cc index 4b73ba71..a77ab524 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -671,12 +671,13 @@ public: SourceRange R = OrigD->getSourceRange(); entity->def.extent = GetUse(db, lid, - R.getBegin().isFileID() - ? FromTokenRange(SM, Lang, OrigD->getSourceRange()) - : loc, + R.getBegin().isFileID() ? FromTokenRange(SM, Lang, R) : loc, LexDC, Role::None); } else if (is_decl) { - entity->declarations.push_back(GetUse(db, lid, loc, LexDC, role)); + DeclRef &dr = entity->declarations.emplace_back(); + static_cast(dr) = GetUse(db, lid, loc, LexDC, role); + SourceRange R = OrigD->getSourceRange(); + dr.extent = R.getBegin().isFileID() ? FromTokenRange(SM, Lang, R) : loc; } else { entity->uses.push_back(GetUse(db, lid, loc, LexDC, role)); return; @@ -1070,8 +1071,11 @@ public: IndexVar &var = db->ToVar(usr); auto range = FromTokenRange(SM, Lang, {L, L}, &UniqueID); var.def.kind = lsSymbolKind::Macro; - if (var.def.spell) - var.declarations.push_back(*var.def.spell); + if (var.def.spell) { + DeclRef &d = var.declarations.emplace_back(); + static_cast(d) = *var.def.spell; + d.extent = var.def.spell->range; + } var.def.spell = Use{{range, 0, SymbolKind::File, Role::Definition}}; const MacroInfo *MI = MD->getMacroInfo(); SourceRange R(MI->getDefinitionLoc(), MI->getDefinitionEndLoc()); @@ -1133,8 +1137,8 @@ public: }; } // namespace -const int IndexFile::kMajorVersion = 17; -const int IndexFile::kMinorVersion = 1; +const int IndexFile::kMajorVersion = 18; +const int IndexFile::kMinorVersion = 0; IndexFile::IndexFile(llvm::sys::fs::UniqueID UniqueID, const std::string &path, const std::string &contents) @@ -1324,8 +1328,7 @@ void Reflect(Reader &vis, Use &v) { v.usr = strtoull(s + 1, &s, 10); v.kind = static_cast(strtol(s + 1, &s, 10)); v.role = static_cast(strtol(s + 1, &s, 10)); - if (*s == '|') - v.file_id = static_cast(strtol(s + 1, &s, 10)); + v.file_id = static_cast(strtol(s + 1, &s, 10)); } else { Reflect(vis, static_cast(v)); Reflect(vis, v.file_id); @@ -1334,13 +1337,9 @@ void Reflect(Reader &vis, Use &v) { void Reflect(Writer &vis, Use &v) { if (vis.Format() == SerializeFormat::Json) { char buf[99]; - if (v.file_id == -1) - snprintf(buf, sizeof buf, "%s|%" PRIu64 "|%d|%d", - v.range.ToString().c_str(), v.usr, int(v.kind), int(v.role)); - else - snprintf(buf, sizeof buf, "%s|%" PRIu64 "|%d|%d|%d", - v.range.ToString().c_str(), v.usr, int(v.kind), int(v.role), - v.file_id); + snprintf(buf, sizeof buf, "%s|%" PRIu64 "|%d|%d|%d", + v.range.ToString().c_str(), v.usr, int(v.kind), int(v.role), + v.file_id); std::string s(buf); Reflect(vis, s); } else { @@ -1348,3 +1347,34 @@ void Reflect(Writer &vis, Use &v) { Reflect(vis, v.file_id); } } + +void Reflect(Reader &vis, DeclRef &v) { + if (vis.Format() == SerializeFormat::Json) { + std::string t = vis.GetString(); + char *s = const_cast(t.c_str()); + v.range = Range::FromString(s); + s = strchr(s, '|') + 1; + v.extent = Range::FromString(s); + s = strchr(s, '|') + 1; + v.usr = strtoull(s, &s, 10); + v.kind = static_cast(strtol(s + 1, &s, 10)); + v.role = static_cast(strtol(s + 1, &s, 10)); + v.file_id = static_cast(strtol(s + 1, &s, 10)); + } else { + Reflect(vis, static_cast(v)); + Reflect(vis, v.extent); + } +} +void Reflect(Writer &vis, DeclRef &v) { + if (vis.Format() == SerializeFormat::Json) { + char buf[99]; + snprintf(buf, sizeof buf, "%s|%s|%" PRIu64 "|%d|%d|%d", + v.range.ToString().c_str(), v.extent.ToString().c_str(), v.usr, + int(v.kind), int(v.role), v.file_id); + std::string s(buf); + Reflect(vis, s); + } else { + Reflect(vis, static_cast(v)); + Reflect(vis, v.extent); + } +} diff --git a/src/indexer.h b/src/indexer.h index d8ba8c3e..3b855927 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -70,10 +70,17 @@ struct Use : Reference { }; MAKE_HASHABLE(Use, t.range, t.file_id) +struct DeclRef : Use { + Range extent; +}; +MAKE_HASHABLE(DeclRef, t.range, t.file_id) + void Reflect(Reader &visitor, Reference &value); void Reflect(Writer &visitor, Reference &value); void Reflect(Reader &visitor, Use &value); void Reflect(Writer &visitor, Use &value); +void Reflect(Reader &visitor, DeclRef &value); +void Reflect(Writer &visitor, DeclRef &value); template struct NameMixin { std::string_view Name(bool qualified) const { @@ -122,7 +129,7 @@ struct IndexFunc : NameMixin { using Def = FuncDef; Usr usr; Def def; - std::vector declarations; + std::vector declarations; std::vector uses; std::vector derived; }; @@ -162,7 +169,7 @@ struct IndexType { using Def = TypeDef; Usr usr; Def def; - std::vector declarations; + std::vector declarations; std::vector uses; std::vector derived; std::vector instances; @@ -204,7 +211,7 @@ struct IndexVar { using Def = VarDef; Usr usr; Def def; - std::vector declarations; + std::vector declarations; std::vector uses; }; diff --git a/src/query.cc b/src/query.cc index d5fd3287..89df5cfc 100644 --- a/src/query.cc +++ b/src/query.cc @@ -26,13 +26,8 @@ void AssignFileId(const Lid2file_id &lid2file_id, int file_id, Use &use) { use.usr = use.file_id; } -void AddRange(std::vector &into, const std::vector &from) { - into.reserve(into.size() + from.size()); - for (Use use : from) - into.push_back(use); -} - -void AddRange(std::vector &into, const std::vector &from) { +template +void AddRange(std::vector &into, const std::vector &from) { into.insert(into.end(), from.begin(), from.end()); } @@ -231,6 +226,12 @@ void DB::ApplyIndexUpdate(IndexUpdate *u) { files[use.file_id] .outline2refcnt[SymbolRef{{use.range, usr, kind, use.role}}] += delta; }; + auto RefDecl = [&](std::unordered_map &lid2fid, Usr usr, + SymbolKind kind, DeclRef &dr, int delta) { + Ref(lid2fid, usr, kind, dr, delta, 1); + files[dr.file_id] + .outline2refcnt[SymbolRef{{dr.extent, usr, kind, dr.role}}] += delta; + }; auto UpdateUses = [&](Usr usr, SymbolKind kind, llvm::DenseMap &entity_usr, @@ -286,10 +287,10 @@ void DB::ApplyIndexUpdate(IndexUpdate *u) { RemoveUsrs(SymbolKind::Func, u->file_id, u->funcs_removed); Update(lid2file_id, u->file_id, std::move(u->funcs_def_update)); for (auto &[usr, del_add]: u->funcs_declarations) { - for (Use &use : del_add.first) - Ref(prev_lid2file_id, usr, SymbolKind::Func, use, -1, 3); - for (Use &use : del_add.second) - Ref(lid2file_id, usr, SymbolKind::Func, use, 1, 3); + for (DeclRef &dr : del_add.first) + RefDecl(prev_lid2file_id, usr, SymbolKind::Func, dr, -1); + for (DeclRef &dr : del_add.second) + RefDecl(lid2file_id, usr, SymbolKind::Func, dr, 1); } REMOVE_ADD(func, declarations); REMOVE_ADD(func, derived); @@ -310,10 +311,10 @@ void DB::ApplyIndexUpdate(IndexUpdate *u) { RemoveUsrs(SymbolKind::Type, u->file_id, u->types_removed); Update(lid2file_id, u->file_id, std::move(u->types_def_update)); for (auto &[usr, del_add]: u->types_declarations) { - for (Use &use : del_add.first) - Ref(prev_lid2file_id, usr, SymbolKind::Type, use, -1, 3); - for (Use &use : del_add.second) - Ref(lid2file_id, usr, SymbolKind::Type, use, 1, 3); + for (DeclRef &dr : del_add.first) + RefDecl(prev_lid2file_id, usr, SymbolKind::Type, dr, -1); + for (DeclRef &dr : del_add.second) + RefDecl(lid2file_id, usr, SymbolKind::Type, dr, 1); } REMOVE_ADD(type, declarations); REMOVE_ADD(type, derived); @@ -335,10 +336,10 @@ void DB::ApplyIndexUpdate(IndexUpdate *u) { RemoveUsrs(SymbolKind::Var, u->file_id, u->vars_removed); Update(lid2file_id, u->file_id, std::move(u->vars_def_update)); for (auto &[usr, del_add]: u->vars_declarations) { - for (Use &use : del_add.first) - Ref(prev_lid2file_id, usr, SymbolKind::Var, use, -1, 3); - for (Use &use : del_add.second) - Ref(lid2file_id, usr, SymbolKind::Var, use, 1, 3); + for (DeclRef &dr : del_add.first) + RefDecl(prev_lid2file_id, usr, SymbolKind::Var, dr, -1); + for (DeclRef &dr : del_add.second) + RefDecl(lid2file_id, usr, SymbolKind::Var, dr, 1); } REMOVE_ADD(var, declarations); for (auto &[usr, p] : u->vars_uses) diff --git a/src/query.h b/src/query.h index 93b2b0e0..aa597e6c 100644 --- a/src/query.h +++ b/src/query.h @@ -62,6 +62,9 @@ template struct QueryEntity { } }; +using DeclRefUpdate = + std::unordered_map, std::vector>>; using UseUpdate = std::unordered_map, std::vector>>; using UsrUpdate = @@ -70,7 +73,7 @@ using UsrUpdate = struct QueryFunc : QueryEntity { Usr usr; llvm::SmallVector def; - std::vector declarations; + std::vector declarations; std::vector uses; std::vector derived; }; @@ -78,7 +81,7 @@ struct QueryFunc : QueryEntity { struct QueryType : QueryEntity { Usr usr; llvm::SmallVector def; - std::vector declarations; + std::vector declarations; std::vector uses; std::vector derived; std::vector instances; @@ -87,7 +90,7 @@ struct QueryType : QueryEntity { struct QueryVar : QueryEntity { Usr usr; llvm::SmallVector def; - std::vector declarations; + std::vector declarations; std::vector uses; }; @@ -112,7 +115,7 @@ struct IndexUpdate { int funcs_hint; std::vector> funcs_removed; std::vector> funcs_def_update; - UseUpdate funcs_declarations; + DeclRefUpdate funcs_declarations; UseUpdate funcs_uses; UsrUpdate funcs_derived; @@ -120,7 +123,7 @@ struct IndexUpdate { int types_hint; std::vector> types_removed; std::vector> types_def_update; - UseUpdate types_declarations; + DeclRefUpdate types_declarations; UseUpdate types_uses; UsrUpdate types_derived; UsrUpdate types_instances; @@ -129,7 +132,7 @@ struct IndexUpdate { int vars_hint; std::vector> vars_removed; std::vector> vars_def_update; - UseUpdate vars_declarations; + DeclRefUpdate vars_declarations; UseUpdate vars_uses; }; diff --git a/src/query_utils.cc b/src/query_utils.cc index b054af04..d07dccc6 100644 --- a/src/query_utils.cc +++ b/src/query_utils.cc @@ -93,16 +93,24 @@ std::vector GetVarDeclarations(DB *db, const std::vector &usrs, } std::vector GetNonDefDeclarations(DB *db, SymbolIdx sym) { + std::vector ret; switch (sym.kind) { case SymbolKind::Func: - return db->GetFunc(sym).declarations; + for (auto &d : db->GetFunc(sym).declarations) + ret.push_back(d); + break; case SymbolKind::Type: - return db->GetType(sym).declarations; + for (auto &d : db->GetType(sym).declarations) + ret.push_back(d); + break; case SymbolKind::Var: - return db->GetVar(sym).declarations; + for (auto &d : db->GetVar(sym).declarations) + ret.push_back(d); + break; default: - return {}; + break; } + return ret; } std::vector GetUsesForAllBases(DB *db, QueryFunc &root) {