From 6a95d2f46f382a460ece15c976926967247d4ebb Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Mon, 20 Feb 2017 21:55:48 -0800 Subject: [PATCH] mark type definition as interesting --- main.cpp | 14 ++++++++++---- tests/class_forward_declaration.cc | 2 +- tests/constructors/constructor.cc | 2 +- tests/constructors/destructor.cc | 2 +- tests/declaration_vs_definition/class.cc | 2 +- tests/declaration_vs_definition/class_member.cc | 2 +- .../class_member_static.cc | 2 +- tests/declaration_vs_definition/method.cc | 2 +- tests/enums/enum_class_decl.cc | 2 +- tests/enums/enum_decl.cc | 2 +- tests/enums/enum_inherit.cc | 2 +- tests/enums/enum_usage.cc | 2 +- tests/inheritance/class_inherit.cc | 4 ++-- .../inheritance/class_inherit_templated_parent.cc | 10 +++++----- tests/inheritance/class_multiple_inherit.cc | 8 ++++---- tests/inheritance/function_override.cc | 4 ++-- tests/inheritance/interface_pure_virtual.cc | 2 +- tests/method_declaration.cc | 2 +- tests/method_definition.cc | 2 +- tests/method_inline_declaration.cc | 2 +- tests/namespaces/method_declaration.cc | 2 +- tests/namespaces/method_definition.cc | 2 +- tests/namespaces/method_inline_declaration.cc | 2 +- tests/unions/union_decl.cc | 2 +- tests/unions/union_usage.cc | 2 +- tests/usage/func_usage_addr_method.cc | 2 +- tests/usage/func_usage_call_method.cc | 2 +- tests/usage/func_usage_class_inline_var_def.cc | 2 +- tests/usage/func_usage_forward_decl_method.cc | 2 +- tests/usage/type_usage_as_template_parameter.cc | 2 +- .../type_usage_as_template_parameter_complex.cc | 2 +- .../type_usage_as_template_parameter_simple.cc | 2 +- tests/usage/type_usage_declare_extern.cc | 2 +- tests/usage/type_usage_declare_field.cc | 4 ++-- tests/usage/type_usage_declare_local.cc | 2 +- tests/usage/type_usage_declare_param.cc | 2 +- tests/usage/type_usage_declare_qualifiers.cc | 2 +- tests/usage/type_usage_on_return_type.cc | 2 +- tests/usage/type_usage_typedef_and_using.cc | 12 ++++-------- .../usage/type_usage_typedef_and_using_template.cc | 4 ++-- tests/usage/type_usage_various.cc | 2 +- tests/usage/usage_inside_of_call.cc | 2 +- tests/usage/var_usage_class_member.cc | 2 +- tests/usage/var_usage_class_member_static.cc | 2 +- tests/vars/class_member.cc | 2 +- tests/vars/class_static_member.cc | 2 +- tests/vars/class_static_member_decl_only.cc | 2 +- 47 files changed, 70 insertions(+), 68 deletions(-) diff --git a/main.cpp b/main.cpp index 288ec326..40beaf08 100644 --- a/main.cpp +++ b/main.cpp @@ -92,6 +92,12 @@ bool IsEqualTo(const Location& o) { return (wrapper.value >> 1) == (o.wrapper.value >> 1); } +Location WithInteresting(bool interesting) { + Location result = *this; + result.interesting = interesting; + return result; +} + END_BITFIELD_TYPE() struct FileDb { @@ -1058,8 +1064,8 @@ void indexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { type_def->short_name = decl->entityInfo->name; type_def->qualified_name = ns->QualifiedName(decl->semanticContainer, type_def->short_name); - Location decl_loc = db->file_db.Resolve(decl->loc, false /*interesting*/); - type_def->definition = decl_loc; + Location decl_loc = db->file_db.Resolve(decl->loc, true /*interesting*/); + type_def->definition = decl_loc.WithInteresting(false); type_def->AddUsage(decl_loc); break; } @@ -1082,8 +1088,8 @@ void indexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { // } assert(decl->isDefinition); - Location decl_loc = db->file_db.Resolve(decl->loc, false /*interesting*/); - type_def->definition = decl_loc; + Location decl_loc = db->file_db.Resolve(decl->loc, true /*interesting*/); + type_def->definition = decl_loc.WithInteresting(false); type_def->AddUsage(decl_loc); //type_def->alias_of diff --git a/tests/class_forward_declaration.cc b/tests/class_forward_declaration.cc index c4f3f30c..676364a7 100644 --- a/tests/class_forward_declaration.cc +++ b/tests/class_forward_declaration.cc @@ -12,7 +12,7 @@ OUTPUT: "short_name": "Foo", "qualified_name": "Foo", "definition": "1:3:7", - "uses": ["1:1:7", "1:2:7", "1:3:7", "1:4:7"] + "uses": ["1:1:7", "1:2:7", "*1:3:7", "1:4:7"] }], "functions": [], "variables": [] diff --git a/tests/constructors/constructor.cc b/tests/constructors/constructor.cc index df4b9883..d027acd0 100644 --- a/tests/constructors/constructor.cc +++ b/tests/constructors/constructor.cc @@ -18,7 +18,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0], - "uses": ["1:1:7", "1:3:3", "*1:7:3", "*1:8:3", "*1:8:17"] + "uses": ["*1:1:7", "1:3:3", "*1:7:3", "*1:8:3", "*1:8:17"] }], "functions": [{ "id": 0, diff --git a/tests/constructors/destructor.cc b/tests/constructors/destructor.cc index 0037d377..194c8fca 100644 --- a/tests/constructors/destructor.cc +++ b/tests/constructors/destructor.cc @@ -23,7 +23,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0, 1], - "uses": ["1:1:7", "1:3:3", "1:4:3", "*1:8:3"] + "uses": ["*1:1:7", "1:3:3", "1:4:3", "*1:8:3"] }], "functions": [{ "id": 0, diff --git a/tests/declaration_vs_definition/class.cc b/tests/declaration_vs_definition/class.cc index b092ba62..a999006e 100644 --- a/tests/declaration_vs_definition/class.cc +++ b/tests/declaration_vs_definition/class.cc @@ -14,7 +14,7 @@ OUTPUT: "short_name": "Foo", "qualified_name": "Foo", "definition": "1:3:7", - "uses": ["1:1:7", "1:2:7", "1:3:7", "1:4:7"] + "uses": ["1:1:7", "1:2:7", "*1:3:7", "1:4:7"] }], "functions": [], "variables": [] diff --git a/tests/declaration_vs_definition/class_member.cc b/tests/declaration_vs_definition/class_member.cc index 268d7c76..99cc6183 100644 --- a/tests/declaration_vs_definition/class_member.cc +++ b/tests/declaration_vs_definition/class_member.cc @@ -12,7 +12,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0], - "uses": ["1:1:7"] + "uses": ["*1:1:7"] }], "functions": [], "variables": [{ diff --git a/tests/declaration_vs_definition/class_member_static.cc b/tests/declaration_vs_definition/class_member_static.cc index eaebafd0..a50ef7fa 100644 --- a/tests/declaration_vs_definition/class_member_static.cc +++ b/tests/declaration_vs_definition/class_member_static.cc @@ -14,7 +14,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0], - "uses": ["1:1:7", "1:5:5"] + "uses": ["*1:1:7", "1:5:5"] }], "functions": [], "variables": [{ diff --git a/tests/declaration_vs_definition/method.cc b/tests/declaration_vs_definition/method.cc index e32b94fa..4ada7cbd 100644 --- a/tests/declaration_vs_definition/method.cc +++ b/tests/declaration_vs_definition/method.cc @@ -16,7 +16,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0, 1, 2], - "uses": ["1:1:7", "1:7:6"] + "uses": ["*1:1:7", "1:7:6"] }], "functions": [{ "id": 0, diff --git a/tests/enums/enum_class_decl.cc b/tests/enums/enum_class_decl.cc index abacf086..1626f041 100644 --- a/tests/enums/enum_class_decl.cc +++ b/tests/enums/enum_class_decl.cc @@ -13,7 +13,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:12", "vars": [0, 1], - "uses": ["1:1:12"] + "uses": ["*1:1:12"] }], "functions": [], "variables": [{ diff --git a/tests/enums/enum_decl.cc b/tests/enums/enum_decl.cc index 635c332a..82dc251e 100644 --- a/tests/enums/enum_decl.cc +++ b/tests/enums/enum_decl.cc @@ -13,7 +13,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:6", "vars": [0, 1], - "uses": ["1:1:6"] + "uses": ["*1:1:6"] }], "functions": [], "variables": [{ diff --git a/tests/enums/enum_inherit.cc b/tests/enums/enum_inherit.cc index ad9298a1..c01af887 100644 --- a/tests/enums/enum_inherit.cc +++ b/tests/enums/enum_inherit.cc @@ -13,7 +13,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:6", "vars": [0, 1], - "uses": ["1:1:6"] + "uses": ["*1:1:6"] }], "functions": [], "variables": [{ diff --git a/tests/enums/enum_usage.cc b/tests/enums/enum_usage.cc index 1c55a94c..5b146df7 100644 --- a/tests/enums/enum_usage.cc +++ b/tests/enums/enum_usage.cc @@ -15,7 +15,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:12", "vars": [0, 1], - "uses": ["1:1:12", "*1:6:1", "1:6:9"] + "uses": ["*1:1:12", "*1:6:1", "1:6:9"] }], "functions": [], "variables": [{ diff --git a/tests/inheritance/class_inherit.cc b/tests/inheritance/class_inherit.cc index 2e14f2be..82987de9 100644 --- a/tests/inheritance/class_inherit.cc +++ b/tests/inheritance/class_inherit.cc @@ -11,7 +11,7 @@ OUTPUT: "qualified_name": "Parent", "definition": "1:1:7", "derived": [1], - "uses": ["1:1:7", "*1:2:24"] + "uses": ["*1:1:7", "*1:2:24"] }, { "id": 1, "usr": "c:@S@Derived", @@ -19,7 +19,7 @@ OUTPUT: "qualified_name": "Derived", "definition": "1:2:7", "parents": [0], - "uses": ["1:2:7"] + "uses": ["*1:2:7"] }], "functions": [], "variables": [] diff --git a/tests/inheritance/class_inherit_templated_parent.cc b/tests/inheritance/class_inherit_templated_parent.cc index a140153e..1a5dc583 100644 --- a/tests/inheritance/class_inherit_templated_parent.cc +++ b/tests/inheritance/class_inherit_templated_parent.cc @@ -22,7 +22,7 @@ OUTPUT: "qualified_name": "Base1", "definition": "1:2:7", "derived": [2, 5], - "uses": ["1:2:7", "*1:8:18", "*1:13:17"] + "uses": ["*1:2:7", "*1:8:18", "*1:13:17"] }, { "id": 1, "usr": "c:@ST>1#T@Base2", @@ -30,7 +30,7 @@ OUTPUT: "qualified_name": "Base2", "definition": "1:5:7", "derived": [3, 5], - "uses": ["1:5:7", "*1:11:18", "*1:13:27"] + "uses": ["*1:5:7", "*1:11:18", "*1:13:27"] }, { "id": 2, "usr": "c:@ST>1#Ni@Derived1", @@ -39,7 +39,7 @@ OUTPUT: "definition": "1:8:7", "parents": [0], "derived": [5], - "uses": ["1:8:7", "*1:13:43"] + "uses": ["*1:8:7", "*1:13:43"] }, { "id": 3, "usr": "c:@ST>1#T@Derived2", @@ -48,7 +48,7 @@ OUTPUT: "definition": "1:11:7", "parents": [1], "derived": [5], - "uses": ["1:11:7", "*1:13:56"] + "uses": ["*1:11:7", "*1:13:56"] }, { "id": 4, "usr": "c:class_inherit_templated_parent.cc@154", @@ -60,7 +60,7 @@ OUTPUT: "qualified_name": "Derived", "definition": "1:13:7", "parents": [0, 1, 2, 3], - "uses": ["1:13:7", "*1:13:33", "*1:13:65"] + "uses": ["*1:13:7", "*1:13:33", "*1:13:65"] }], "functions": [], "variables": [] diff --git a/tests/inheritance/class_multiple_inherit.cc b/tests/inheritance/class_multiple_inherit.cc index d9df276a..b564efbf 100644 --- a/tests/inheritance/class_multiple_inherit.cc +++ b/tests/inheritance/class_multiple_inherit.cc @@ -13,7 +13,7 @@ OUTPUT: "qualified_name": "Root", "definition": "1:1:7", "derived": [1, 2], - "uses": ["1:1:7", "*1:2:24", "*1:3:24"] + "uses": ["*1:1:7", "*1:2:24", "*1:3:24"] }, { "id": 1, "usr": "c:@S@MiddleA", @@ -22,7 +22,7 @@ OUTPUT: "definition": "1:2:7", "parents": [0], "derived": [3], - "uses": ["1:2:7", "*1:4:24"] + "uses": ["*1:2:7", "*1:4:24"] }, { "id": 2, "usr": "c:@S@MiddleB", @@ -31,7 +31,7 @@ OUTPUT: "definition": "1:3:7", "parents": [0], "derived": [3], - "uses": ["1:3:7", "*1:4:40"] + "uses": ["*1:3:7", "*1:4:40"] }, { "id": 3, "usr": "c:@S@Derived", @@ -39,7 +39,7 @@ OUTPUT: "qualified_name": "Derived", "definition": "1:4:7", "parents": [1, 2], - "uses": ["1:4:7"] + "uses": ["*1:4:7"] }], "functions": [], "variables": [] diff --git a/tests/inheritance/function_override.cc b/tests/inheritance/function_override.cc index da2590eb..0a9a5d94 100644 --- a/tests/inheritance/function_override.cc +++ b/tests/inheritance/function_override.cc @@ -16,7 +16,7 @@ OUTPUT: "definition": "1:1:7", "derived": [1], "funcs": [0], - "uses": ["1:1:7", "*1:4:24"] + "uses": ["*1:1:7", "*1:4:24"] }, { "id": 1, "usr": "c:@S@Derived", @@ -25,7 +25,7 @@ OUTPUT: "definition": "1:4:7", "parents": [0], "funcs": [1], - "uses": ["1:4:7"] + "uses": ["*1:4:7"] }], "functions": [{ "id": 0, diff --git a/tests/inheritance/interface_pure_virtual.cc b/tests/inheritance/interface_pure_virtual.cc index 8f7d8723..29a5ba61 100644 --- a/tests/inheritance/interface_pure_virtual.cc +++ b/tests/inheritance/interface_pure_virtual.cc @@ -12,7 +12,7 @@ OUTPUT: "qualified_name": "IFoo", "definition": "1:1:7", "funcs": [0], - "uses": ["1:1:7"] + "uses": ["*1:1:7"] }], "functions": [{ "id": 0, diff --git a/tests/method_declaration.cc b/tests/method_declaration.cc index 00c740c0..0e6755db 100644 --- a/tests/method_declaration.cc +++ b/tests/method_declaration.cc @@ -16,7 +16,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0], - "uses": ["1:1:7"] + "uses": ["*1:1:7"] }], "functions": [{ "id": 0, diff --git a/tests/method_definition.cc b/tests/method_definition.cc index e1152f3b..5ddfa307 100644 --- a/tests/method_definition.cc +++ b/tests/method_definition.cc @@ -14,7 +14,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0], - "uses": ["1:1:7", "1:5:6"] + "uses": ["*1:1:7", "1:5:6"] }], "functions": [{ "id": 0, diff --git a/tests/method_inline_declaration.cc b/tests/method_inline_declaration.cc index 6e281fdc..acac28c5 100644 --- a/tests/method_inline_declaration.cc +++ b/tests/method_inline_declaration.cc @@ -12,7 +12,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0], - "uses": ["1:1:7"] + "uses": ["*1:1:7"] }], "functions": [{ "id": 0, diff --git a/tests/namespaces/method_declaration.cc b/tests/namespaces/method_declaration.cc index 293fc792..8e5a2561 100644 --- a/tests/namespaces/method_declaration.cc +++ b/tests/namespaces/method_declaration.cc @@ -14,7 +14,7 @@ OUTPUT: "qualified_name": "hello::Foo", "definition": "1:2:7", "funcs": [0], - "uses": ["1:2:7"] + "uses": ["*1:2:7"] }], "functions": [{ "id": 0, diff --git a/tests/namespaces/method_definition.cc b/tests/namespaces/method_definition.cc index 983c3592..cec742aa 100644 --- a/tests/namespaces/method_definition.cc +++ b/tests/namespaces/method_definition.cc @@ -16,7 +16,7 @@ OUTPUT: "qualified_name": "hello::Foo", "definition": "1:2:7", "funcs": [0], - "uses": ["1:2:7", "1:6:6"] + "uses": ["*1:2:7", "1:6:6"] }], "functions": [{ "id": 0, diff --git a/tests/namespaces/method_inline_declaration.cc b/tests/namespaces/method_inline_declaration.cc index 2555922e..1cf86fd8 100644 --- a/tests/namespaces/method_inline_declaration.cc +++ b/tests/namespaces/method_inline_declaration.cc @@ -14,7 +14,7 @@ OUTPUT: "qualified_name": "hello::Foo", "definition": "1:2:7", "funcs": [0], - "uses": ["1:2:7"] + "uses": ["*1:2:7"] }], "functions": [{ "id": 0, diff --git a/tests/unions/union_decl.cc b/tests/unions/union_decl.cc index 929c96a5..0afc3fa3 100644 --- a/tests/unions/union_decl.cc +++ b/tests/unions/union_decl.cc @@ -13,7 +13,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0, 1], - "uses": ["1:1:7"] + "uses": ["*1:1:7"] }], "functions": [], "variables": [{ diff --git a/tests/unions/union_usage.cc b/tests/unions/union_usage.cc index 7333bf3c..709b53cf 100644 --- a/tests/unions/union_usage.cc +++ b/tests/unions/union_usage.cc @@ -19,7 +19,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0, 1], - "uses": ["1:1:7", "*1:6:1", "*1:8:10"] + "uses": ["*1:1:7", "*1:6:1", "*1:8:10"] }], "functions": [{ "id": 0, diff --git a/tests/usage/func_usage_addr_method.cc b/tests/usage/func_usage_addr_method.cc index 8e1b9f8d..a76849cc 100644 --- a/tests/usage/func_usage_addr_method.cc +++ b/tests/usage/func_usage_addr_method.cc @@ -17,7 +17,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:8", "funcs": [0], - "uses": ["1:1:8", "1:6:13"] + "uses": ["*1:1:8", "1:6:13"] }], "functions": [{ "id": 0, diff --git a/tests/usage/func_usage_call_method.cc b/tests/usage/func_usage_call_method.cc index 6a7d3158..6473578e 100644 --- a/tests/usage/func_usage_call_method.cc +++ b/tests/usage/func_usage_call_method.cc @@ -17,7 +17,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:8", "funcs": [0], - "uses": ["1:1:8", "*1:6:3"] + "uses": ["*1:1:8", "*1:6:3"] }], "functions": [{ "id": 0, diff --git a/tests/usage/func_usage_class_inline_var_def.cc b/tests/usage/func_usage_class_inline_var_def.cc index bdca5410..498900dd 100644 --- a/tests/usage/func_usage_class_inline_var_def.cc +++ b/tests/usage/func_usage_class_inline_var_def.cc @@ -16,7 +16,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:5:7", "vars": [0], - "uses": ["1:5:7"] + "uses": ["*1:5:7"] }], "functions": [{ "id": 0, diff --git a/tests/usage/func_usage_forward_decl_method.cc b/tests/usage/func_usage_forward_decl_method.cc index a130e6a3..1214aca0 100644 --- a/tests/usage/func_usage_forward_decl_method.cc +++ b/tests/usage/func_usage_forward_decl_method.cc @@ -16,7 +16,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:8", "funcs": [0], - "uses": ["1:1:8", "*1:6:3"] + "uses": ["*1:1:8", "*1:6:3"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_as_template_parameter.cc b/tests/usage/type_usage_as_template_parameter.cc index 2b68d8b9..d6815c15 100644 --- a/tests/usage/type_usage_as_template_parameter.cc +++ b/tests/usage/type_usage_as_template_parameter.cc @@ -23,7 +23,7 @@ OUTPUT: "short_name": "S", "qualified_name": "S", "definition": "1:4:8", - "uses": ["1:4:8", "*1:7:19", "*1:9:12", "*1:10:14"] + "uses": ["*1:4:8", "*1:7:19", "*1:9:12", "*1:10:14"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_as_template_parameter_complex.cc b/tests/usage/type_usage_as_template_parameter_complex.cc index 63e15d24..eb79612e 100644 --- a/tests/usage/type_usage_as_template_parameter_complex.cc +++ b/tests/usage/type_usage_as_template_parameter_complex.cc @@ -100,7 +100,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:64:7", "funcs": [3], - "uses": ["1:64:7", "1:79:21"] + "uses": ["*1:64:7", "1:79:21"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_as_template_parameter_simple.cc b/tests/usage/type_usage_as_template_parameter_simple.cc index 1f0f4f3d..a8ca8a90 100644 --- a/tests/usage/type_usage_as_template_parameter_simple.cc +++ b/tests/usage/type_usage_as_template_parameter_simple.cc @@ -14,7 +14,7 @@ OUTPUT: "short_name": "unique_ptr", "qualified_name": "unique_ptr", "definition": "1:2:7", - "uses": ["1:2:7", "*1:6:8"] + "uses": ["*1:2:7", "*1:6:8"] }, { "id": 1, "usr": "c:@S@S", diff --git a/tests/usage/type_usage_declare_extern.cc b/tests/usage/type_usage_declare_extern.cc index 94688ee0..6b557429 100644 --- a/tests/usage/type_usage_declare_extern.cc +++ b/tests/usage/type_usage_declare_extern.cc @@ -10,7 +10,7 @@ OUTPUT: "short_name": "T", "qualified_name": "T", "definition": "1:1:8", - "uses": ["1:1:8", "*1:3:8"] + "uses": ["*1:1:8", "*1:3:8"] }], "functions": [], "variables": [{ diff --git a/tests/usage/type_usage_declare_field.cc b/tests/usage/type_usage_declare_field.cc index 0f3b6624..a5f3243a 100644 --- a/tests/usage/type_usage_declare_field.cc +++ b/tests/usage/type_usage_declare_field.cc @@ -19,7 +19,7 @@ OUTPUT: "short_name": "ImplementedType", "qualified_name": "ImplementedType", "definition": "1:2:8", - "uses": ["1:2:8", "*1:6:3"] + "uses": ["*1:2:8", "*1:6:3"] }, { "id": 2, "usr": "c:@S@Foo", @@ -27,7 +27,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:4:8", "vars": [0, 1], - "uses": ["1:4:8"] + "uses": ["*1:4:8"] }], "functions": [], "variables": [{ diff --git a/tests/usage/type_usage_declare_local.cc b/tests/usage/type_usage_declare_local.cc index 2691b9a6..3245df06 100644 --- a/tests/usage/type_usage_declare_local.cc +++ b/tests/usage/type_usage_declare_local.cc @@ -19,7 +19,7 @@ OUTPUT: "short_name": "ImplementedType", "qualified_name": "ImplementedType", "definition": "1:2:8", - "uses": ["1:2:8", "*1:6:3"] + "uses": ["*1:2:8", "*1:6:3"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_declare_param.cc b/tests/usage/type_usage_declare_param.cc index ebad66f1..737b5669 100644 --- a/tests/usage/type_usage_declare_param.cc +++ b/tests/usage/type_usage_declare_param.cc @@ -16,7 +16,7 @@ OUTPUT: "short_name": "ImplementedType", "qualified_name": "ImplementedType", "definition": "1:2:8", - "uses": ["1:2:8", "*1:4:26"] + "uses": ["*1:2:8", "*1:4:26"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_declare_qualifiers.cc b/tests/usage/type_usage_declare_qualifiers.cc index d1e9380f..1c208c1a 100644 --- a/tests/usage/type_usage_declare_qualifiers.cc +++ b/tests/usage/type_usage_declare_qualifiers.cc @@ -15,7 +15,7 @@ OUTPUT: "short_name": "Type", "qualified_name": "Type", "definition": "1:1:8", - "uses": ["1:1:8", "*1:3:10", "*1:3:26", "*1:4:3", "*1:5:3", "*1:6:9", "*1:7:9"] + "uses": ["*1:1:8", "*1:3:10", "*1:3:26", "*1:4:3", "*1:5:3", "*1:6:9", "*1:7:9"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_on_return_type.cc b/tests/usage/type_usage_on_return_type.cc index 29cb7b73..00bd6d15 100644 --- a/tests/usage/type_usage_on_return_type.cc +++ b/tests/usage/type_usage_on_return_type.cc @@ -31,7 +31,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:7:7", "funcs": [1, 2], - "uses": ["1:7:7", "1:12:7", "1:13:6"] + "uses": ["*1:7:7", "1:12:7", "1:13:6"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_typedef_and_using.cc b/tests/usage/type_usage_typedef_and_using.cc index d84a6abd..1d5a042c 100644 --- a/tests/usage/type_usage_typedef_and_using.cc +++ b/tests/usage/type_usage_typedef_and_using.cc @@ -11,10 +11,6 @@ void accept3(Foo3*) {} /* -// TODO: I think we should mark using Foo1 = foo as an interesting usage on -// Foo1. -// TODO: Also mark class Foo {} as an interesting usage of Foo. - OUTPUT: { "types": [{ @@ -28,7 +24,7 @@ OUTPUT: "qualified_name": "Foo1", "definition": "1:2:7", "alias_of": 0, - "uses": ["1:2:7", "*1:4:14", "*1:8:14"] + "uses": ["*1:2:7", "*1:4:14", "*1:8:14"] }, { "id": 2, "usr": "c:type_usage_typedef_and_using.cc@T@Foo2", @@ -36,7 +32,7 @@ OUTPUT: "qualified_name": "Foo2", "definition": "1:3:13", "alias_of": 0, - "uses": ["1:3:13", "*1:9:14"] + "uses": ["*1:3:13", "*1:9:14"] }, { "id": 3, "usr": "c:@Foo3", @@ -44,14 +40,14 @@ OUTPUT: "qualified_name": "Foo3", "definition": "1:4:7", "alias_of": 1, - "uses": ["1:4:7", "*1:10:14"] + "uses": ["*1:4:7", "*1:10:14"] }, { "id": 4, "usr": "c:@Foo4", "short_name": "Foo4", "qualified_name": "Foo4", "definition": "1:5:7", - "uses": ["1:5:7"] + "uses": ["*1:5:7"] }], "functions": [{ "id": 0, diff --git a/tests/usage/type_usage_typedef_and_using_template.cc b/tests/usage/type_usage_typedef_and_using_template.cc index 22c4fc95..f3ad0e19 100644 --- a/tests/usage/type_usage_typedef_and_using_template.cc +++ b/tests/usage/type_usage_typedef_and_using_template.cc @@ -18,7 +18,7 @@ OUTPUT: "qualified_name": "Foo1", "definition": "1:4:7", "alias_of": 0, - "uses": ["1:4:7", "*1:5:13"] + "uses": ["*1:4:7", "*1:5:13"] }, { "id": 2, "usr": "c:type_usage_typedef_and_using_template.cc@T@Foo2", @@ -26,7 +26,7 @@ OUTPUT: "qualified_name": "Foo2", "definition": "1:5:19", "alias_of": 0, - "uses": ["1:5:19"] + "uses": ["*1:5:19"] }], "functions": [], "variables": [] diff --git a/tests/usage/type_usage_various.cc b/tests/usage/type_usage_various.cc index c47a5143..8d839f9a 100644 --- a/tests/usage/type_usage_various.cc +++ b/tests/usage/type_usage_various.cc @@ -19,7 +19,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "funcs": [0], - "uses": ["1:1:7", "*1:2:3", "*1:5:1", "1:5:6", "*1:6:3", "*1:10:8"] + "uses": ["*1:1:7", "*1:2:3", "*1:5:1", "1:5:6", "*1:6:3", "*1:10:8"] }], "functions": [{ "id": 0, diff --git a/tests/usage/usage_inside_of_call.cc b/tests/usage/usage_inside_of_call.cc index e41859de..eb4aed5c 100644 --- a/tests/usage/usage_inside_of_call.cc +++ b/tests/usage/usage_inside_of_call.cc @@ -24,7 +24,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:5:8", "vars": [1, 0], - "uses": ["1:5:8", "1:10:5", "1:14:22", "1:14:40"] + "uses": ["*1:5:8", "1:10:5", "1:14:22", "1:14:40"] }], "functions": [{ "id": 0, diff --git a/tests/usage/var_usage_class_member.cc b/tests/usage/var_usage_class_member.cc index 15b308c4..003fd378 100644 --- a/tests/usage/var_usage_class_member.cc +++ b/tests/usage/var_usage_class_member.cc @@ -27,7 +27,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0, 1], - "uses": ["1:1:7", "*1:11:3"] + "uses": ["*1:1:7", "*1:11:3"] }], "functions": [{ "id": 0, diff --git a/tests/usage/var_usage_class_member_static.cc b/tests/usage/var_usage_class_member_static.cc index 1859ef7b..43be421e 100644 --- a/tests/usage/var_usage_class_member_static.cc +++ b/tests/usage/var_usage_class_member_static.cc @@ -17,7 +17,7 @@ OUTPUT: "short_name": "Foo", "qualified_name": "Foo", "definition": "1:1:8", - "uses": ["1:1:8", "1:8:10"] + "uses": ["*1:1:8", "1:8:10"] }], "functions": [{ "id": 0, diff --git a/tests/vars/class_member.cc b/tests/vars/class_member.cc index 667b0abe..786b7698 100644 --- a/tests/vars/class_member.cc +++ b/tests/vars/class_member.cc @@ -11,7 +11,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0], - "uses": ["1:1:7", "*1:2:3"] + "uses": ["*1:1:7", "*1:2:3"] }], "functions": [], "variables": [{ diff --git a/tests/vars/class_static_member.cc b/tests/vars/class_static_member.cc index 7f18d142..1039cb92 100644 --- a/tests/vars/class_static_member.cc +++ b/tests/vars/class_static_member.cc @@ -13,7 +13,7 @@ OUTPUT: "qualified_name": "Foo", "definition": "1:1:7", "vars": [0], - "uses": ["1:1:7", "*1:2:10", "*1:4:1", "1:4:6"] + "uses": ["*1:1:7", "*1:2:10", "*1:4:1", "1:4:6"] }], "functions": [], "variables": [{ diff --git a/tests/vars/class_static_member_decl_only.cc b/tests/vars/class_static_member_decl_only.cc index 8dc177e8..59f3ba82 100644 --- a/tests/vars/class_static_member_decl_only.cc +++ b/tests/vars/class_static_member_decl_only.cc @@ -10,7 +10,7 @@ OUTPUT: "short_name": "Foo", "qualified_name": "Foo", "definition": "1:1:7", - "uses": ["1:1:7"] + "uses": ["*1:1:7"] }], "functions": [], "variables": [{