diff --git a/CMakeLists.txt b/CMakeLists.txt index c021a170..49a3061a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,7 +216,6 @@ target_sources(ccls PRIVATE src/serializer.cc src/test.cc src/third_party_impl.cc - src/type_printer.cc src/utils.cc src/working_files.cc) diff --git a/index_tests/constructors/constructor.cc b/index_tests/constructors/constructor.cc index a6affdf3..33c2ff6c 100644 --- a/index_tests/constructors/constructor.cc +++ b/index_tests/constructors/constructor.cc @@ -15,11 +15,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 3385168158331140247, - "detailed_name": "void Foo::Foo()", - "qual_name_offset": 5, + "detailed_name": "Foo::Foo()", + "qual_name_offset": 0, "short_name": "Foo", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:3-3:6|15041163540773201510|2|2", "extent": "3:3-3:11|15041163540773201510|2|0", @@ -35,7 +35,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "6:6-6:9|0|1|2", "extent": "6:1-9:2|0|1|0", @@ -75,7 +75,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 17165811951126099095, "detailed_name": "Foo *f2", @@ -88,7 +88,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/constructors/destructor.cc b/index_tests/constructors/destructor.cc index e49e62c5..ff79a520 100644 --- a/index_tests/constructors/destructor.cc +++ b/index_tests/constructors/destructor.cc @@ -20,11 +20,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 3385168158331140247, - "detailed_name": "void Foo::Foo()", - "qual_name_offset": 5, + "detailed_name": "Foo::Foo()", + "qual_name_offset": 0, "short_name": "Foo", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:3-3:6|15041163540773201510|2|2", "extent": "3:3-3:11|15041163540773201510|2|0", @@ -40,7 +40,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "7:6-7:9|0|1|2", "extent": "7:1-9:2|0|1|0", @@ -52,11 +52,11 @@ OUTPUT: "callees": ["8:7-8:8|3385168158331140247|3|288", "8:7-8:8|3385168158331140247|3|288"] }, { "usr": 7440261702884428359, - "detailed_name": "void Foo::~Foo() noexcept", - "qual_name_offset": 5, + "detailed_name": "Foo::~Foo() noexcept", + "qual_name_offset": 0, "short_name": "~Foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:3-4:7|15041163540773201510|2|2", "extent": "4:3-4:12|15041163540773201510|2|0", @@ -96,7 +96,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/constructors/implicit_constructor.cc b/index_tests/constructors/implicit_constructor.cc index cc12e023..6600ac37 100644 --- a/index_tests/constructors/implicit_constructor.cc +++ b/index_tests/constructors/implicit_constructor.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Make", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:10|0|1|2", "extent": "5:1-8:2|0|1|0", @@ -30,11 +30,11 @@ OUTPUT: "callees": ["6:8-6:12|10530961286677896857|3|288", "6:8-6:12|10530961286677896857|3|288", "7:15-7:19|10530961286677896857|3|32", "7:15-7:19|10530961286677896857|3|32"] }, { "usr": 10530961286677896857, - "detailed_name": "void Type::Type()", - "qual_name_offset": 5, + "detailed_name": "Type::Type()", + "qual_name_offset": 0, "short_name": "Type", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:3-2:7|13487927231218873822|2|2", "extent": "2:3-2:12|13487927231218873822|2|0", @@ -74,19 +74,20 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 17097499197730163115, "detailed_name": "Type foo1", "qual_name_offset": 5, "short_name": "foo1", + "hover": "Type foo1 = Type()", "declarations": [], "spell": "7:8-7:12|3957104924306079513|3|2", "extent": "7:3-7:21|3957104924306079513|3|0", "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/constructors/invalid_reference.cc b/index_tests/constructors/invalid_reference.cc index 38af2902..29118e1e 100644 --- a/index_tests/constructors/invalid_reference.cc +++ b/index_tests/constructors/invalid_reference.cc @@ -14,11 +14,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 17319723337446061757, - "detailed_name": "void Foo::Foo()", - "qual_name_offset": 5, + "detailed_name": "Foo::Foo()", + "qual_name_offset": 0, "short_name": "Foo", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:6-4:9|15041163540773201510|2|2", "extent": "4:1-4:11|0|1|0", diff --git a/index_tests/constructors/make_functions.cc b/index_tests/constructors/make_functions.cc index a1f62b00..7407640a 100644 --- a/index_tests/constructors/make_functions.cc +++ b/index_tests/constructors/make_functions.cc @@ -30,11 +30,11 @@ OUTPUT: make_functions.h "skipped_by_preprocessor": [], "usr2func": [{ "usr": 3765833212244435302, - "detailed_name": "void Foobar::Foobar(int &&, Bar *, bool *)", - "qual_name_offset": 5, + "detailed_name": "Foobar::Foobar(int &&, Bar *, bool *)", + "qual_name_offset": 0, "short_name": "Foobar", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "7:3-7:9|14935975554338052500|2|2", "extent": "7:3-7:32|14935975554338052500|2|0", @@ -46,11 +46,11 @@ OUTPUT: make_functions.h "callees": [] }, { "usr": 13028995015627606181, - "detailed_name": "void Foobar::Foobar(int)", - "qual_name_offset": 5, + "detailed_name": "Foobar::Foobar(int)", + "qual_name_offset": 0, "short_name": "Foobar", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "6:3-6:9|14935975554338052500|2|2", "extent": "6:3-6:17|14935975554338052500|2|0", @@ -62,11 +62,11 @@ OUTPUT: make_functions.h "callees": [] }, { "usr": 13131778807733950299, - "detailed_name": "void Foobar::Foobar()", - "qual_name_offset": 5, + "detailed_name": "Foobar::Foobar()", + "qual_name_offset": 0, "short_name": "Foobar", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:3-5:9|14935975554338052500|2|2", "extent": "5:3-5:14|14935975554338052500|2|0", @@ -78,11 +78,11 @@ OUTPUT: make_functions.h "callees": [] }, { "usr": 17321436359755983845, - "detailed_name": "void Foobar::Foobar(int, Bar *, bool *)", - "qual_name_offset": 5, + "detailed_name": "Foobar::Foobar(int, Bar *, bool *)", + "qual_name_offset": 0, "short_name": "Foobar", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "8:3-8:9|14935975554338052500|2|2", "extent": "8:3-8:30|14935975554338052500|2|0", @@ -139,11 +139,11 @@ OUTPUT: make_functions.cc "skipped_by_preprocessor": [], "usr2func": [{ "usr": 2532818908869373467, - "detailed_name": "T *maKE_NoRefs(Args... args)", + "detailed_name": "T *maKE_NoRefs(Args ...args)", "qual_name_offset": 3, "short_name": "maKE_NoRefs", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "9:4-9:15|0|1|2", "extent": "9:1-11:2|0|1|0", @@ -159,7 +159,7 @@ OUTPUT: make_functions.cc "qual_name_offset": 5, "short_name": "caller22", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "13:6-13:14|0|1|2", "extent": "13:1-18:2|0|1|0", @@ -213,11 +213,11 @@ OUTPUT: make_functions.cc "callees": [] }, { "usr": 15793662558620604611, - "detailed_name": "T *MakeUnique(Args &&... args)", + "detailed_name": "T *MakeUnique(Args &&...args)", "qual_name_offset": 3, "short_name": "MakeUnique", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:4-4:14|0|1|2", "extent": "4:1-6:2|0|1|0", @@ -352,7 +352,7 @@ OUTPUT: make_functions.cc "type": 0, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 8463700030555379526, "detailed_name": "Args &&... args", @@ -364,7 +364,7 @@ OUTPUT: make_functions.cc "type": 0, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/declaration_vs_definition/class_member_static.cc b/index_tests/declaration_vs_definition/class_member_static.cc index 4abc4523..2de0195d 100644 --- a/index_tests/declaration_vs_definition/class_member_static.cc +++ b/index_tests/declaration_vs_definition/class_member_static.cc @@ -57,7 +57,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 8, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/declaration_vs_definition/func.cc b/index_tests/declaration_vs_definition/func.cc index c687a9eb..4fa73102 100644 --- a/index_tests/declaration_vs_definition/func.cc +++ b/index_tests/declaration_vs_definition/func.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "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", 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 d16f8cef..61cf8c6e 100644 --- a/index_tests/declaration_vs_definition/func_associated_function_params.cc +++ b/index_tests/declaration_vs_definition/func_associated_function_params.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "foo", "kind": 12, - "storage": 1, + "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", @@ -53,7 +53,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 14555488990109936920, "detailed_name": "int a", @@ -65,7 +65,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/declaration_vs_definition/method.cc b/index_tests/declaration_vs_definition/method.cc index 038bd66a..f3362df7 100644 --- a/index_tests/declaration_vs_definition/method.cc +++ b/index_tests/declaration_vs_definition/method.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "declonly", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:16|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], @@ -27,12 +27,14 @@ OUTPUT: "callees": [] }, { "usr": 10939323144126021546, - "detailed_name": "void Foo::purevirtual()", - "qual_name_offset": 5, + "detailed_name": "virtual void Foo::purevirtual() = 0", + "qual_name_offset": 13, "short_name": "purevirtual", "kind": 6, - "storage": 1, - "declarations": ["3:16-3:27|15041163540773201510|2|1"], + "storage": 0, + "declarations": [], + "spell": "3:16-3:27|15041163540773201510|2|2", + "extent": "3:3-3:33|15041163540773201510|2|0", "declaring_type": 15041163540773201510, "bases": [], "derived": [], @@ -45,7 +47,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "def", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["4:8-4:11|15041163540773201510|2|1"], "spell": "7:11-7:14|15041163540773201510|2|2", "extent": "7:1-7:19|0|1|0", diff --git a/index_tests/enums/enum_usage.cc b/index_tests/enums/enum_usage.cc index f8b956b7..745a5a6e 100644 --- a/index_tests/enums/enum_usage.cc +++ b/index_tests/enums/enum_usage.cc @@ -54,7 +54,7 @@ OUTPUT: "type": 16985894625255407295, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 15962370213938840720, "detailed_name": "Foo::B", diff --git a/index_tests/foobar.cc b/index_tests/foobar.cc index 64beb5a1..79f3922c 100644 --- a/index_tests/foobar.cc +++ b/index_tests/foobar.cc @@ -94,7 +94,7 @@ OUTPUT: "type": 10528472276654770367, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "Foo::Inner a", @@ -106,7 +106,7 @@ OUTPUT: "type": 13938528237873543349, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/function_declaration.cc b/index_tests/function_declaration.cc index d0394c7e..144fee63 100644 --- a/index_tests/function_declaration.cc +++ b/index_tests/function_declaration.cc @@ -11,7 +11,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["1:6-1:9|0|1|1"], "declaring_type": 0, "bases": [], diff --git a/index_tests/function_declaration_definition.cc b/index_tests/function_declaration_definition.cc index d914d117..e3822453 100644 --- a/index_tests/function_declaration_definition.cc +++ b/index_tests/function_declaration_definition.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "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", diff --git a/index_tests/function_definition.cc b/index_tests/function_definition.cc index 8a084daa..b92b0d37 100644 --- a/index_tests/function_definition.cc +++ b/index_tests/function_definition.cc @@ -11,7 +11,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-1:14|0|1|0", diff --git a/index_tests/inheritance/function_override.cc b/index_tests/inheritance/function_override.cc index b0503ebd..34da20a6 100644 --- a/index_tests/inheritance/function_override.cc +++ b/index_tests/inheritance/function_override.cc @@ -12,11 +12,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 6666242542855173890, - "detailed_name": "void Derived::foo()", + "detailed_name": "void Derived::foo() override", "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:8-5:11|10963370434658308541|2|2", "extent": "5:3-5:25|10963370434658308541|2|0", @@ -28,11 +28,11 @@ OUTPUT: "callees": [] }, { "usr": 9948027785633571339, - "detailed_name": "void Root::foo()", - "qual_name_offset": 5, + "detailed_name": "virtual void Root::foo()", + "qual_name_offset": 13, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:16-2:19|3897841498936210886|2|1"], "declaring_type": 3897841498936210886, "bases": [], diff --git a/index_tests/inheritance/interface_pure_virtual.cc b/index_tests/inheritance/interface_pure_virtual.cc index e0bbfdf1..0d99ad9a 100644 --- a/index_tests/inheritance/interface_pure_virtual.cc +++ b/index_tests/inheritance/interface_pure_virtual.cc @@ -9,12 +9,14 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 3277829753446788562, - "detailed_name": "void IFoo::foo()", - "qual_name_offset": 5, + "detailed_name": "virtual void IFoo::foo() = 0", + "qual_name_offset": 13, "short_name": "foo", "kind": 6, - "storage": 1, - "declarations": ["2:16-2:19|9949214233977131946|2|1"], + "storage": 0, + "declarations": [], + "spell": "2:16-2:19|9949214233977131946|2|2", + "extent": "2:3-2:25|9949214233977131946|2|0", "declaring_type": 9949214233977131946, "bases": [], "derived": [], diff --git a/index_tests/inheritance/multiple_base_functions.cc b/index_tests/inheritance/multiple_base_functions.cc index 2b4a6535..83fa7a9b 100644 --- a/index_tests/inheritance/multiple_base_functions.cc +++ b/index_tests/inheritance/multiple_base_functions.cc @@ -15,11 +15,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 8401779086123965305, - "detailed_name": "void Base1::~Base1() noexcept", - "qual_name_offset": 5, + "detailed_name": "virtual Base1::~Base1() noexcept", + "qual_name_offset": 8, "short_name": "~Base1", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:11-5:17|15826803741381445676|2|2", "extent": "5:3-5:23|15826803741381445676|2|0", @@ -31,11 +31,11 @@ OUTPUT: "callees": [] }, { "usr": 13164726294460837993, - "detailed_name": "void Derived::~Derived() noexcept", - "qual_name_offset": 5, + "detailed_name": "Derived::~Derived() noexcept override", + "qual_name_offset": 0, "short_name": "~Derived", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "8:3-8:11|10963370434658308541|2|2", "extent": "8:3-8:26|10963370434658308541|2|0", @@ -47,11 +47,11 @@ OUTPUT: "callees": [] }, { "usr": 16347272523198263017, - "detailed_name": "void Base0::~Base0() noexcept", - "qual_name_offset": 5, + "detailed_name": "virtual Base0::~Base0() noexcept", + "qual_name_offset": 8, "short_name": "~Base0", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:11-2:17|11628904180681204356|2|2", "extent": "2:3-2:23|11628904180681204356|2|0", diff --git a/index_tests/lambdas/lambda.cc b/index_tests/lambdas/lambda.cc index b718b962..b1bdc451 100644 --- a/index_tests/lambdas/lambda.cc +++ b/index_tests/lambdas/lambda.cc @@ -22,7 +22,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-12:2|0|1|0", @@ -89,7 +89,7 @@ OUTPUT: "type": 14635009347499519042, "uses": ["9:3-9:14|4259594751088586730|3|4", "10:3-10:14|4259594751088586730|3|4", "11:3-11:14|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 12666114896600231317, "detailed_name": "int x", @@ -101,7 +101,7 @@ OUTPUT: "type": 17, "uses": ["5:7-5:8|0|1|4", "4:24-4:25|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 12879188959314906706, "detailed_name": "int y", @@ -113,7 +113,7 @@ OUTPUT: "type": 17, "uses": ["6:7-6:8|4259594751088586730|3|4"], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/macros/complex.cc b/index_tests/macros/complex.cc index 72a7611b..f29cfba3 100644 --- a/index_tests/macros/complex.cc +++ b/index_tests/macros/complex.cc @@ -22,7 +22,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "a", "kind": 12, - "storage": 1, + "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", @@ -38,7 +38,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "make1", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "6:5-6:10|0|1|2", "extent": "6:1-8:2|0|1|0", @@ -77,7 +77,7 @@ OUTPUT: "type": 17, "uses": ["12:14-12:19|9720930732776154610|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 4261071340275951718, "detailed_name": "FOO", diff --git a/index_tests/macros/foo.cc b/index_tests/macros/foo.cc index c513bd10..00cb44ed 100644 --- a/index_tests/macros/foo.cc +++ b/index_tests/macros/foo.cc @@ -14,11 +14,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 13788753348312146871, - "detailed_name": "void Foo::Foo(Foo &&)", - "qual_name_offset": 5, + "detailed_name": "Foo::Foo(Foo &&) = delete", + "qual_name_offset": 0, "short_name": "Foo", "kind": 9, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:12-5:15|15041163540773201510|2|2", "extent": "5:12-5:16|15041163540773201510|2|0", @@ -100,7 +100,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/method_declaration.cc b/index_tests/method_declaration.cc index f576f282..3eaf1f73 100644 --- a/index_tests/method_declaration.cc +++ b/index_tests/method_declaration.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:11|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], diff --git a/index_tests/method_definition.cc b/index_tests/method_definition.cc index 40208994..e9d2c040 100644 --- a/index_tests/method_definition.cc +++ b/index_tests/method_definition.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:11|15041163540773201510|2|1"], "spell": "5:11-5:14|15041163540773201510|2|2", "extent": "5:1-5:25|0|1|0", diff --git a/index_tests/method_inline_declaration.cc b/index_tests/method_inline_declaration.cc index e621ec2d..08391d63 100644 --- a/index_tests/method_inline_declaration.cc +++ b/index_tests/method_inline_declaration.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:8-2:11|15041163540773201510|2|2", "extent": "2:3-2:16|15041163540773201510|2|0", diff --git a/index_tests/multi_file/impl.cc b/index_tests/multi_file/impl.cc index 070c8564..1a52c2de 100644 --- a/index_tests/multi_file/impl.cc +++ b/index_tests/multi_file/impl.cc @@ -15,7 +15,7 @@ OUTPUT: header.h "qual_name_offset": 5, "short_name": "Foo1", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "10:6-10:10|0|1|2", "extent": "10:1-10:15|0|1|0", @@ -139,7 +139,7 @@ OUTPUT: header.h "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 6141718166919284735, "detailed_name": "Foo3::A", @@ -177,7 +177,7 @@ OUTPUT: header.h "type": 17, "uses": [], "kind": 13, - "storage": 3 + "storage": 2 }, { "usr": 17716334512218775320, "detailed_name": "Foo3::B", @@ -206,7 +206,7 @@ OUTPUT: impl.cc "qual_name_offset": 5, "short_name": "Impl", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:10|0|1|2", "extent": "3:1-5:2|0|1|0", diff --git a/index_tests/multi_file/simple_impl.cc b/index_tests/multi_file/simple_impl.cc index 44e49cc6..3469d9fc 100644 --- a/index_tests/multi_file/simple_impl.cc +++ b/index_tests/multi_file/simple_impl.cc @@ -15,7 +15,7 @@ OUTPUT: simple_header.h "qual_name_offset": 5, "short_name": "header", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["3:6-3:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -40,7 +40,7 @@ OUTPUT: simple_impl.cc "qual_name_offset": 5, "short_name": "impl", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:10|0|1|2", "extent": "3:1-5:2|0|1|0", diff --git a/index_tests/multi_file/static.cc b/index_tests/multi_file/static.cc index 88d47379..89bae0f7 100644 --- a/index_tests/multi_file/static.cc +++ b/index_tests/multi_file/static.cc @@ -9,11 +9,11 @@ OUTPUT: static.h "skipped_by_preprocessor": [], "usr2func": [{ "usr": 14576076421851654759, - "detailed_name": "void Buffer::CreateSharedBuffer()", - "qual_name_offset": 5, + "detailed_name": "static void Buffer::CreateSharedBuffer()", + "qual_name_offset": 12, "short_name": "CreateSharedBuffer", "kind": 254, - "storage": 3, + "storage": 2, "declarations": ["4:15-4:33|9411323049603567600|2|1"], "declaring_type": 9411323049603567600, "bases": [], @@ -55,7 +55,7 @@ OUTPUT: static.cc "qual_name_offset": 5, "short_name": "CreateSharedBuffer", "kind": 254, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:14-3:32|9411323049603567600|2|2", "extent": "3:1-3:37|0|1|0", diff --git a/index_tests/namespaces/anonymous_function.cc b/index_tests/namespaces/anonymous_function.cc index bc7668e1..359691cc 100644 --- a/index_tests/namespaces/anonymous_function.cc +++ b/index_tests/namespaces/anonymous_function.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["2:6-2:9|7144845543074395457|2|1"], "declaring_type": 7144845543074395457, "bases": [], diff --git a/index_tests/namespaces/function_declaration.cc b/index_tests/namespaces/function_declaration.cc index a9adedee..81038adc 100644 --- a/index_tests/namespaces/function_declaration.cc +++ b/index_tests/namespaces/function_declaration.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["2:6-2:9|2029211996748007610|2|1"], "declaring_type": 2029211996748007610, "bases": [], diff --git a/index_tests/namespaces/function_definition.cc b/index_tests/namespaces/function_definition.cc index 7430cbdf..c909296e 100644 --- a/index_tests/namespaces/function_definition.cc +++ b/index_tests/namespaces/function_definition.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:6-2:9|2029211996748007610|2|2", "extent": "2:1-2:14|2029211996748007610|2|0", diff --git a/index_tests/namespaces/method_declaration.cc b/index_tests/namespaces/method_declaration.cc index be6dd3a4..a50505d3 100644 --- a/index_tests/namespaces/method_declaration.cc +++ b/index_tests/namespaces/method_declaration.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["3:8-3:11|4508214972876735896|2|1"], "declaring_type": 4508214972876735896, "bases": [], diff --git a/index_tests/namespaces/method_definition.cc b/index_tests/namespaces/method_definition.cc index 2b532db0..68f7f8d8 100644 --- a/index_tests/namespaces/method_definition.cc +++ b/index_tests/namespaces/method_definition.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["3:8-3:11|4508214972876735896|2|1"], "spell": "6:11-6:14|4508214972876735896|2|2", "extent": "6:1-6:19|2029211996748007610|2|0", diff --git a/index_tests/namespaces/method_inline_declaration.cc b/index_tests/namespaces/method_inline_declaration.cc index b531b512..97259490 100644 --- a/index_tests/namespaces/method_inline_declaration.cc +++ b/index_tests/namespaces/method_inline_declaration.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:8-3:11|4508214972876735896|2|2", "extent": "3:3-3:16|4508214972876735896|2|0", diff --git a/index_tests/namespaces/namespace_alias.cc b/index_tests/namespaces/namespace_alias.cc index 50af6291..9b768031 100644 --- a/index_tests/namespaces/namespace_alias.cc +++ b/index_tests/namespaces/namespace_alias.cc @@ -24,7 +24,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "func", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "11:6-11:10|0|1|2", "extent": "11:1-14:2|0|1|0", @@ -149,7 +149,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 7657277353101371136, "detailed_name": "int b", @@ -162,7 +162,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 15042442838933090518, "detailed_name": "int foo::bar::baz::qux", @@ -175,7 +175,7 @@ OUTPUT: "type": 17, "uses": ["12:26-12:29|0|1|4", "13:16-13:19|0|1|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/namespaces/namespace_reference.cc b/index_tests/namespaces/namespace_reference.cc index 73d50bd9..3d7ad72a 100644 --- a/index_tests/namespaces/namespace_reference.cc +++ b/index_tests/namespaces/namespace_reference.cc @@ -20,7 +20,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Runner", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "6:6-6:12|0|1|2", "extent": "6:1-10:2|0|1|0", @@ -36,7 +36,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Accept", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:8-3:14|11072669167287398027|2|2", "extent": "3:3-3:24|11072669167287398027|2|0", @@ -109,7 +109,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 12898699035586282159, "detailed_name": "int ns::Foo", @@ -121,7 +121,7 @@ OUTPUT: "type": 17, "uses": ["7:18-7:21|631910859630953711|3|4", "9:10-9:13|631910859630953711|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/operators/operator.cc b/index_tests/operators/operator.cc index e44fa5bd..a50ec055 100644 --- a/index_tests/operators/operator.cc +++ b/index_tests/operators/operator.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "operator()", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["3:8-3:18|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], @@ -31,7 +31,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "operator()", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["4:7-4:17|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], @@ -45,7 +45,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "operator()", "kind": 6, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:8-2:18|15041163540773201510|2|2", "extent": "2:3-2:27|15041163540773201510|2|0", @@ -61,7 +61,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "operator+=", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["7:6-7:17|0|1|1"], "declaring_type": 0, "bases": [], diff --git a/index_tests/outline/static_function_in_type.cc b/index_tests/outline/static_function_in_type.cc index 62f99811..6bff6f6e 100644 --- a/index_tests/outline/static_function_in_type.cc +++ b/index_tests/outline/static_function_in_type.cc @@ -13,11 +13,11 @@ OUTPUT: static_function_in_type.h "skipped_by_preprocessor": [], "usr2func": [{ "usr": 17019747379608639279, - "detailed_name": "void ns::Foo::Register(ns::Manager *)", - "qual_name_offset": 5, + "detailed_name": "static void ns::Foo::Register(ns::Manager *)", + "qual_name_offset": 12, "short_name": "Register", "kind": 254, - "storage": 3, + "storage": 2, "declarations": ["6:15-6:23|17262466801709381811|2|1"], "declaring_type": 17262466801709381811, "bases": [], @@ -106,7 +106,7 @@ OUTPUT: static_function_in_type.cc "qual_name_offset": 5, "short_name": "Register", "kind": 254, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:11-5:19|17262466801709381811|2|2", "extent": "5:1-6:2|11072669167287398027|2|0", @@ -191,7 +191,7 @@ OUTPUT: static_function_in_type.cc "type": 1972401196751872203, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ \ No newline at end of file diff --git a/index_tests/templates/func_specialized_template_param.cc b/index_tests/templates/func_specialized_template_param.cc index c1f4deaa..ce0a4953 100644 --- a/index_tests/templates/func_specialized_template_param.cc +++ b/index_tests/templates/func_specialized_template_param.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Bar", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["5:8-5:11|15041163540773201510|2|1"], "spell": "8:11-8:14|15041163540773201510|2|2", "extent": "8:1-8:36|0|1|0", diff --git a/index_tests/templates/implicit_variable_instantiation.cc b/index_tests/templates/implicit_variable_instantiation.cc index b45508b8..302086bf 100644 --- a/index_tests/templates/implicit_variable_instantiation.cc +++ b/index_tests/templates/implicit_variable_instantiation.cc @@ -138,7 +138,7 @@ OUTPUT: "type": 1532099849728741556, "uses": ["13:26-13:36|0|1|4", "14:27-14:37|0|1|4"], "kind": 8, - "storage": 1 + "storage": 0 }, { "usr": 9008550860229740818, "detailed_name": "int ns::Foo2", @@ -151,7 +151,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 12898699035586282159, "detailed_name": "int ns::Foo", @@ -164,7 +164,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/templates/member_ref_in_template.cc b/index_tests/templates/member_ref_in_template.cc index fd71e2db..5e18a280 100644 --- a/index_tests/templates/member_ref_in_template.cc +++ b/index_tests/templates/member_ref_in_template.cc @@ -31,7 +31,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "8:6-8:9|0|1|2", "extent": "8:1-8:11|0|1|0", @@ -47,7 +47,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "bar", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["4:8-4:11|8402783583255987702|2|1"], "declaring_type": 8402783583255987702, "bases": [], 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 a6a609ce..63b81fd9 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 @@ -18,11 +18,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 8221803074608342407, - "detailed_name": "int ns::Foo::foo()", - "qual_name_offset": 4, + "detailed_name": "static int ns::Foo::foo()", + "qual_name_offset": 11, "short_name": "foo", "kind": 254, - "storage": 3, + "storage": 2, "declarations": [], "spell": "5:16-5:19|14042997404480181958|2|2", "extent": "5:5-7:6|14042997404480181958|2|0", @@ -116,7 +116,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 15768138241775955040, "detailed_name": "int ns::a", @@ -129,7 +129,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 3b7f23e7..519372a4 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 @@ -79,7 +79,7 @@ OUTPUT: "type": 14042997404480181958, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 15768138241775955040, "detailed_name": "Foo ns::a", @@ -91,7 +91,7 @@ OUTPUT: "type": 14042997404480181958, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/templates/specialization.cc b/index_tests/templates/specialization.cc index e788e7b6..3e4d59f7 100644 --- a/index_tests/templates/specialization.cc +++ b/index_tests/templates/specialization.cc @@ -49,11 +49,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 6113470698424012876, - "detailed_name": "void vector::clear()", - "qual_name_offset": 5, + "detailed_name": "void vector >::clear()", + "qual_name_offset": 31, "short_name": "clear", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["27:8-27:13|1663022413889915338|2|1"], "declaring_type": 1663022413889915338, "bases": [], @@ -67,7 +67,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["43:6-43:9|0|1|1"], "spell": "39:6-39:9|0|1|2", "extent": "39:1-39:21|0|1|0", @@ -83,7 +83,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "clear", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["13:8-13:13|7440942986741176606|2|1"], "declaring_type": 7440942986741176606, "bases": [], @@ -338,7 +338,7 @@ OUTPUT: "type": 16155717907537731864, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 2933643612409209903, "detailed_name": "function f", @@ -350,7 +350,7 @@ OUTPUT: "type": 218068462278884837, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 3566687051827176322, "detailed_name": "vector vz1", @@ -362,7 +362,7 @@ OUTPUT: "type": 7440942986741176606, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 4917621020431490070, "detailed_name": "Enum::Enum1", @@ -387,7 +387,7 @@ OUTPUT: "type": 7440942986741176606, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 13914496963221806870, "detailed_name": "const int kOnst", @@ -400,7 +400,7 @@ OUTPUT: "type": 17, "uses": ["43:27-43:32|0|1|4"], "kind": 13, - "storage": 3 + "storage": 2 }, { "usr": 15477793821005285152, "detailed_name": "Enum::Enum0", @@ -425,7 +425,7 @@ OUTPUT: "type": 7440942986741176606, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 17826688417349629938, "detailed_name": "T Value", @@ -437,7 +437,7 @@ OUTPUT: "type": 0, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/templates/specialized_func_definition.cc b/index_tests/templates/specialized_func_definition.cc index 93406312..c9eaf9fb 100644 --- a/index_tests/templates/specialized_func_definition.cc +++ b/index_tests/templates/specialized_func_definition.cc @@ -24,11 +24,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 11994188353303124840, - "detailed_name": "void Template::Foo()", - "qual_name_offset": 5, + "detailed_name": "template void Template::Foo()", + "qual_name_offset": 24, "short_name": "Foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["3:8-3:11|17107291254533526269|2|1", "10:22-10:25|0|1|1"], "spell": "7:19-7:22|17107291254533526269|2|2", "extent": "6:1-7:24|0|1|0", 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 3a7637b5..0a109c29 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 @@ -15,11 +15,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 8340731781048851399, - "detailed_name": "int Foo::foo()", - "qual_name_offset": 4, + "detailed_name": "static int Foo::foo()", + "qual_name_offset": 11, "short_name": "foo", "kind": 254, - "storage": 3, + "storage": 2, "declarations": [], "spell": "3:14-3:17|10528472276654770367|2|2", "extent": "3:3-5:4|10528472276654770367|2|0", @@ -75,7 +75,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "int a", @@ -88,7 +88,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 81cf3b31..034a54ed 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 @@ -16,11 +16,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 9034026360701857235, - "detailed_name": "int Foo::foo()", - "qual_name_offset": 4, + "detailed_name": "static int Foo::foo()", + "qual_name_offset": 11, "short_name": "foo", "kind": 254, - "storage": 3, + "storage": 2, "declarations": [], "spell": "4:14-4:17|10528472276654770367|2|2", "extent": "4:3-6:4|10528472276654770367|2|0", @@ -76,7 +76,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "int a", @@ -89,7 +89,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 fadf4c99..15989f19 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 @@ -113,7 +113,7 @@ OUTPUT: "type": 13938528237873543349, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "Foo::Inner a", @@ -125,7 +125,7 @@ OUTPUT: "type": 13938528237873543349, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 b1a2e8fb..ab398ea8 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 @@ -57,7 +57,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 13545144895171991916, "detailed_name": "const int Foo::var", @@ -68,7 +68,7 @@ OUTPUT: "type": 17, "uses": ["6:19-6:22|0|1|4", "7:20-7:23|0|1|4"], "kind": 8, - "storage": 3 + "storage": 2 }, { "usr": 16721564935990383768, "detailed_name": "int a", @@ -81,7 +81,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 e34b7505..5e772268 100644 --- a/index_tests/templates/template_func_usage_folded_into_one.cc +++ b/index_tests/templates/template_func_usage_folded_into_one.cc @@ -16,11 +16,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 326583651986177228, - "detailed_name": "int foo()", - "qual_name_offset": 4, + "detailed_name": "static int foo()", + "qual_name_offset": 11, "short_name": "foo", "kind": 12, - "storage": 3, + "storage": 2, "declarations": [], "spell": "2:12-2:15|0|1|2", "extent": "2:1-4:2|0|1|0", @@ -59,7 +59,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "int a", @@ -72,7 +72,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 6693cd06..5eecc004 100644 --- a/index_tests/templates/template_type_usage_folded_into_one.cc +++ b/index_tests/templates/template_type_usage_folded_into_one.cc @@ -39,7 +39,7 @@ OUTPUT: "type": 10528472276654770367, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "Foo a", @@ -51,7 +51,7 @@ OUTPUT: "type": 10528472276654770367, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ 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 cd4ffa79..61ee17ee 100644 --- a/index_tests/templates/template_var_usage_folded_into_one.cc +++ b/index_tests/templates/template_var_usage_folded_into_one.cc @@ -91,13 +91,14 @@ OUTPUT: "detailed_name": "T var", "qual_name_offset": 2, "short_name": "var", + "hover": "T var = T()", "declarations": [], "spell": "5:3-5:6|0|1|2", "extent": "5:1-5:12|0|1|0", "type": 0, "uses": ["7:7-7:10|0|1|4", "8:7-8:10|0|1|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 12028309045033782423, "detailed_name": "B b", @@ -110,7 +111,7 @@ OUTPUT: "type": 13892793056005362145, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16721564935990383768, "detailed_name": "A a", @@ -123,7 +124,7 @@ OUTPUT: "type": 6697181287623958829, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/types/anonymous_struct.cc b/index_tests/types/anonymous_struct.cc index 087cd8de..5a70a817 100644 --- a/index_tests/types/anonymous_struct.cc +++ b/index_tests/types/anonymous_struct.cc @@ -76,6 +76,7 @@ OUTPUT: "detailed_name": "float [3] vector3::v", "qual_name_offset": 10, "short_name": "v", + "hover": "float [3] vector3::v[3]", "declarations": [], "spell": "3:9-3:10|17937907487590875128|2|2", "extent": "3:3-3:13|17937907487590875128|2|0", diff --git a/index_tests/types/typedefs.cc b/index_tests/types/typedefs.cc index a7e8c520..45abe03a 100644 --- a/index_tests/types/typedefs.cc +++ b/index_tests/types/typedefs.cc @@ -8,11 +8,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 8105378401105136463, - "detailed_name": "func g", - "qual_name_offset": 5, + "detailed_name": "static int g(const int *, const int *)", + "qual_name_offset": 11, "short_name": "g", "kind": 12, - "storage": 3, + "storage": 2, "declarations": ["2:13-2:14|0|1|1"], "declaring_type": 0, "bases": [], diff --git a/index_tests/unions/union_usage.cc b/index_tests/unions/union_usage.cc index 3329ecd5..c856ca05 100644 --- a/index_tests/unions/union_usage.cc +++ b/index_tests/unions/union_usage.cc @@ -22,7 +22,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "act", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "8:6-8:9|0|1|2", "extent": "8:1-10:2|0|1|0", @@ -98,7 +98,7 @@ OUTPUT: "type": 8501689086387244262, "uses": ["9:3-9:4|13982179977217945200|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 8804696910588009104, "detailed_name": "bool Foo::b", diff --git a/index_tests/usage/func_called_from_constructor.cc b/index_tests/usage/func_called_from_constructor.cc index 67221d07..8213dac8 100644 --- a/index_tests/usage/func_called_from_constructor.cc +++ b/index_tests/usage/func_called_from_constructor.cc @@ -19,7 +19,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:12|0|1|2", "extent": "1:1-1:17|0|1|0", @@ -31,11 +31,11 @@ OUTPUT: "callees": [] }, { "usr": 3385168158331140247, - "detailed_name": "void Foo::Foo()", - "qual_name_offset": 5, + "detailed_name": "Foo::Foo()", + "qual_name_offset": 0, "short_name": "Foo", "kind": 9, - "storage": 1, + "storage": 0, "declarations": ["4:3-4:6|15041163540773201510|2|1"], "spell": "7:6-7:9|15041163540773201510|2|2", "extent": "7:1-9:2|0|1|0", diff --git a/index_tests/usage/func_called_from_macro_argument.cc b/index_tests/usage/func_called_from_macro_argument.cc index 4388e551..819b679e 100644 --- a/index_tests/usage/func_called_from_macro_argument.cc +++ b/index_tests/usage/func_called_from_macro_argument.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["3:6-3:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -31,7 +31,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "caller", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:12|0|1|2", "extent": "5:1-7:2|0|1|0", diff --git a/index_tests/usage/func_called_from_template.cc b/index_tests/usage/func_called_from_template.cc index 6647723d..c1f3a38b 100644 --- a/index_tests/usage/func_called_from_template.cc +++ b/index_tests/usage/func_called_from_template.cc @@ -22,7 +22,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["1:6-1:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -36,7 +36,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "8:6-8:9|0|1|2", "extent": "8:1-10:2|0|1|0", @@ -52,7 +52,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "caller", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:6-4:12|0|1|2", "extent": "4:1-6:2|0|1|0", diff --git a/index_tests/usage/func_called_implicit_ctor.cc b/index_tests/usage/func_called_implicit_ctor.cc index 86a14364..a3a1b1c8 100644 --- a/index_tests/usage/func_called_implicit_ctor.cc +++ b/index_tests/usage/func_called_implicit_ctor.cc @@ -19,7 +19,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:5-5:11|0|1|2", "extent": "5:1-5:27|0|1|0", @@ -31,11 +31,11 @@ OUTPUT: "callees": [] }, { "usr": 10544127002917214589, - "detailed_name": "void Wrapper::Wrapper(int i)", - "qual_name_offset": 5, + "detailed_name": "Wrapper::Wrapper(int i)", + "qual_name_offset": 0, "short_name": "Wrapper", "kind": 9, - "storage": 1, + "storage": 0, "declarations": ["2:3-2:10|13611487872560323389|2|1"], "declaring_type": 13611487872560323389, "bases": [], @@ -49,7 +49,7 @@ OUTPUT: "qual_name_offset": 8, "short_name": "caller", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "7:9-7:15|0|1|2", "extent": "7:1-9:2|0|1|0", diff --git a/index_tests/usage/func_usage_addr_func.cc b/index_tests/usage/func_usage_addr_func.cc index 88c6ff24..19080a4c 100644 --- a/index_tests/usage/func_usage_addr_func.cc +++ b/index_tests/usage/func_usage_addr_func.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "used", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:10|0|1|2", "extent": "3:1-3:15|0|1|0", @@ -34,7 +34,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "user", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:10|0|1|2", "extent": "5:1-8:2|0|1|0", @@ -50,7 +50,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "consume", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:13|0|1|2", "extent": "1:1-1:28|0|1|0", @@ -73,7 +73,7 @@ OUTPUT: "type": 0, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/func_usage_addr_method.cc b/index_tests/usage/func_usage_addr_method.cc index bc8e72b1..7a33f6cb 100644 --- a/index_tests/usage/func_usage_addr_method.cc +++ b/index_tests/usage/func_usage_addr_method.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "user", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:10|0|1|2", "extent": "5:1-7:2|0|1|0", @@ -34,7 +34,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Used", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:12|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], @@ -66,13 +66,14 @@ OUTPUT: "detailed_name": "void (Foo::*)() x", "qual_name_offset": 16, "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", "type": 0, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/func_usage_call_func.cc b/index_tests/usage/func_usage_call_func.cc index 747b159e..6c2db9e6 100644 --- a/index_tests/usage/func_usage_call_func.cc +++ b/index_tests/usage/func_usage_call_func.cc @@ -14,7 +14,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:12|0|1|2", "extent": "1:1-1:17|0|1|0", @@ -30,7 +30,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "caller", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:6-2:12|0|1|2", "extent": "2:1-4:2|0|1|0", diff --git a/index_tests/usage/func_usage_call_method.cc b/index_tests/usage/func_usage_call_method.cc index 4dd1244f..842c3ec8 100644 --- a/index_tests/usage/func_usage_call_method.cc +++ b/index_tests/usage/func_usage_call_method.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "user", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:10|0|1|2", "extent": "5:1-8:2|0|1|0", @@ -34,7 +34,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Used", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:12|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], @@ -73,7 +73,7 @@ OUTPUT: "type": 15041163540773201510, "uses": ["7:3-7:4|9376923949268137283|3|4"], "kind": 13, - "storage": 1 + "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 3d62897e..291322b4 100644 --- a/index_tests/usage/func_usage_class_inline_var_def.cc +++ b/index_tests/usage/func_usage_class_inline_var_def.cc @@ -13,11 +13,11 @@ OUTPUT: "skipped_by_preprocessor": [], "usr2func": [{ "usr": 9630503130605430498, - "detailed_name": "int helper()", - "qual_name_offset": 4, + "detailed_name": "static int helper()", + "qual_name_offset": 11, "short_name": "helper", "kind": 12, - "storage": 3, + "storage": 2, "declarations": [], "spell": "1:12-1:18|0|1|2", "extent": "1:1-3:2|0|1|0", diff --git a/index_tests/usage/func_usage_forward_decl_func.cc b/index_tests/usage/func_usage_forward_decl_func.cc index 1fbbbb1a..f082dc33 100644 --- a/index_tests/usage/func_usage_forward_decl_func.cc +++ b/index_tests/usage/func_usage_forward_decl_func.cc @@ -14,7 +14,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["1:6-1:9|0|1|1"], "declaring_type": 0, "bases": [], @@ -28,7 +28,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "usage", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:11|0|1|2", "extent": "3:1-5:2|0|1|0", diff --git a/index_tests/usage/func_usage_forward_decl_method.cc b/index_tests/usage/func_usage_forward_decl_method.cc index fa3de213..ae5bf98a 100644 --- a/index_tests/usage/func_usage_forward_decl_method.cc +++ b/index_tests/usage/func_usage_forward_decl_method.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "usage", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:11|0|1|2", "extent": "5:1-8:2|0|1|0", @@ -33,7 +33,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:11|15041163540773201510|2|1"], "declaring_type": 15041163540773201510, "bases": [], @@ -72,7 +72,7 @@ OUTPUT: "type": 15041163540773201510, "uses": ["7:3-7:4|6767773193109753523|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/func_usage_template_func.cc b/index_tests/usage/func_usage_template_func.cc index 84330c56..48dcdfbd 100644 --- a/index_tests/usage/func_usage_template_func.cc +++ b/index_tests/usage/func_usage_template_func.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:6-4:9|0|1|2", "extent": "4:1-7:2|0|1|0", @@ -33,7 +33,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["2:6-2:12|0|1|1"], "declaring_type": 0, "bases": [], diff --git a/index_tests/usage/type_usage_as_template_parameter.cc b/index_tests/usage/type_usage_as_template_parameter.cc index 6c9a99ba..bc6eb0aa 100644 --- a/index_tests/usage/type_usage_as_template_parameter.cc +++ b/index_tests/usage/type_usage_as_template_parameter.cc @@ -21,7 +21,7 @@ OUTPUT: "qual_name_offset": 15, "short_name": "return_type", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "9:16-9:27|0|1|2", "extent": "9:1-12:2|0|1|0", @@ -78,7 +78,7 @@ OUTPUT: "type": 3286534761799572592, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 12857919739649552168, "detailed_name": "unique_ptr f0", @@ -90,7 +90,7 @@ OUTPUT: "type": 3286534761799572592, "uses": [], "kind": 13, - "storage": 3 + "storage": 2 }, { "usr": 18075066956054788088, "detailed_name": "unique_ptr f1", @@ -102,7 +102,7 @@ OUTPUT: "type": 3286534761799572592, "uses": [], "kind": 13, - "storage": 3 + "storage": 2 }] } */ 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 fe9d3d94..0236115c 100644 --- a/index_tests/usage/type_usage_as_template_parameter_complex.cc +++ b/index_tests/usage/type_usage_as_template_parameter_complex.cc @@ -89,7 +89,7 @@ OUTPUT: "qual_name_offset": 36, "short_name": "as_return_type", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "33:37-33:51|0|1|2", "extent": "33:1-33:92|0|1|0", @@ -105,7 +105,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "no_return_type", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "40:6-40:20|0|1|2", "extent": "40:1-40:28|0|1|0", @@ -121,7 +121,7 @@ OUTPUT: "qual_name_offset": 20, "short_name": "foo", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["65:23-65:26|15041163540773201510|2|1"], "spell": "79:26-79:29|15041163540773201510|2|2", "extent": "79:1-79:51|0|1|0", @@ -137,7 +137,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "empty", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "53:6-53:11|0|1|2", "extent": "53:1-55:2|0|1|0", @@ -222,7 +222,7 @@ OUTPUT: "type": 14209198335088845323, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 2933643612409209903, "detailed_name": "unique_ptr, S2> f", @@ -232,7 +232,7 @@ OUTPUT: "type": 14209198335088845323, "uses": [], "kind": 13, - "storage": 2 + "storage": 1 }] } */ 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 d06a630a..7487a11e 100644 --- a/index_tests/usage/type_usage_as_template_parameter_simple.cc +++ b/index_tests/usage/type_usage_as_template_parameter_simple.cc @@ -55,7 +55,7 @@ OUTPUT: "type": 3286534761799572592, "uses": [], "kind": 13, - "storage": 3 + "storage": 2 }] } */ diff --git a/index_tests/usage/type_usage_declare_extern.cc b/index_tests/usage/type_usage_declare_extern.cc index 7ca6501b..813461cb 100644 --- a/index_tests/usage/type_usage_declare_extern.cc +++ b/index_tests/usage/type_usage_declare_extern.cc @@ -34,7 +34,7 @@ OUTPUT: "type": 5673439900521455039, "uses": [], "kind": 13, - "storage": 2 + "storage": 1 }] } */ diff --git a/index_tests/usage/type_usage_declare_local.cc b/index_tests/usage/type_usage_declare_local.cc index 436dbf71..1a9218ed 100644 --- a/index_tests/usage/type_usage_declare_local.cc +++ b/index_tests/usage/type_usage_declare_local.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:6-4:9|0|1|2", "extent": "4:1-7:2|0|1|0", @@ -72,7 +72,7 @@ OUTPUT: "type": 8508299082070213750, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 16374832544037266261, "detailed_name": "ForwardType *a", @@ -84,7 +84,7 @@ OUTPUT: "type": 13749354388332789217, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/type_usage_declare_param.cc b/index_tests/usage/type_usage_declare_param.cc index 205b9da9..3de9198f 100644 --- a/index_tests/usage/type_usage_declare_param.cc +++ b/index_tests/usage/type_usage_declare_param.cc @@ -14,7 +14,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "4:6-4:9|0|1|2", "extent": "4:1-4:47|0|1|0", @@ -69,7 +69,7 @@ OUTPUT: "type": 8508299082070213750, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 13058491096576226774, "detailed_name": "ForwardType *f", @@ -81,7 +81,7 @@ OUTPUT: "type": 13749354388332789217, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/type_usage_declare_param_prototype.cc b/index_tests/usage/type_usage_declare_param_prototype.cc index e66c6db2..e96b6418 100644 --- a/index_tests/usage/type_usage_declare_param_prototype.cc +++ b/index_tests/usage/type_usage_declare_param_prototype.cc @@ -19,7 +19,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "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", @@ -57,7 +57,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/type_usage_declare_param_unnamed.cc b/index_tests/usage/type_usage_declare_param_unnamed.cc index fb8c6e8f..cc06d8a6 100644 --- a/index_tests/usage/type_usage_declare_param_unnamed.cc +++ b/index_tests/usage/type_usage_declare_param_unnamed.cc @@ -11,7 +11,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:6-2:9|0|1|2", "extent": "2:1-2:26|0|1|0", diff --git a/index_tests/usage/type_usage_declare_qualifiers.cc b/index_tests/usage/type_usage_declare_qualifiers.cc index fbf7cac4..22c1bf59 100644 --- a/index_tests/usage/type_usage_declare_qualifiers.cc +++ b/index_tests/usage/type_usage_declare_qualifiers.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:9|0|1|2", "extent": "3:1-8:2|0|1|0", @@ -57,7 +57,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 6081981442495435784, "detailed_name": "Type *a3", @@ -69,7 +69,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 7997456978847868736, "detailed_name": "Type &a0", @@ -81,7 +81,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 14939253431683105646, "detailed_name": "const Type *const a5", @@ -94,7 +94,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 15429032129697337561, "detailed_name": "Type a2", @@ -106,7 +106,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 17228576662112939520, "detailed_name": "const Type &a1", @@ -118,7 +118,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/type_usage_declare_static.cc b/index_tests/usage/type_usage_declare_static.cc index c2caccfc..d344aa6a 100644 --- a/index_tests/usage/type_usage_declare_static.cc +++ b/index_tests/usage/type_usage_declare_static.cc @@ -35,7 +35,7 @@ OUTPUT: "type": 13487927231218873822, "uses": [], "kind": 13, - "storage": 3 + "storage": 2 }] } */ diff --git a/index_tests/usage/type_usage_on_return_type.cc b/index_tests/usage/type_usage_on_return_type.cc index 385f079f..736caf8a 100644 --- a/index_tests/usage/type_usage_on_return_type.cc +++ b/index_tests/usage/type_usage_on_return_type.cc @@ -28,7 +28,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Empty", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["9:8-9:13|15041163540773201510|2|1"], "spell": "13:11-13:16|15041163540773201510|2|2", "extent": "13:1-13:21|0|1|0", @@ -44,7 +44,7 @@ OUTPUT: "qual_name_offset": 6, "short_name": "foo", "kind": 12, - "storage": 1, + "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", @@ -56,11 +56,11 @@ OUTPUT: "callees": [] }, { "usr": 7746867874366499515, - "detailed_name": "const Type &external()", - "qual_name_offset": 12, + "detailed_name": "extern const Type &external()", + "qual_name_offset": 19, "short_name": "external", "kind": 12, - "storage": 2, + "storage": 1, "declarations": ["15:20-15:28|0|1|1"], "declaring_type": 0, "bases": [], @@ -74,7 +74,7 @@ OUTPUT: "qual_name_offset": 6, "short_name": "Get", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["8:9-8:12|15041163540773201510|2|1"], "spell": "12:12-12:15|15041163540773201510|2|2", "extent": "12:1-12:40|0|1|0", @@ -86,11 +86,11 @@ OUTPUT: "callees": [] }, { "usr": 18408440185620243373, - "detailed_name": "Type *bar()", - "qual_name_offset": 6, + "detailed_name": "static Type *bar()", + "qual_name_offset": 13, "short_name": "bar", "kind": 12, - "storage": 3, + "storage": 2, "declarations": ["17:14-17:17|0|1|1"], "spell": "18:14-18:17|0|1|2", "extent": "18:1-18:39|0|1|0", diff --git a/index_tests/usage/type_usage_typedef_and_using.cc b/index_tests/usage/type_usage_typedef_and_using.cc index 67b992fd..02d1ebbb 100644 --- a/index_tests/usage/type_usage_typedef_and_using.cc +++ b/index_tests/usage/type_usage_typedef_and_using.cc @@ -20,7 +20,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept1", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "8:6-8:13|0|1|2", "extent": "8:1-8:23|0|1|0", @@ -36,7 +36,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "7:6-7:12|0|1|2", "extent": "7:1-7:21|0|1|0", @@ -52,7 +52,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept2", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "9:6-9:13|0|1|2", "extent": "9:1-9:23|0|1|0", @@ -68,7 +68,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept3", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "10:6-10:13|0|1|2", "extent": "10:1-10:23|0|1|0", diff --git a/index_tests/usage/type_usage_various.cc b/index_tests/usage/type_usage_various.cc index 5ad5b235..dc881608 100644 --- a/index_tests/usage/type_usage_various.cc +++ b/index_tests/usage/type_usage_various.cc @@ -20,7 +20,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "make", "kind": 6, - "storage": 1, + "storage": 0, "declarations": ["2:8-2:12|15041163540773201510|2|1"], "spell": "5:11-5:15|15041163540773201510|2|2", "extent": "5:1-8:2|0|1|0", @@ -58,7 +58,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 2 + "storage": 1 }, { "usr": 16380484338511689669, "detailed_name": "Foo f", @@ -70,7 +70,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/usage_inside_of_call.cc b/index_tests/usage/usage_inside_of_call.cc index 9642d1d9..13229c6d 100644 --- a/index_tests/usage/usage_inside_of_call.cc +++ b/index_tests/usage/usage_inside_of_call.cc @@ -25,7 +25,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "12:6-12:9|0|1|2", "extent": "12:1-15:2|0|1|0", @@ -41,7 +41,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "gen", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["3:5-3:8|0|1|1"], "declaring_type": 0, "bases": [], @@ -55,7 +55,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["1:6-1:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -115,7 +115,7 @@ OUTPUT: "type": 17, "uses": ["14:10-14:11|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 9648311402855509901, "detailed_name": "int Foo::field_var", @@ -140,7 +140,7 @@ OUTPUT: "type": 17, "uses": ["14:45-14:55|4259594751088586730|3|4"], "kind": 8, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/usage_inside_of_call_simple.cc b/index_tests/usage/usage_inside_of_call_simple.cc index 326e6592..483cf69c 100644 --- a/index_tests/usage/usage_inside_of_call_simple.cc +++ b/index_tests/usage/usage_inside_of_call_simple.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "5:6-5:9|0|1|2", "extent": "5:1-7:2|0|1|0", @@ -33,7 +33,7 @@ OUTPUT: "qual_name_offset": 4, "short_name": "gen", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:5-3:8|0|1|2", "extent": "3:1-3:24|0|1|0", @@ -49,7 +49,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["1:6-1:12|0|1|1"], "declaring_type": 0, "bases": [], diff --git a/index_tests/usage/var_usage_call_function.cc b/index_tests/usage/var_usage_call_function.cc index 33a835f6..3e6eaeff 100644 --- a/index_tests/usage/var_usage_call_function.cc +++ b/index_tests/usage/var_usage_call_function.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "called", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:12|0|1|2", "extent": "1:1-1:17|0|1|0", @@ -34,7 +34,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "caller", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:12|0|1|2", "extent": "3:1-8:2|0|1|0", @@ -51,13 +51,14 @@ OUTPUT: "detailed_name": "void (*)() x", "qual_name_offset": 11, "short_name": "x", + "hover": "void (*)() x = &called", "declarations": [], "spell": "4:8-4:9|11404881820527069090|3|2", "extent": "4:3-4:19|11404881820527069090|3|0", "type": 0, "uses": ["5:3-5:4|11404881820527069090|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/var_usage_class_member.cc b/index_tests/usage/var_usage_class_member.cc index d10749eb..e8c6daff 100644 --- a/index_tests/usage/var_usage_class_member.cc +++ b/index_tests/usage/var_usage_class_member.cc @@ -28,7 +28,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "10:6-10:9|0|1|2", "extent": "10:1-18:2|0|1|0", @@ -44,7 +44,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["8:6-8:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -58,7 +58,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["7:6-7:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -141,7 +141,7 @@ OUTPUT: "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"], "kind": 13, - "storage": 1 + "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 1f9dd67c..d9d0b08c 100644 --- a/index_tests/usage/var_usage_class_member_static.cc +++ b/index_tests/usage/var_usage_class_member_static.cc @@ -19,7 +19,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "7:6-7:9|0|1|2", "extent": "7:1-9:2|0|1|0", @@ -35,7 +35,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "accept", "kind": 12, - "storage": 1, + "storage": 0, "declarations": ["5:6-5:12|0|1|1"], "declaring_type": 0, "bases": [], @@ -86,7 +86,7 @@ OUTPUT: "type": 17, "uses": ["8:15-8:16|4259594751088586730|3|4"], "kind": 8, - "storage": 3 + "storage": 2 }] } */ diff --git a/index_tests/usage/var_usage_cstyle_cast.cc b/index_tests/usage/var_usage_cstyle_cast.cc index b554c29e..1d7a86cf 100644 --- a/index_tests/usage/var_usage_cstyle_cast.cc +++ b/index_tests/usage/var_usage_cstyle_cast.cc @@ -63,7 +63,7 @@ OUTPUT: "type": 5792006888140599735, "uses": [], "kind": 8, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/var_usage_extern.cc b/index_tests/usage/var_usage_extern.cc index 81100735..894dcadc 100644 --- a/index_tests/usage/var_usage_extern.cc +++ b/index_tests/usage/var_usage_extern.cc @@ -14,7 +14,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:9|0|1|2", "extent": "3:1-5:2|0|1|0", @@ -50,7 +50,7 @@ OUTPUT: "type": 17, "uses": ["4:3-4:4|4259594751088586730|3|4"], "kind": 13, - "storage": 2 + "storage": 1 }] } */ diff --git a/index_tests/usage/var_usage_func_parameter.cc b/index_tests/usage/var_usage_func_parameter.cc index 72d2a1d7..2b833d1a 100644 --- a/index_tests/usage/var_usage_func_parameter.cc +++ b/index_tests/usage/var_usage_func_parameter.cc @@ -12,7 +12,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-3:2|0|1|0", @@ -50,7 +50,7 @@ OUTPUT: "type": 17, "uses": ["2:3-2:4|11998306017310352355|3|4"], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/var_usage_local.cc b/index_tests/usage/var_usage_local.cc index 2a1e89fd..1843caba 100644 --- a/index_tests/usage/var_usage_local.cc +++ b/index_tests/usage/var_usage_local.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-4:2|0|1|0", @@ -51,7 +51,7 @@ OUTPUT: "type": 17, "uses": ["3:3-3:4|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/var_usage_shadowed_local.cc b/index_tests/usage/var_usage_shadowed_local.cc index 307e2206..11590ae2 100644 --- a/index_tests/usage/var_usage_shadowed_local.cc +++ b/index_tests/usage/var_usage_shadowed_local.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-9:2|0|1|0", @@ -56,7 +56,7 @@ OUTPUT: "type": 17, "uses": ["3:3-3:4|4259594751088586730|3|4", "8:3-8:4|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 14036425367303419504, "detailed_name": "int a", @@ -68,7 +68,7 @@ OUTPUT: "type": 17, "uses": ["6:5-6:6|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/var_usage_shadowed_parameter.cc b/index_tests/usage/var_usage_shadowed_parameter.cc index dfe22c82..e10ac0f1 100644 --- a/index_tests/usage/var_usage_shadowed_parameter.cc +++ b/index_tests/usage/var_usage_shadowed_parameter.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-8:2|0|1|0", @@ -56,7 +56,7 @@ OUTPUT: "type": 17, "uses": ["5:5-5:6|11998306017310352355|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 11608231465452906059, "detailed_name": "int a", @@ -68,7 +68,7 @@ OUTPUT: "type": 17, "uses": ["2:3-2:4|11998306017310352355|3|4", "7:3-7:4|11998306017310352355|3|4"], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/usage/var_usage_static.cc b/index_tests/usage/var_usage_static.cc index 1b74d463..9b4661a9 100644 --- a/index_tests/usage/var_usage_static.cc +++ b/index_tests/usage/var_usage_static.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:9|0|1|2", "extent": "3:1-5:2|0|1|0", @@ -53,7 +53,7 @@ OUTPUT: "type": 17, "uses": ["4:3-4:4|4259594751088586730|3|4"], "kind": 13, - "storage": 3 + "storage": 2 }] } */ diff --git a/index_tests/vars/class_static_member.cc b/index_tests/vars/class_static_member.cc index 426090c8..0dfb2dc9 100644 --- a/index_tests/vars/class_static_member.cc +++ b/index_tests/vars/class_static_member.cc @@ -42,7 +42,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 8, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/vars/class_static_member_decl_only.cc b/index_tests/vars/class_static_member_decl_only.cc index 98781bc5..61a74165 100644 --- a/index_tests/vars/class_static_member_decl_only.cc +++ b/index_tests/vars/class_static_member_decl_only.cc @@ -49,7 +49,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 8, - "storage": 3 + "storage": 2 }] } */ diff --git a/index_tests/vars/deduce_auto_type.cc b/index_tests/vars/deduce_auto_type.cc index 654e5bf4..be3796f7 100644 --- a/index_tests/vars/deduce_auto_type.cc +++ b/index_tests/vars/deduce_auto_type.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "f", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "2:6-2:7|0|1|2", "extent": "2:1-5:2|0|1|0", @@ -49,25 +49,27 @@ OUTPUT: "detailed_name": "Foo *x", "qual_name_offset": 5, "short_name": "x", + "hover": "Foo *x = new Foo()", "declarations": [], "spell": "3:8-3:9|880549676430489861|3|2", "extent": "3:3-3:21|880549676430489861|3|0", "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 18422884837902130475, "detailed_name": "Foo *y", "qual_name_offset": 5, "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", "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/vars/function_local.cc b/index_tests/vars/function_local.cc index 8ea4fbe0..d68ab382 100644 --- a/index_tests/vars/function_local.cc +++ b/index_tests/vars/function_local.cc @@ -15,7 +15,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:9|0|1|2", "extent": "3:1-5:2|0|1|0", @@ -53,7 +53,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/vars/function_param.cc b/index_tests/vars/function_param.cc index 275078e1..ca65c7d3 100644 --- a/index_tests/vars/function_param.cc +++ b/index_tests/vars/function_param.cc @@ -13,7 +13,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:9|0|1|2", "extent": "3:1-3:30|0|1|0", @@ -51,7 +51,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 8730439006497971620, "detailed_name": "Foo *p0", @@ -63,7 +63,7 @@ OUTPUT: "type": 15041163540773201510, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/vars/function_param_unnamed.cc b/index_tests/vars/function_param_unnamed.cc index 5615e382..c6378208 100644 --- a/index_tests/vars/function_param_unnamed.cc +++ b/index_tests/vars/function_param_unnamed.cc @@ -10,7 +10,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-1:22|0|1|0", diff --git a/index_tests/vars/function_shadow_local.cc b/index_tests/vars/function_shadow_local.cc index 2905c225..e5673809 100644 --- a/index_tests/vars/function_shadow_local.cc +++ b/index_tests/vars/function_shadow_local.cc @@ -18,7 +18,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-9:2|0|1|0", @@ -56,7 +56,7 @@ OUTPUT: "type": 17, "uses": ["3:3-3:4|4259594751088586730|3|4", "8:3-8:4|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }, { "usr": 4508045017817092115, "detailed_name": "int a", @@ -68,7 +68,7 @@ OUTPUT: "type": 17, "uses": ["6:5-6:6|4259594751088586730|3|4"], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/vars/function_shadow_param.cc b/index_tests/vars/function_shadow_param.cc index 62d96aaa..7aac0a2c 100644 --- a/index_tests/vars/function_shadow_param.cc +++ b/index_tests/vars/function_shadow_param.cc @@ -12,7 +12,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "1:6-1:9|0|1|2", "extent": "1:1-3:2|0|1|0", @@ -50,7 +50,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 253, - "storage": 1 + "storage": 0 }, { "usr": 11404600766177939811, "detailed_name": "int p", @@ -63,7 +63,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/index_tests/vars/global_variable.cc b/index_tests/vars/global_variable.cc index 48fe10ab..24f01ca4 100644 --- a/index_tests/vars/global_variable.cc +++ b/index_tests/vars/global_variable.cc @@ -33,7 +33,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 3 + "storage": 2 }] } */ diff --git a/index_tests/vars/global_variable_decl_only.cc b/index_tests/vars/global_variable_decl_only.cc index 947e42c8..a7d88372 100644 --- a/index_tests/vars/global_variable_decl_only.cc +++ b/index_tests/vars/global_variable_decl_only.cc @@ -30,7 +30,7 @@ OUTPUT: "type": 17, "uses": [], "kind": 13, - "storage": 2 + "storage": 1 }] } */ diff --git a/index_tests/vars/type_instance_on_using_type.cc b/index_tests/vars/type_instance_on_using_type.cc index 88cd787e..055024e1 100644 --- a/index_tests/vars/type_instance_on_using_type.cc +++ b/index_tests/vars/type_instance_on_using_type.cc @@ -17,7 +17,7 @@ OUTPUT: "qual_name_offset": 5, "short_name": "Foo", "kind": 12, - "storage": 1, + "storage": 0, "declarations": [], "spell": "3:6-3:9|0|1|2", "extent": "3:1-5:2|0|1|0", @@ -75,7 +75,7 @@ OUTPUT: "type": 7434820806199665424, "uses": [], "kind": 13, - "storage": 1 + "storage": 0 }] } */ diff --git a/src/indexer.cc b/src/indexer.cc index e714a6c2..3777bfd6 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -3,12 +3,12 @@ #include "log.hh" #include "platform.h" #include "serializer.h" -#include "type_printer.h" #include +#include #include using namespace clang; -using namespace llvm; +using llvm::Timer; #include #include @@ -17,9 +17,6 @@ using namespace llvm; #include #include -#if CINDEX_VERSION >= 47 -#define CINDEX_HAVE_PRETTY 1 -#endif #if CINDEX_VERSION >= 48 #define CINDEX_HAVE_ROLE 1 #endif @@ -28,7 +25,18 @@ namespace { // For typedef/using spanning less than or equal to (this number) of lines, // display their declarations on hover. -constexpr int kMaxLinesDisplayTypeAliasDeclarations = 3; +constexpr int kMaxDetailedLines = 3; + +struct CXTranslationUnitImpl { + /* clang::CIndexer */ void *CIdx; + clang::ASTUnit *TheASTUnit; + /* clang::cxstring::CXStringPool */ void *StringPool; + void *Diagnostics; + void *OverridenCursorsPool; + /* clang::index::CommentToXMLConverter */ void *CommentToXML; + unsigned ParsingOptions; + std::vector Arguments; +}; // TODO How to check if a reference to type is a declaration? // This currently also includes constructors/destructors. @@ -295,37 +303,28 @@ struct IndexParam { NamespaceHelper ns; ConstructorCache ctors; - IndexParam(ClangTranslationUnit* tu, - FileConsumer* file_consumer) + IndexParam(ClangTranslationUnit* tu, FileConsumer* file_consumer) : tu(tu), file_consumer(file_consumer) {} -#if CINDEX_HAVE_PRETTY - CXPrintingPolicy print_policy = nullptr; - CXPrintingPolicy print_policy_more = nullptr; - ~IndexParam() { - clang_PrintingPolicy_dispose(print_policy); - clang_PrintingPolicy_dispose(print_policy_more); - } - std::tuple PrettyPrintCursor( - CXCursor cursor, + CXCursor Cursor, std::string_view short_name) { - if (!print_policy) { - print_policy = clang_getCursorPrintingPolicy(cursor); - clang_PrintingPolicy_setProperty(print_policy, - CXPrintingPolicy_TerseOutput, 1); - clang_PrintingPolicy_setProperty(print_policy, - CXPrintingPolicy_FullyQualifiedName, 1); - clang_PrintingPolicy_setProperty( - print_policy, CXPrintingPolicy_SuppressInitializers, 1); - print_policy_more = clang_getCursorPrintingPolicy(cursor); - clang_PrintingPolicy_setProperty(print_policy_more, - CXPrintingPolicy_FullyQualifiedName, 1); - clang_PrintingPolicy_setProperty(print_policy_more, - CXPrintingPolicy_TerseOutput, 1); - } - std::string name = - ToString(clang_getCursorPrettyPrinted(cursor, print_policy_more)); + auto TU = + static_cast(const_cast(Cursor.data[2])); + ASTContext& AST = TU->TheASTUnit->getASTContext(); + PrintingPolicy Policy = AST.getPrintingPolicy(); + Policy.TerseOutput = 1; + Policy.FullyQualifiedName = true; + + const Decl* D = static_cast(Cursor.data[0]); + if (!D) + return {"", 0, 0, 0}; + + llvm::SmallString<128> Str; + llvm::raw_svector_ostream OS(Str); + D->print(OS, Policy); + std::string name = OS.str(); + for (std::string::size_type i = 0;;) { if ((i = name.find("(anonymous ", i)) == std::string::npos) break; @@ -350,7 +349,6 @@ struct IndexParam { } return {name, i, short_name_offset, short_name_size}; } -#endif }; IndexFile* ConsumeFile(IndexParam* param, CXFile file) { @@ -610,8 +608,8 @@ void SetVarDetail(IndexVar& var, def.qual_name_offset = 0; def.hover = hover; } else { -#if 0 && CINDEX_HAVE_PRETTY - //def.detailed_name = param->PrettyPrintCursor(cursor.cx_cursor, false); +#if 0 + def.detailed_name = param->PrettyPrintCursor(cursor.cx_cursor, false); #else int offset = type_name.size(); offset += ConcatTypeAndName(type_name, qualified_name); @@ -623,23 +621,52 @@ void SetVarDetail(IndexVar& var, // int (*a)(); int (&a)(); int (&&a)(); int a[1]; auto x = ... // We can take these into consideration after we have better support for // inside-out syntax. - CXType deref = cx_type; - while (deref.kind == CXType_Pointer || deref.kind == CXType_MemberPointer || - deref.kind == CXType_LValueReference || - deref.kind == CXType_RValueReference) - deref = clang_getPointeeType(deref); - if (deref.kind != CXType_Unexposed && deref.kind != CXType_Auto && - clang_getResultType(deref).kind == CXType_Invalid && - clang_getElementType(deref).kind == CXType_Invalid) { + QualType T = QualType::getFromOpaquePtr(cx_type.data[0]); + while (1) { + const Type* TP = T.getTypePtrOrNull(); + if (!TP) + goto skip; + switch (TP->getTypeClass()) { + default: + break; + // case Type::Auto: + // case Type::ConstantArray: + // case Type::IncompleteArray: + // case Type::VariableArray: + // case Type::DependentSizedArray: + // case Type::Vector: + // case Type::Complex: + // goto skip; + case Type::Pointer: + T = cast(TP)->getPointeeType(); + continue; + case Type::LValueReference: + case Type::RValueReference: + T = cast(TP)->getPointeeType(); + continue; + case Type::MemberPointer: + T = cast(TP)->getPointeeType(); + continue; + } + break; + } + if (T->getAs()) + goto skip; + { const FileContents& fc = param->file_contents[db->path]; - std::optional spell_end = fc.ToOffset(cursor.get_spell().end); - std::optional extent_end = fc.ToOffset(cursor.get_extent().end); - if (extent_end && *spell_end < *extent_end) - def.hover = std::string(def.detailed_name.c_str()) + - fc.content.substr(*spell_end, *extent_end - *spell_end); + Position spell_p = cursor.get_spell().end, + extent_p = cursor.get_extent().end; + if (extent_p.line - spell_p.line < kMaxDetailedLines) { + std::optional spell_end = fc.ToOffset(spell_p), + extent_end = fc.ToOffset(extent_p); + if (extent_end && *spell_end < *extent_end) + def.hover = std::string(def.detailed_name.c_str()) + + fc.content.substr(*spell_end, *extent_end - *spell_end); + } + } + skip:; } #endif - } if (is_first_seen) { if (IndexType* var_type = @@ -1556,15 +1583,9 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { // indexing the definition, then there will not be any (ie) outline // information. if (!is_template_specialization) { -#if CINDEX_HAVE_PRETTY std::tie(func.def.detailed_name, func.def.qual_name_offset, func.def.short_name_offset, func.def.short_name_size) = param->PrettyPrintCursor(decl->cursor, decl->entityInfo->name); -#else - std::tie(func.def.detailed_name, func.def.qual_name_offset, - func.def.short_name_offset, func.def.short_name_size) = - GetFunctionSignature(db, ¶m->ns, decl); -#endif // CXCursor_OverloadedDeclRef in templates are not processed by // OnIndexReference, thus we use TemplateVisitor to collect function @@ -1642,8 +1663,7 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { // For Typedef/CXXTypeAlias spanning a few lines, display the declaration // line, with spelling name replaced with qualified name. - if (extent.end.line - extent.start.line < - kMaxLinesDisplayTypeAliasDeclarations) { + if (extent.end.line - extent.start.line < kMaxDetailedLines) { FileContents& fc = param->file_contents[db->path]; std::optional extent_start = fc.ToOffset(extent.start), spell_start = fc.ToOffset(spell.start), diff --git a/src/type_printer.cc b/src/type_printer.cc deleted file mode 100644 index eac5ad41..00000000 --- a/src/type_printer.cc +++ /dev/null @@ -1,107 +0,0 @@ -#include "type_printer.h" - -namespace { - -int GetNameInsertingPosition(const std::string& type_desc, - const std::string& return_type) { - // Check if type_desc contains an (. - if (type_desc.size() <= return_type.size() || - type_desc.find("(", 0) == std::string::npos) - return type_desc.size(); - // Find the first character where the return_type differs from the - // function_type. In most cases this is the place where the function name - // should be inserted. - int ret = 0; - while (return_type[ret] == type_desc[ret]) - ret++; - - if (ret == 0) { - // If return type and function type do not overlap at all, - // check if it is `auto (...) ->` trailing return type. - if (type_desc.compare(0, 5, "auto ") == 0 && - type_desc.find(" -> ") != std::string::npos) - ret = 5; - } else { - // Otherwise return type is just a prefix of the function_type. - // Skip any eventual spaces after the return type. - while (type_desc[ret] == ' ') - ret++; - } - return ret; -} -} // namespace - -// Build a detailed function signature, including argument names. -std::tuple GetFunctionSignature( - IndexFile* db, - NamespaceHelper* ns, - const CXIdxDeclInfo* decl) { - int num_args = clang_Cursor_getNumArguments(decl->cursor); - int16_t qual_name_offset, short_name_offset, short_name_size; - std::string func_name; - std::tie(func_name, short_name_offset, short_name_size) = - ns->QualifiedName(decl->semanticContainer, decl->entityInfo->name); - - std::vector> args; - for (int i = 0; i < num_args; i++) { - args.emplace_back(-1, ::ToString(clang_getCursorDisplayName( - clang_Cursor_getArgument(decl->cursor, i)))); - } - if (clang_Cursor_isVariadic(decl->cursor)) { - args.emplace_back(-1, ""); - num_args++; - } - - std::string type_desc = ClangCursor(decl->cursor).get_type_description(); - qual_name_offset = GetNameInsertingPosition( - type_desc, ::ToString(clang_getTypeSpelling( - clang_getCursorResultType(decl->cursor)))); - - if (type_desc[qual_name_offset] == '(') { - // Find positions to insert argument names. - // Argument name are before ',' or closing ')'. - num_args = 0; - for (int balance = 0, i = qual_name_offset; - i < int(type_desc.size()) && num_args < int(args.size()); i++) { - if (type_desc[i] == '(' || type_desc[i] == '[') - balance++; - else if (type_desc[i] == ')' || type_desc[i] == ']') { - if (--balance <= 0) { - args[num_args].first = i; - break; - } - } else if (type_desc[i] == ',' && balance == 1) - args[num_args++].first = i; - } - - // Second pass: insert argument names before each comma and closing paren. - int i = qual_name_offset; - short_name_offset += qual_name_offset; - std::string type_desc_with_names(type_desc.begin(), type_desc.begin() + i); - type_desc_with_names.append(func_name); - for (auto& arg : args) { - if (arg.first < 0) - break; - if (arg.second.empty()) - continue; - // TODO Use inside-out syntax. Note, clang/lib/AST/TypePrinter.cpp does - // not print arg names. - type_desc_with_names.insert(type_desc_with_names.end(), &type_desc[i], - &type_desc[arg.first]); - i = arg.first; - ConcatTypeAndName(type_desc_with_names, arg.second); - } - type_desc_with_names.insert(type_desc_with_names.end(), - type_desc.begin() + i, type_desc.end()); - type_desc = std::move(type_desc_with_names); - } else { - // type_desc is either a typedef, or some complicated type we cannot handle. - // Append the func_name in this case. - int offset = type_desc.size(); - offset += ConcatTypeAndName(type_desc, func_name); - qual_name_offset = offset; - short_name_offset += offset; - } - - return {type_desc, qual_name_offset, short_name_offset, short_name_size}; -} diff --git a/src/type_printer.h b/src/type_printer.h deleted file mode 100644 index 87b39ca5..00000000 --- a/src/type_printer.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include "indexer.h" - -std::tuple GetFunctionSignature( - IndexFile* db, - NamespaceHelper* ns, - const CXIdxDeclInfo* decl);