diff --git a/src/indexer.cc b/src/indexer.cc index 148c89ca..65b97e47 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -926,12 +926,13 @@ ClangCursor::VisitResult VisitMacroDefinitionAndExpansions(ClangCursor cursor, if (cursor.get_kind() == CXCursor_MacroDefinition) { CXSourceRange cx_extent = clang_getCursorExtent(cursor.cx_cursor); var_def->def.short_name = cursor.get_display_name(); + var_def->def.detailed_name = cursor.get_display_name(); + var_def->def.hover = + "#define " + GetDocumentContentInRange(param->tu->cx_tu, cx_extent); var_def->def.is_local = false; var_def->def.is_macro = true; var_def->def.definition_spelling = decl_loc_spelling; var_def->def.definition_extent = Resolve(cx_extent, nullptr); - var_def->def.detailed_name = - "#define " + GetDocumentContentInRange(param->tu->cx_tu, cx_extent); } break; @@ -1023,6 +1024,7 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { var->def.detailed_name = type_name + " " + ns->QualifiedName(decl->semanticContainer, var->def.short_name); + var->def.hover = type_name; var->def.is_local = !decl->semanticContainer || @@ -1172,6 +1174,7 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { // type_desc is probably the name of a typedef. func->def.detailed_name = type_desc + " " + qualified_name; } + func->def.hover = func->def.detailed_name; // Add function usage information. We only want to do it once per // definition/declaration. Do it on definition since there should only @@ -1240,15 +1243,18 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { if (alias_of) type->def.alias_of = alias_of.value(); - type->def.short_name = decl->entityInfo->name; Range spell = ResolveSpelling(decl->cursor); Range extent = ResolveExtent(decl->cursor); type->def.definition_spelling = spell; type->def.definition_extent = extent; + type->def.short_name = decl->entityInfo->name; type->def.detailed_name = ns->QualifiedName(decl->semanticContainer, type->def.short_name); + + type->def.hover = type->def.detailed_name; + // For single line Typedef/CXXTypeAlias, display the declaration line, // with spelling name replaced with qualified name. // TODO Think how to display multi-line declaration like `typedef struct { ... } foo;` @@ -1256,7 +1262,7 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { std::string decl_text = GetDocumentContentInRange( param->tu->cx_tu, clang_getCursorExtent(decl->cursor)); if (decl_text.size() == extent.end.column - extent.start.column) { - type->def.detailed_name = + type->def.hover = decl_text.substr(0, spell.start.column - extent.start.column) + type->def.detailed_name + decl_text.substr(spell.end.column - extent.start.column); @@ -1297,7 +1303,7 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { type->def.detailed_name = ns->QualifiedName(decl->semanticContainer, type->def.short_name); - + type->def.hover = type->def.detailed_name; // } if (decl->isDefinition) { @@ -1430,6 +1436,7 @@ void OnIndexReference(CXClientData client_data, const CXIdxEntityRefInfo* ref) { std::string type_name = ToString( clang_getTypeSpelling(clang_getCursorType(referenced.cx_cursor))); var->def.detailed_name = type_name + " " + var->def.short_name; + var->def.hover = type_name; var->def.is_local = false; UniqueAdd(var->uses, ResolveSpelling(referenced.cx_cursor)); AddDeclInitializerUsages(db, referenced.cx_cursor); diff --git a/src/indexer.h b/src/indexer.h index ed2431bd..ed6369ab 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -149,6 +149,7 @@ struct TypeDefDefinitionData { // General metadata. std::string short_name; std::string detailed_name; + std::string hover; // While a class/type can technically have a separate declaration/definition, // it doesn't really happen in practice. The declaration never contains @@ -178,6 +179,7 @@ struct TypeDefDefinitionData { const TypeDefDefinitionData& other) const { return short_name == other.short_name && detailed_name == other.detailed_name && + hover == other.hover && definition_spelling == other.definition_spelling && definition_extent == other.definition_extent && alias_of == other.alias_of && parents == other.parents && @@ -199,6 +201,7 @@ void Reflect(TVisitor& visitor, REFLECT_MEMBER_START(); REFLECT_MEMBER(short_name); REFLECT_MEMBER(detailed_name); + REFLECT_MEMBER(hover); REFLECT_MEMBER(definition_spelling); REFLECT_MEMBER(definition_extent); REFLECT_MEMBER(alias_of); @@ -244,6 +247,7 @@ struct FuncDefDefinitionData { // General metadata. std::string short_name; std::string detailed_name; + std::string hover; optional definition_spelling; optional definition_extent; @@ -267,6 +271,7 @@ struct FuncDefDefinitionData { const { return short_name == other.short_name && detailed_name == other.detailed_name && + hover == other.hover && definition_spelling == other.definition_spelling && definition_extent == other.definition_extent && declaring_type == other.declaring_type && base == other.base && @@ -291,6 +296,7 @@ void Reflect( REFLECT_MEMBER_START(); REFLECT_MEMBER(short_name); REFLECT_MEMBER(detailed_name); + REFLECT_MEMBER(hover); REFLECT_MEMBER(definition_spelling); REFLECT_MEMBER(definition_extent); REFLECT_MEMBER(declaring_type); @@ -356,6 +362,7 @@ struct VarDefDefinitionData { // General metadata. std::string short_name; std::string detailed_name; + std::string hover; optional declaration; // TODO: definitions should be a list of ranges, since there can be more // than one - when?? @@ -377,6 +384,7 @@ struct VarDefDefinitionData { const VarDefDefinitionData& other) const { return short_name == other.short_name && detailed_name == other.detailed_name && + hover == other.hover && declaration == other.declaration && definition_spelling == other.definition_spelling && definition_extent == other.definition_extent && @@ -399,6 +407,7 @@ void Reflect(TVisitor& visitor, REFLECT_MEMBER_START(); REFLECT_MEMBER(short_name); REFLECT_MEMBER(detailed_name); + REFLECT_MEMBER(hover); REFLECT_MEMBER(definition_spelling); REFLECT_MEMBER(definition_extent); REFLECT_MEMBER(variable_type); diff --git a/src/messages/text_document_hover.cc b/src/messages/text_document_hover.cc index 30414079..9b45f151 100644 --- a/src/messages/text_document_hover.cc +++ b/src/messages/text_document_hover.cc @@ -2,6 +2,36 @@ #include "query_utils.h" namespace { + +std::string GetHoverForSymbol(QueryDatabase* db, const SymbolIdx& symbol) { + switch (symbol.kind) { + case SymbolKind::Type: { + QueryType& type = db->types[symbol.idx]; + if (type.def) + return type.def->hover; + break; + } + case SymbolKind::Func: { + QueryFunc& func = db->funcs[symbol.idx]; + if (func.def) + return func.def->hover; + break; + } + case SymbolKind::Var: { + QueryVar& var = db->vars[symbol.idx]; + if (var.def) + return var.def->hover; + break; + } + case SymbolKind::File: + case SymbolKind::Invalid: { + assert(false && "unexpected"); + break; + } + } + return ""; +} + struct Ipc_TextDocumentHover : public IpcMessage { const static IpcId kIpcId = IpcId::TextDocumentHover; @@ -52,6 +82,14 @@ struct TextDocumentHoverHandler : BaseMessageHandler { break; } + if (out.result.contents.value.empty()) { + Out_Error out; + out.id = request->id; + out.error.code = lsErrorCodes::InternalError; + IpcManager::WriteStdout(IpcId::Unknown, out); + return; + } + IpcManager::WriteStdout(IpcId::TextDocumentHover, out); } }; diff --git a/src/query.cc b/src/query.cc index 925b5f40..6bd94689 100644 --- a/src/query.cc +++ b/src/query.cc @@ -26,6 +26,7 @@ optional ToQuery(const IdMap& id_map, QueryType::Def result; result.short_name = type.short_name; result.detailed_name = type.detailed_name; + result.hover = type.hover; result.definition_spelling = id_map.ToQuery(type.definition_spelling); result.definition_extent = id_map.ToQuery(type.definition_extent); result.alias_of = id_map.ToQuery(type.alias_of); @@ -44,6 +45,7 @@ optional ToQuery(const IdMap& id_map, QueryFunc::Def result; result.short_name = func.short_name; result.detailed_name = func.detailed_name; + result.hover = func.hover; result.definition_spelling = id_map.ToQuery(func.definition_spelling); result.definition_extent = id_map.ToQuery(func.definition_extent); result.declaring_type = id_map.ToQuery(func.declaring_type); @@ -61,6 +63,7 @@ optional ToQuery(const IdMap& id_map, const IndexVar::Def& var) { QueryVar::Def result; result.short_name = var.short_name; result.detailed_name = var.detailed_name; + result.hover = var.hover; result.declaration = id_map.ToQuery(var.declaration); result.definition_spelling = id_map.ToQuery(var.definition_spelling); result.definition_extent = id_map.ToQuery(var.definition_extent); diff --git a/src/query_utils.cc b/src/query_utils.cc index d949a241..072322c3 100644 --- a/src/query_utils.cc +++ b/src/query_utils.cc @@ -100,35 +100,6 @@ optional GetDefinitionExtentOfSymbol(QueryDatabase* db, return nullopt; } -std::string GetHoverForSymbol(QueryDatabase* db, const SymbolIdx& symbol) { - switch (symbol.kind) { - case SymbolKind::Type: { - QueryType& type = db->types[symbol.idx]; - if (type.def) - return type.def->detailed_name; - break; - } - case SymbolKind::Func: { - QueryFunc& func = db->funcs[symbol.idx]; - if (func.def) - return func.def->detailed_name; - break; - } - case SymbolKind::Var: { - QueryVar& var = db->vars[symbol.idx]; - if (var.def) - return var.def->detailed_name; - break; - } - case SymbolKind::File: - case SymbolKind::Invalid: { - assert(false && "unexpected"); - break; - } - } - return ""; -} - optional GetDeclarationFileForSymbol(QueryDatabase* db, const SymbolIdx& symbol) { switch (symbol.kind) { diff --git a/src/query_utils.h b/src/query_utils.h index ff08604b..a13c5fac 100644 --- a/src/query_utils.h +++ b/src/query_utils.h @@ -17,7 +17,6 @@ optional GetDefinitionSpellingOfSymbol(QueryDatabase* db, const SymbolIdx& symbol); optional GetDefinitionExtentOfSymbol(QueryDatabase* db, const SymbolIdx& symbol); -std::string GetHoverForSymbol(QueryDatabase* db, const SymbolIdx& symbol); optional GetDeclarationFileForSymbol(QueryDatabase* db, const SymbolIdx& symbol); std::vector ToQueryLocation( diff --git a/src/serializer.cc b/src/serializer.cc index a0b057bf..e98b3c60 100644 --- a/src/serializer.cc +++ b/src/serializer.cc @@ -99,6 +99,7 @@ void Reflect(TVisitor& visitor, IndexType& value) { REFLECT_MEMBER2("usr", value.usr); REFLECT_MEMBER2("short_name", value.def.short_name); REFLECT_MEMBER2("detailed_name", value.def.detailed_name); + REFLECT_MEMBER2("hover", value.def.hover); REFLECT_MEMBER2("definition_spelling", value.def.definition_spelling); REFLECT_MEMBER2("definition_extent", value.def.definition_extent); REFLECT_MEMBER2("alias_of", value.def.alias_of); @@ -120,6 +121,7 @@ void Reflect(TVisitor& visitor, IndexFunc& value) { REFLECT_MEMBER2("usr", value.usr); REFLECT_MEMBER2("short_name", value.def.short_name); REFLECT_MEMBER2("detailed_name", value.def.detailed_name); + REFLECT_MEMBER2("hover", value.def.hover); REFLECT_MEMBER2("declarations", value.declarations); REFLECT_MEMBER2("definition_spelling", value.def.definition_spelling); REFLECT_MEMBER2("definition_extent", value.def.definition_extent); @@ -139,6 +141,7 @@ void Reflect(TVisitor& visitor, IndexVar& value) { REFLECT_MEMBER2("usr", value.usr); REFLECT_MEMBER2("short_name", value.def.short_name); REFLECT_MEMBER2("detailed_name", value.def.detailed_name); + REFLECT_MEMBER2("hover", value.def.hover); REFLECT_MEMBER2("declaration", value.def.declaration); REFLECT_MEMBER2("definition_spelling", value.def.definition_spelling); REFLECT_MEMBER2("definition_extent", value.def.definition_extent); diff --git a/tests/class_forward_declaration.cc b/tests/class_forward_declaration.cc index 3c66a1f8..d4041ab6 100644 --- a/tests/class_forward_declaration.cc +++ b/tests/class_forward_declaration.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "3:7-3:10", "definition_extent": "3:1-3:13", "parents": [], diff --git a/tests/constructors/constructor.cc b/tests/constructors/constructor.cc index 16576195..20397817 100644 --- a/tests/constructors/constructor.cc +++ b/tests/constructors/constructor.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-4:2", "parents": [], @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Foo#", "short_name": "Foo", "detailed_name": "void Foo::Foo()", + "hover": "void Foo::Foo()", "declarations": [], "definition_spelling": "3:3-3:6", "definition_extent": "3:3-3:11", @@ -48,6 +50,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "6:6-6:9", "definition_extent": "6:1-9:2", @@ -61,6 +64,7 @@ OUTPUT: "usr": "c:constructor.cc@56@F@foo#@f", "short_name": "f", "detailed_name": "Foo f", + "hover": "Foo", "definition_spelling": "7:7-7:8", "definition_extent": "7:3-7:8", "variable_type": 0, @@ -72,6 +76,7 @@ OUTPUT: "usr": "c:constructor.cc@66@F@foo#@f2", "short_name": "f2", "detailed_name": "Foo * f2", + "hover": "Foo *", "definition_spelling": "8:8-8:10", "definition_extent": "8:3-8:22", "variable_type": 0, diff --git a/tests/constructors/destructor.cc b/tests/constructors/destructor.cc index 981f2134..465a8cf6 100644 --- a/tests/constructors/destructor.cc +++ b/tests/constructors/destructor.cc @@ -23,6 +23,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-5:2", "parents": [], @@ -39,6 +40,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Foo#", "short_name": "Foo", "detailed_name": "void Foo::Foo()", + "hover": "void Foo::Foo()", "declarations": [], "definition_spelling": "3:3-3:6", "definition_extent": "3:3-3:11", @@ -53,6 +55,7 @@ OUTPUT: "usr": "c:@S@Foo@F@~Foo#", "short_name": "~Foo", "detailed_name": "void Foo::~Foo() noexcept", + "hover": "void Foo::~Foo() noexcept", "declarations": [], "definition_spelling": "4:3-4:7", "definition_extent": "4:3-4:12", @@ -67,6 +70,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "7:6-7:9", "definition_extent": "7:1-9:2", @@ -80,6 +84,7 @@ OUTPUT: "usr": "c:destructor.cc@70@F@foo#@f", "short_name": "f", "detailed_name": "Foo f", + "hover": "Foo", "definition_spelling": "8:7-8:8", "definition_extent": "8:3-8:8", "variable_type": 0, diff --git a/tests/constructors/implicit_constructor.cc b/tests/constructors/implicit_constructor.cc index 28f09c98..e632d4d0 100644 --- a/tests/constructors/implicit_constructor.cc +++ b/tests/constructors/implicit_constructor.cc @@ -17,6 +17,7 @@ OUTPUT: "usr": "c:@S@Type", "short_name": "Type", "detailed_name": "Type", + "hover": "Type", "definition_spelling": "1:8-1:12", "definition_extent": "1:1-3:2", "parents": [], @@ -33,6 +34,7 @@ OUTPUT: "usr": "c:@S@Type@F@Type#", "short_name": "Type", "detailed_name": "void Type::Type()", + "hover": "void Type::Type()", "declarations": [], "definition_spelling": "2:3-2:7", "definition_extent": "2:3-2:12", @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@F@Make#", "short_name": "Make", "detailed_name": "void Make()", + "hover": "void Make()", "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-8:2", @@ -60,6 +63,7 @@ OUTPUT: "usr": "c:implicit_constructor.cc@51@F@Make#@foo", "short_name": "foo", "detailed_name": "Type foo", + "hover": "Type", "definition_spelling": "6:8-6:11", "definition_extent": "6:3-6:11", "variable_type": 0, @@ -71,6 +75,7 @@ OUTPUT: "usr": "c:implicit_constructor.cc@64@F@Make#@foo", "short_name": "foo", "detailed_name": "auto foo", + "hover": "auto", "definition_spelling": "7:8-7:11", "definition_extent": "7:3-7:11", "is_local": true, diff --git a/tests/constructors/invalid_reference.cc b/tests/constructors/invalid_reference.cc index 0d1b0f62..63bfa4f7 100644 --- a/tests/constructors/invalid_reference.cc +++ b/tests/constructors/invalid_reference.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:8-1:11", "definition_extent": "1:1-1:14", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@S@Foo@FT@>1#TFoo#v#", "short_name": "Foo", "detailed_name": "void Foo::Foo()", + "hover": "void Foo::Foo()", "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-4:11", diff --git a/tests/constructors/make_functions.cc b/tests/constructors/make_functions.cc index a4fe7899..6bc74d59 100644 --- a/tests/constructors/make_functions.cc +++ b/tests/constructors/make_functions.cc @@ -33,6 +33,7 @@ OUTPUT: make_functions.h "usr": "c:@S@Bar", "short_name": "Bar", "detailed_name": "Bar", + "hover": "Bar", "definition_spelling": "1:8-1:11", "definition_extent": "1:1-1:14", "parents": [], @@ -47,6 +48,7 @@ OUTPUT: make_functions.h "usr": "c:@S@Foobar", "short_name": "Foobar", "detailed_name": "Foobar", + "hover": "Foobar", "definition_spelling": "3:7-3:13", "definition_extent": "3:1-9:2", "parents": [], @@ -63,6 +65,7 @@ OUTPUT: make_functions.h "usr": "c:@S@Foobar@F@Foobar#", "short_name": "Foobar", "detailed_name": "void Foobar::Foobar()", + "hover": "void Foobar::Foobar()", "declarations": [], "definition_spelling": "5:3-5:9", "definition_extent": "5:3-5:14", @@ -77,6 +80,7 @@ OUTPUT: make_functions.h "usr": "c:@S@Foobar@F@Foobar#I#", "short_name": "Foobar", "detailed_name": "void Foobar::Foobar(int)", + "hover": "void Foobar::Foobar(int)", "declarations": [], "definition_spelling": "6:3-6:9", "definition_extent": "6:3-6:17", @@ -91,6 +95,7 @@ OUTPUT: make_functions.h "usr": "c:@S@Foobar@F@Foobar#&&I#*$@S@Bar#*b#", "short_name": "Foobar", "detailed_name": "void Foobar::Foobar(int &&, Bar *, bool *)", + "hover": "void Foobar::Foobar(int &&, Bar *, bool *)", "declarations": [], "definition_spelling": "7:3-7:9", "definition_extent": "7:3-7:32", @@ -105,6 +110,7 @@ OUTPUT: make_functions.h "usr": "c:@S@Foobar@F@Foobar#I#*$@S@Bar#*b#", "short_name": "Foobar", "detailed_name": "void Foobar::Foobar(int, Bar *, bool *)", + "hover": "void Foobar::Foobar(int, Bar *, bool *)", "declarations": [], "definition_spelling": "8:3-8:9", "definition_extent": "8:3-8:30", @@ -128,6 +134,7 @@ OUTPUT: make_functions.cc "usr": "c:make_functions.cc@41", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -140,6 +147,7 @@ OUTPUT: make_functions.cc "usr": "c:make_functions.cc@53", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -152,6 +160,7 @@ OUTPUT: make_functions.cc "usr": "c:make_functions.cc@139", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -164,6 +173,7 @@ OUTPUT: make_functions.cc "usr": "c:make_functions.cc@151", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -176,6 +186,7 @@ OUTPUT: make_functions.cc "usr": "c:@S@Foobar", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -188,6 +199,7 @@ OUTPUT: make_functions.cc "usr": "c:@S@Bar", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -202,6 +214,7 @@ OUTPUT: make_functions.cc "usr": "c:@FT@>2#T#pTMakeUnique#P&&t0.1#*t0.0#", "short_name": "MakeUnique", "detailed_name": "T *MakeUnique(Args &&...)", + "hover": "T *MakeUnique(Args &&...)", "declarations": [], "definition_spelling": "4:4-4:14", "definition_extent": "4:1-6:2", @@ -215,6 +228,7 @@ OUTPUT: make_functions.cc "usr": "c:@FT@>2#T#pTmaKE_NoRefs#Pt0.1#*t0.0#", "short_name": "maKE_NoRefs", "detailed_name": "T *maKE_NoRefs(Args...)", + "hover": "T *maKE_NoRefs(Args...)", "declarations": [], "definition_spelling": "9:4-9:15", "definition_extent": "9:1-11:2", @@ -228,6 +242,7 @@ OUTPUT: make_functions.cc "usr": "c:@F@caller22#", "short_name": "caller22", "detailed_name": "void caller22()", + "hover": "void caller22()", "declarations": [], "definition_spelling": "13:6-13:14", "definition_extent": "13:1-18:2", @@ -241,6 +256,7 @@ OUTPUT: make_functions.cc "usr": "c:@S@Foobar@F@Foobar#", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], @@ -252,6 +268,7 @@ OUTPUT: make_functions.cc "usr": "c:@S@Foobar@F@Foobar#I#", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], @@ -263,6 +280,7 @@ OUTPUT: make_functions.cc "usr": "c:@S@Foobar@F@Foobar#&&I#*$@S@Bar#*b#", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], @@ -274,6 +292,7 @@ OUTPUT: make_functions.cc "usr": "c:@S@Foobar@F@Foobar#I#*$@S@Bar#*b#", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], @@ -285,6 +304,7 @@ OUTPUT: make_functions.cc "usr": "c:make_functions.cc@86@FT@>2#T#pTMakeUnique#P&&t0.1#*t0.0#@args", "short_name": "args", "detailed_name": "Args &&... args", + "hover": "Args &&...", "definition_spelling": "4:25-4:29", "definition_extent": "4:15-4:29", "is_local": true, @@ -295,6 +315,7 @@ OUTPUT: make_functions.cc "usr": "c:make_functions.cc@185@FT@>2#T#pTmaKE_NoRefs#Pt0.1#*t0.0#@args", "short_name": "args", "detailed_name": "Args... args", + "hover": "Args...", "definition_spelling": "9:24-9:28", "definition_extent": "9:16-9:28", "is_local": true, diff --git a/tests/declaration_vs_definition/class.cc b/tests/declaration_vs_definition/class.cc index 2470c80d..dffcbd3b 100644 --- a/tests/declaration_vs_definition/class.cc +++ b/tests/declaration_vs_definition/class.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "3:7-3:10", "definition_extent": "3:1-3:13", "parents": [], diff --git a/tests/declaration_vs_definition/class_member.cc b/tests/declaration_vs_definition/class_member.cc index 2c4e5845..6b2dbc1a 100644 --- a/tests/declaration_vs_definition/class_member.cc +++ b/tests/declaration_vs_definition/class_member.cc @@ -12,6 +12,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@foo", "short_name": "foo", "detailed_name": "int Foo::foo", + "hover": "int", "definition_spelling": "2:7-2:10", "definition_extent": "2:3-2:10", "declaring_type": 0, diff --git a/tests/declaration_vs_definition/class_member_static.cc b/tests/declaration_vs_definition/class_member_static.cc index 77b92ee6..0142665e 100644 --- a/tests/declaration_vs_definition/class_member_static.cc +++ b/tests/declaration_vs_definition/class_member_static.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -30,6 +31,7 @@ OUTPUT: "usr": "c:@S@Foo@foo", "short_name": "foo", "detailed_name": "int Foo::foo", + "hover": "int", "declaration": "2:14-2:17", "definition_spelling": "5:10-5:13", "definition_extent": "5:1-5:13", diff --git a/tests/declaration_vs_definition/func.cc b/tests/declaration_vs_definition/func.cc index 00d55b22..3b86c161 100644 --- a/tests/declaration_vs_definition/func.cc +++ b/tests/declaration_vs_definition/func.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [{ "spelling": "1:6-1:9", "extent": "1:1-1:11", diff --git a/tests/declaration_vs_definition/func_associated_function_params.cc b/tests/declaration_vs_definition/func_associated_function_params.cc index 7b2f6b87..7a4bdfde 100644 --- a/tests/declaration_vs_definition/func_associated_function_params.cc +++ b/tests/declaration_vs_definition/func_associated_function_params.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@F@foo#I#I#", "short_name": "foo", "detailed_name": "int foo(int, int)", + "hover": "int foo(int, int)", "declarations": [{ "spelling": "1:5-1:8", "extent": "1:1-1:18", @@ -44,6 +45,7 @@ OUTPUT: "usr": "c:func_associated_function_params.cc@91@F@foo#I#I#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "5:13-5:14", "definition_extent": "5:9-5:14", "is_local": true, @@ -54,6 +56,7 @@ OUTPUT: "usr": "c:func_associated_function_params.cc@98@F@foo#I#I#@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "5:20-5:21", "definition_extent": "5:16-5:21", "is_local": true, diff --git a/tests/declaration_vs_definition/method.cc b/tests/declaration_vs_definition/method.cc index f0a16391..7d94e5de 100644 --- a/tests/declaration_vs_definition/method.cc +++ b/tests/declaration_vs_definition/method.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-5:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@S@Foo@F@declonly#", "short_name": "declonly", "detailed_name": "void Foo::declonly()", + "hover": "void Foo::declonly()", "declarations": [{ "spelling": "2:8-2:16", "extent": "2:3-2:18", @@ -49,6 +51,7 @@ OUTPUT: "usr": "c:@S@Foo@F@purevirtual#", "short_name": "purevirtual", "detailed_name": "void Foo::purevirtual()", + "hover": "void Foo::purevirtual()", "declarations": [{ "spelling": "3:16-3:27", "extent": "3:3-3:33", @@ -66,6 +69,7 @@ OUTPUT: "usr": "c:@S@Foo@F@def#", "short_name": "def", "detailed_name": "void Foo::def()", + "hover": "void Foo::def()", "declarations": [{ "spelling": "4:8-4:11", "extent": "4:3-4:13", diff --git a/tests/enums/enum_class_decl.cc b/tests/enums/enum_class_decl.cc index 8fd8cbdf..522be559 100644 --- a/tests/enums/enum_class_decl.cc +++ b/tests/enums/enum_class_decl.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@E@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:12-1:15", "definition_extent": "1:1-4:2", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@E@Foo@A", "short_name": "A", "detailed_name": "Foo Foo::A", + "hover": "Foo", "definition_spelling": "2:3-2:4", "definition_extent": "2:3-2:4", "variable_type": 0, @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@E@Foo@B", "short_name": "B", "detailed_name": "Foo Foo::B", + "hover": "Foo", "definition_spelling": "3:3-3:4", "definition_extent": "3:3-3:9", "variable_type": 0, diff --git a/tests/enums/enum_decl.cc b/tests/enums/enum_decl.cc index 5ff3ab69..cb61eb61 100644 --- a/tests/enums/enum_decl.cc +++ b/tests/enums/enum_decl.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@E@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:6-1:9", "definition_extent": "1:1-4:2", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@E@Foo@A", "short_name": "A", "detailed_name": "Foo Foo::A", + "hover": "Foo", "definition_spelling": "2:3-2:4", "definition_extent": "2:3-2:4", "variable_type": 0, @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@E@Foo@B", "short_name": "B", "detailed_name": "Foo Foo::B", + "hover": "Foo", "definition_spelling": "3:3-3:4", "definition_extent": "3:3-3:9", "variable_type": 0, diff --git a/tests/enums/enum_inherit.cc b/tests/enums/enum_inherit.cc index 043a0211..2ef63dd1 100644 --- a/tests/enums/enum_inherit.cc +++ b/tests/enums/enum_inherit.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@E@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:6-1:9", "definition_extent": "1:1-4:2", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@E@Foo@A", "short_name": "A", "detailed_name": "Foo Foo::A", + "hover": "Foo", "definition_spelling": "2:3-2:4", "definition_extent": "2:3-2:4", "variable_type": 0, @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@E@Foo@B", "short_name": "B", "detailed_name": "Foo Foo::B", + "hover": "Foo", "definition_spelling": "3:3-3:4", "definition_extent": "3:3-3:9", "variable_type": 0, diff --git a/tests/enums/enum_usage.cc b/tests/enums/enum_usage.cc index 8457326c..ff0058b6 100644 --- a/tests/enums/enum_usage.cc +++ b/tests/enums/enum_usage.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@E@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:12-1:15", "definition_extent": "1:1-4:2", "parents": [], @@ -31,6 +32,7 @@ OUTPUT: "usr": "c:@E@Foo@A", "short_name": "A", "detailed_name": "Foo Foo::A", + "hover": "Foo", "definition_spelling": "2:3-2:4", "definition_extent": "2:3-2:4", "variable_type": 0, @@ -43,6 +45,7 @@ OUTPUT: "usr": "c:@E@Foo@B", "short_name": "B", "detailed_name": "Foo Foo::B", + "hover": "Foo", "definition_spelling": "3:3-3:4", "definition_extent": "3:3-3:9", "variable_type": 0, @@ -55,6 +58,7 @@ OUTPUT: "usr": "c:@x", "short_name": "x", "detailed_name": "Foo x", + "hover": "Foo", "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:15", "variable_type": 0, diff --git a/tests/foobar.cc b/tests/foobar.cc index 40dffd4e..d1476335 100644 --- a/tests/foobar.cc +++ b/tests/foobar.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@E@A", "short_name": "A", "detailed_name": "A", + "hover": "A", "definition_spelling": "1:6-1:7", "definition_extent": "1:1-1:10", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@E@B", "short_name": "B", "detailed_name": "B", + "hover": "B", "definition_spelling": "2:6-2:7", "definition_extent": "2:1-2:10", "parents": [], @@ -46,6 +48,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "5:8-5:11", "definition_extent": "5:1-7:2", "parents": [], @@ -60,6 +63,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo@S@Inner", "short_name": "Inner", "detailed_name": "Foo::Inner", + "hover": "Foo::Inner", "definition_spelling": "6:10-6:15", "definition_extent": "6:3-6:18", "parents": [], @@ -76,6 +80,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "Foo::Inner a", + "hover": "Foo::Inner", "definition_spelling": "9:15-9:16", "definition_extent": "9:1-9:16", "variable_type": 3, @@ -87,6 +92,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "Foo b", + "hover": "Foo", "definition_spelling": "10:8-10:9", "definition_extent": "10:1-10:9", "variable_type": 2, diff --git a/tests/function_declaration.cc b/tests/function_declaration.cc index 22baacb8..6ceb48a9 100644 --- a/tests/function_declaration.cc +++ b/tests/function_declaration.cc @@ -12,6 +12,7 @@ OUTPUT: "usr": "c:@F@foo#I#I#", "short_name": "foo", "detailed_name": "void foo(int, int)", + "hover": "void foo(int, int)", "declarations": [{ "spelling": "1:6-1:9", "extent": "1:1-1:23", diff --git a/tests/function_declaration_definition.cc b/tests/function_declaration_definition.cc index 05703672..3239e6dd 100644 --- a/tests/function_declaration_definition.cc +++ b/tests/function_declaration_definition.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [{ "spelling": "1:6-1:9", "extent": "1:1-1:11", diff --git a/tests/function_definition.cc b/tests/function_definition.cc index e2d2746e..f2468ff2 100644 --- a/tests/function_definition.cc +++ b/tests/function_definition.cc @@ -12,6 +12,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-1:14", diff --git a/tests/inheritance/class_inherit.cc b/tests/inheritance/class_inherit.cc index 79d3003a..f4d8ffbf 100644 --- a/tests/inheritance/class_inherit.cc +++ b/tests/inheritance/class_inherit.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:@S@Parent", "short_name": "Parent", "detailed_name": "Parent", + "hover": "Parent", "definition_spelling": "1:7-1:13", "definition_extent": "1:1-1:16", "parents": [], @@ -25,6 +26,7 @@ OUTPUT: "usr": "c:@S@Derived", "short_name": "Derived", "detailed_name": "Derived", + "hover": "Derived", "definition_spelling": "2:7-2:14", "definition_extent": "2:1-2:33", "parents": [0], diff --git a/tests/inheritance/class_inherit_templated_parent.cc b/tests/inheritance/class_inherit_templated_parent.cc index 97489b72..394f7257 100644 --- a/tests/inheritance/class_inherit_templated_parent.cc +++ b/tests/inheritance/class_inherit_templated_parent.cc @@ -22,6 +22,7 @@ OUTPUT: "usr": "c:@ST>1#Ni@Base1", "short_name": "Base1", "detailed_name": "Base1", + "hover": "Base1", "definition_spelling": "2:7-2:12", "definition_extent": "2:1-2:15", "parents": [], @@ -36,6 +37,7 @@ OUTPUT: "usr": "c:@ST>1#T@Base2", "short_name": "Base2", "detailed_name": "Base2", + "hover": "Base2", "definition_spelling": "5:7-5:12", "definition_extent": "5:1-5:15", "parents": [], @@ -50,6 +52,7 @@ OUTPUT: "usr": "c:@ST>1#Ni@Derived1", "short_name": "Derived1", "detailed_name": "Derived1", + "hover": "Derived1", "definition_spelling": "8:7-8:15", "definition_extent": "8:1-8:29", "parents": [0], @@ -64,6 +67,7 @@ OUTPUT: "usr": "c:@ST>1#T@Derived2", "short_name": "Derived2", "detailed_name": "Derived2", + "hover": "Derived2", "definition_spelling": "11:7-11:15", "definition_extent": "11:1-11:29", "parents": [1], @@ -78,6 +82,7 @@ OUTPUT: "usr": "c:class_inherit_templated_parent.cc@154", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -90,6 +95,7 @@ OUTPUT: "usr": "c:@S@Derived", "short_name": "Derived", "detailed_name": "Derived", + "hover": "Derived", "definition_spelling": "13:7-13:14", "definition_extent": "13:1-13:76", "parents": [0, 1, 2, 3], diff --git a/tests/inheritance/class_multiple_inherit.cc b/tests/inheritance/class_multiple_inherit.cc index b017c1a6..1a0c09e9 100644 --- a/tests/inheritance/class_multiple_inherit.cc +++ b/tests/inheritance/class_multiple_inherit.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@S@Root", "short_name": "Root", "detailed_name": "Root", + "hover": "Root", "definition_spelling": "1:7-1:11", "definition_extent": "1:1-1:14", "parents": [], @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:@S@MiddleA", "short_name": "MiddleA", "detailed_name": "MiddleA", + "hover": "MiddleA", "definition_spelling": "2:7-2:14", "definition_extent": "2:1-2:31", "parents": [0], @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@S@MiddleB", "short_name": "MiddleB", "detailed_name": "MiddleB", + "hover": "MiddleB", "definition_spelling": "3:7-3:14", "definition_extent": "3:1-3:31", "parents": [0], @@ -55,6 +58,7 @@ OUTPUT: "usr": "c:@S@Derived", "short_name": "Derived", "detailed_name": "Derived", + "hover": "Derived", "definition_spelling": "4:7-4:14", "definition_extent": "4:1-4:50", "parents": [1, 2], diff --git a/tests/inheritance/function_override.cc b/tests/inheritance/function_override.cc index ffe7ac29..3042b25b 100644 --- a/tests/inheritance/function_override.cc +++ b/tests/inheritance/function_override.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@S@Root", "short_name": "Root", "detailed_name": "Root", + "hover": "Root", "definition_spelling": "1:7-1:11", "definition_extent": "1:1-3:2", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@S@Derived", "short_name": "Derived", "detailed_name": "Derived", + "hover": "Derived", "definition_spelling": "4:7-4:14", "definition_extent": "4:1-6:2", "parents": [0], @@ -45,6 +47,7 @@ OUTPUT: "usr": "c:@S@Root@F@foo#", "short_name": "foo", "detailed_name": "void Root::foo()", + "hover": "void Root::foo()", "declarations": [{ "spelling": "2:16-2:19", "extent": "2:3-2:21", @@ -62,6 +65,7 @@ OUTPUT: "usr": "c:@S@Derived@F@foo#", "short_name": "foo", "detailed_name": "void Derived::foo()", + "hover": "void Derived::foo()", "declarations": [], "definition_spelling": "5:8-5:11", "definition_extent": "5:3-5:25", diff --git a/tests/inheritance/interface_pure_virtual.cc b/tests/inheritance/interface_pure_virtual.cc index e1538179..05adf021 100644 --- a/tests/inheritance/interface_pure_virtual.cc +++ b/tests/inheritance/interface_pure_virtual.cc @@ -12,6 +12,7 @@ OUTPUT: "usr": "c:@S@IFoo", "short_name": "IFoo", "detailed_name": "IFoo", + "hover": "IFoo", "definition_spelling": "1:7-1:11", "definition_extent": "1:1-3:2", "parents": [], @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@S@IFoo@F@foo#", "short_name": "foo", "detailed_name": "void IFoo::foo()", + "hover": "void IFoo::foo()", "declarations": [], "definition_spelling": "2:16-2:19", "definition_extent": "2:3-2:28", diff --git a/tests/lambdas/lambda.cc b/tests/lambdas/lambda.cc index 9cd8e13b..8485c7ab 100644 --- a/tests/lambdas/lambda.cc +++ b/tests/lambdas/lambda.cc @@ -21,6 +21,7 @@ OUTPUT: "usr": "c:lambda.cc@47@F@foo#@Sa", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -35,6 +36,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-12:2", @@ -48,6 +50,7 @@ OUTPUT: "usr": "c:lambda.cc@57@F@foo#@Sa@F@operator()#I#1", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], @@ -59,6 +62,7 @@ OUTPUT: "usr": "c:lambda.cc@16@F@foo#@x", "short_name": "x", "detailed_name": "int x", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "is_local": true, @@ -69,6 +73,7 @@ OUTPUT: "usr": "c:lambda.cc@28@F@foo#@dosomething", "short_name": "dosomething", "detailed_name": "(lambda at C:/Users/jacob/Desktop/cquery/tests/lambdas/lambda.cc:4:22) dosomething", + "hover": "(lambda at C:/Users/jacob/Desktop/cquery/tests/lambdas/lambda.cc:4:22)", "definition_spelling": "4:8-4:19", "definition_extent": "4:3-7:4", "variable_type": 0, @@ -80,6 +85,7 @@ OUTPUT: "usr": "c:lambda.cc@52@F@foo#@Sa@F@operator()#I#1@y", "short_name": "y", "detailed_name": "int y", + "hover": "int", "definition_spelling": "4:31-4:32", "definition_extent": "4:27-4:32", "is_local": false, diff --git a/tests/macros/complex.cc b/tests/macros/complex.cc index b6e220aa..0fa537ba 100644 --- a/tests/macros/complex.cc +++ b/tests/macros/complex.cc @@ -23,6 +23,7 @@ OUTPUT: "usr": "c:@F@make1#", "short_name": "make1", "detailed_name": "int make1()", + "hover": "int make1()", "declarations": [], "definition_spelling": "6:5-6:10", "definition_extent": "6:1-8:2", @@ -36,6 +37,7 @@ OUTPUT: "usr": "c:@F@a#", "short_name": "a", "detailed_name": "int a()", + "hover": "int a()", "declarations": [{ "spelling": "12:1-12:20", "extent": "12:1-12:20", @@ -54,6 +56,7 @@ OUTPUT: "usr": "c:complex.cc@make2", "short_name": "make2", "detailed_name": "const int make2", + "hover": "const int", "definition_spelling": "9:11-9:16", "definition_extent": "9:1-9:20", "is_local": false, @@ -63,7 +66,8 @@ OUTPUT: "id": 1, "usr": "c:complex.cc@8@macro@FOO", "short_name": "FOO", - "detailed_name": "#define FOO(aaa, bbb)\n int a();\n int a() { return aaa + bbb; }", + "detailed_name": "FOO", + "hover": "#define FOO(aaa, bbb)\n int a();\n int a() { return aaa + bbb; }", "definition_spelling": "1:9-1:12", "definition_extent": "1:9-3:32", "is_local": false, diff --git a/tests/macros/foo.cc b/tests/macros/foo.cc index 4437e954..6b949261 100644 --- a/tests/macros/foo.cc +++ b/tests/macros/foo.cc @@ -17,6 +17,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "4:8-4:11", "definition_extent": "4:1-6:2", "parents": [], @@ -33,6 +34,7 @@ OUTPUT: "usr": "c:@x", "short_name": "x", "detailed_name": "int x", + "hover": "int", "definition_spelling": "8:5-8:6", "definition_extent": "8:1-8:10", "is_local": false, @@ -42,7 +44,8 @@ OUTPUT: "id": 1, "usr": "c:foo.cc@8@macro@A", "short_name": "A", - "detailed_name": "#define A 5", + "detailed_name": "A", + "hover": "#define A 5", "definition_spelling": "1:9-1:10", "definition_extent": "1:9-1:12", "is_local": false, @@ -52,7 +55,8 @@ OUTPUT: "id": 2, "usr": "c:foo.cc@21@macro@DISALLOW", "short_name": "DISALLOW", - "detailed_name": "#define DISALLOW(type) type(type&&) = delete;", + "detailed_name": "DISALLOW", + "hover": "#define DISALLOW(type) type(type&&) = delete;", "definition_spelling": "2:9-2:17", "definition_extent": "2:9-2:46", "is_local": false, diff --git a/tests/method_declaration.cc b/tests/method_declaration.cc index a74f5776..6ea378ec 100644 --- a/tests/method_declaration.cc +++ b/tests/method_declaration.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "void Foo::foo()", + "hover": "void Foo::foo()", "declarations": [{ "spelling": "2:8-2:11", "extent": "2:3-2:13", diff --git a/tests/method_definition.cc b/tests/method_definition.cc index faeeb736..3fbae1f2 100644 --- a/tests/method_definition.cc +++ b/tests/method_definition.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -30,6 +31,7 @@ OUTPUT: "usr": "c:@S@Foo@F@foo#1", "short_name": "foo", "detailed_name": "void Foo::foo() const", + "hover": "void Foo::foo() const", "declarations": [{ "spelling": "2:8-2:11", "extent": "2:3-2:19", diff --git a/tests/method_inline_declaration.cc b/tests/method_inline_declaration.cc index 9c2ad988..a0506534 100644 --- a/tests/method_inline_declaration.cc +++ b/tests/method_inline_declaration.cc @@ -12,6 +12,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "void Foo::foo()", + "hover": "void Foo::foo()", "declarations": [], "definition_spelling": "2:8-2:11", "definition_extent": "2:3-2:16", diff --git a/tests/multi_file/funky_enum.cc b/tests/multi_file/funky_enum.cc index d5e6da87..896a4179 100644 --- a/tests/multi_file/funky_enum.cc +++ b/tests/multi_file/funky_enum.cc @@ -15,6 +15,7 @@ OUTPUT: funky_enum.h "usr": "c:@E@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -29,6 +30,7 @@ OUTPUT: funky_enum.h "usr": "c:@E@Foo@A", "short_name": "A", "detailed_name": "Foo Foo::A", + "hover": "Foo", "definition_spelling": "4:1-4:2", "definition_extent": "4:1-4:2", "variable_type": 0, @@ -41,6 +43,7 @@ OUTPUT: funky_enum.h "usr": "c:@E@Foo@B", "short_name": "B", "detailed_name": "Foo Foo::B", + "hover": "Foo", "definition_spelling": "5:1-5:2", "definition_extent": "5:1-5:2", "variable_type": 0, @@ -53,6 +56,7 @@ OUTPUT: funky_enum.h "usr": "c:@E@Foo@C", "short_name": "C", "detailed_name": "Foo Foo::C", + "hover": "Foo", "definition_spelling": "6:1-6:2", "definition_extent": "6:1-6:2", "variable_type": 0, @@ -74,6 +78,7 @@ OUTPUT: funky_enum.cc "usr": "c:@E@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:6-1:9", "definition_extent": "1:1-3:2", "parents": [], diff --git a/tests/multi_file/impl.cc b/tests/multi_file/impl.cc index 3dc090a6..fb030f79 100644 --- a/tests/multi_file/impl.cc +++ b/tests/multi_file/impl.cc @@ -14,6 +14,7 @@ OUTPUT: header.h "usr": "c:@S@Base", "short_name": "Base", "detailed_name": "Base", + "hover": "Base", "definition_spelling": "3:8-3:12", "definition_extent": "3:1-3:15", "parents": [], @@ -28,6 +29,7 @@ OUTPUT: header.h "usr": "c:@S@SameFileDerived", "short_name": "SameFileDerived", "detailed_name": "SameFileDerived", + "hover": "SameFileDerived", "definition_spelling": "5:8-5:23", "definition_extent": "5:1-5:33", "parents": [0], @@ -41,7 +43,8 @@ OUTPUT: header.h "id": 2, "usr": "c:@Foo0", "short_name": "Foo0", - "detailed_name": "using Foo0 = SameFileDerived", + "detailed_name": "Foo0", + "hover": "using Foo0 = SameFileDerived", "definition_spelling": "7:7-7:11", "definition_extent": "7:1-7:29", "alias_of": 1, @@ -57,6 +60,7 @@ OUTPUT: header.h "usr": "c:@ST>1#T@Foo2", "short_name": "Foo2", "detailed_name": "Foo2", + "hover": "Foo2", "definition_spelling": "13:8-13:12", "definition_extent": "13:1-13:15", "parents": [], @@ -71,6 +75,7 @@ OUTPUT: header.h "usr": "c:@E@Foo3", "short_name": "Foo3", "detailed_name": "Foo3", + "hover": "Foo3", "definition_spelling": "15:6-15:10", "definition_extent": "15:1-15:22", "parents": [], @@ -87,6 +92,7 @@ OUTPUT: header.h "usr": "c:@FT@>1#TFoo1#v#", "short_name": "Foo1", "detailed_name": "void Foo1()", + "hover": "void Foo1()", "declarations": [], "definition_spelling": "10:6-10:10", "definition_extent": "10:1-10:15", @@ -100,6 +106,7 @@ OUTPUT: header.h "usr": "c:@E@Foo3@A", "short_name": "A", "detailed_name": "Foo3 Foo3::A", + "hover": "Foo3", "definition_spelling": "15:13-15:14", "definition_extent": "15:13-15:14", "variable_type": 4, @@ -112,6 +119,7 @@ OUTPUT: header.h "usr": "c:@E@Foo3@B", "short_name": "B", "detailed_name": "Foo3 Foo3::B", + "hover": "Foo3", "definition_spelling": "15:16-15:17", "definition_extent": "15:16-15:17", "variable_type": 4, @@ -124,6 +132,7 @@ OUTPUT: header.h "usr": "c:@E@Foo3@C", "short_name": "C", "detailed_name": "Foo3 Foo3::C", + "hover": "Foo3", "definition_spelling": "15:19-15:20", "definition_extent": "15:19-15:20", "variable_type": 4, @@ -136,6 +145,7 @@ OUTPUT: header.h "usr": "c:@Foo4", "short_name": "Foo4", "detailed_name": "int Foo4", + "hover": "int", "definition_spelling": "17:5-17:9", "definition_extent": "17:1-17:9", "is_local": false, @@ -146,6 +156,7 @@ OUTPUT: header.h "usr": "c:header.h@Foo5", "short_name": "Foo5", "detailed_name": "int Foo5", + "hover": "int", "definition_spelling": "18:12-18:16", "definition_extent": "18:1-18:16", "is_local": false, @@ -167,6 +178,7 @@ OUTPUT: impl.cc "usr": "c:@F@Impl#", "short_name": "Impl", "detailed_name": "void Impl()", + "hover": "void Impl()", "declarations": [], "definition_spelling": "3:6-3:10", "definition_extent": "3:1-5:2", @@ -180,6 +192,7 @@ OUTPUT: impl.cc "usr": "c:@FT@>1#TFoo1#v#", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], diff --git a/tests/multi_file/simple_impl.cc b/tests/multi_file/simple_impl.cc index 554553e7..bae099ba 100644 --- a/tests/multi_file/simple_impl.cc +++ b/tests/multi_file/simple_impl.cc @@ -16,6 +16,7 @@ OUTPUT: simple_header.h "usr": "c:@F@header#", "short_name": "header", "detailed_name": "void header()", + "hover": "void header()", "declarations": [{ "spelling": "3:6-3:12", "extent": "3:1-3:14", @@ -43,6 +44,7 @@ OUTPUT: simple_impl.cc "usr": "c:@F@impl#", "short_name": "impl", "detailed_name": "void impl()", + "hover": "void impl()", "declarations": [], "definition_spelling": "3:6-3:10", "definition_extent": "3:1-5:2", @@ -56,6 +58,7 @@ OUTPUT: simple_impl.cc "usr": "c:@F@header#", "short_name": "", "detailed_name": "", + "hover": "", "declarations": [], "derived": [], "locals": [], diff --git a/tests/multi_file/static.cc b/tests/multi_file/static.cc index 9e32ab03..51a878a8 100644 --- a/tests/multi_file/static.cc +++ b/tests/multi_file/static.cc @@ -12,6 +12,7 @@ OUTPUT: static.h "usr": "c:@S@Buffer", "short_name": "Buffer", "detailed_name": "Buffer", + "hover": "Buffer", "definition_spelling": "3:8-3:14", "definition_extent": "3:1-5:2", "parents": [], @@ -28,6 +29,7 @@ OUTPUT: static.h "usr": "c:@S@Buffer@F@CreateSharedBuffer#S", "short_name": "CreateSharedBuffer", "detailed_name": "void Buffer::CreateSharedBuffer()", + "hover": "void Buffer::CreateSharedBuffer()", "declarations": [{ "spelling": "4:15-4:33", "extent": "4:3-4:35", @@ -54,6 +56,7 @@ OUTPUT: static.cc "usr": "c:@S@Buffer", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -68,6 +71,7 @@ OUTPUT: static.cc "usr": "c:@S@Buffer@F@CreateSharedBuffer#S", "short_name": "CreateSharedBuffer", "detailed_name": "void Buffer::CreateSharedBuffer()", + "hover": "void Buffer::CreateSharedBuffer()", "declarations": [], "definition_spelling": "3:14-3:32", "definition_extent": "3:1-3:37", diff --git a/tests/namespaces/anonymous_function.cc b/tests/namespaces/anonymous_function.cc index 35994ff2..9c2f6547 100644 --- a/tests/namespaces/anonymous_function.cc +++ b/tests/namespaces/anonymous_function.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:anonymous_function.cc@aN@F@foo#", "short_name": "foo", "detailed_name": "void ::foo()", + "hover": "void ::foo()", "declarations": [{ "spelling": "2:6-2:9", "extent": "2:1-2:11", diff --git a/tests/namespaces/function_declaration.cc b/tests/namespaces/function_declaration.cc index 42d0b569..a7dec976 100644 --- a/tests/namespaces/function_declaration.cc +++ b/tests/namespaces/function_declaration.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@N@hello@F@foo#I#I#", "short_name": "foo", "detailed_name": "void hello::foo(int, int)", + "hover": "void hello::foo(int, int)", "declarations": [{ "spelling": "2:6-2:9", "extent": "2:1-2:23", diff --git a/tests/namespaces/function_definition.cc b/tests/namespaces/function_definition.cc index 086bf022..ba50912a 100644 --- a/tests/namespaces/function_definition.cc +++ b/tests/namespaces/function_definition.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@N@hello@F@foo#", "short_name": "foo", "detailed_name": "void hello::foo()", + "hover": "void hello::foo()", "declarations": [], "definition_spelling": "2:6-2:9", "definition_extent": "2:1-2:14", diff --git a/tests/namespaces/method_declaration.cc b/tests/namespaces/method_declaration.cc index 3ef14136..9299fe21 100644 --- a/tests/namespaces/method_declaration.cc +++ b/tests/namespaces/method_declaration.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@N@hello@S@Foo", "short_name": "Foo", "detailed_name": "hello::Foo", + "hover": "hello::Foo", "definition_spelling": "2:7-2:10", "definition_extent": "2:1-4:2", "parents": [], @@ -30,6 +31,7 @@ OUTPUT: "usr": "c:@N@hello@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "void hello::Foo::foo()", + "hover": "void hello::Foo::foo()", "declarations": [{ "spelling": "3:8-3:11", "extent": "3:3-3:13", diff --git a/tests/namespaces/method_definition.cc b/tests/namespaces/method_definition.cc index fd86f468..285820d6 100644 --- a/tests/namespaces/method_definition.cc +++ b/tests/namespaces/method_definition.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@N@hello@S@Foo", "short_name": "Foo", "detailed_name": "hello::Foo", + "hover": "hello::Foo", "definition_spelling": "2:7-2:10", "definition_extent": "2:1-4:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@N@hello@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "void hello::Foo::foo()", + "hover": "void hello::Foo::foo()", "declarations": [{ "spelling": "3:8-3:11", "extent": "3:3-3:13", diff --git a/tests/namespaces/method_inline_declaration.cc b/tests/namespaces/method_inline_declaration.cc index 0f7417e6..591cb102 100644 --- a/tests/namespaces/method_inline_declaration.cc +++ b/tests/namespaces/method_inline_declaration.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@N@hello@S@Foo", "short_name": "Foo", "detailed_name": "hello::Foo", + "hover": "hello::Foo", "definition_spelling": "2:7-2:10", "definition_extent": "2:1-4:2", "parents": [], @@ -30,6 +31,7 @@ OUTPUT: "usr": "c:@N@hello@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "void hello::Foo::foo()", + "hover": "void hello::Foo::foo()", "declarations": [], "definition_spelling": "3:8-3:11", "definition_extent": "3:3-3:16", diff --git a/tests/namespaces/namespace_alias.cc b/tests/namespaces/namespace_alias.cc index 37638d01..d82c95ee 100644 --- a/tests/namespaces/namespace_alias.cc +++ b/tests/namespaces/namespace_alias.cc @@ -25,6 +25,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "11:6-11:9", "definition_extent": "11:1-14:2", @@ -38,6 +39,7 @@ OUTPUT: "usr": "c:@N@foo@N@bar@N@baz@qux", "short_name": "qux", "detailed_name": "int foo::bar::baz::qux", + "hover": "int", "definition_spelling": "4:18-4:21", "definition_extent": "4:14-4:26", "is_local": false, @@ -48,6 +50,7 @@ OUTPUT: "usr": "c:namespace_alias.cc@167@F@foo#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "12:7-12:8", "definition_extent": "12:3-12:29", "is_local": true, @@ -58,6 +61,7 @@ OUTPUT: "usr": "c:namespace_alias.cc@198@F@foo#@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "13:7-13:8", "definition_extent": "13:3-13:19", "is_local": true, diff --git a/tests/namespaces/namespace_reference.cc b/tests/namespaces/namespace_reference.cc index fa4a6db8..3bb31603 100644 --- a/tests/namespaces/namespace_reference.cc +++ b/tests/namespaces/namespace_reference.cc @@ -21,6 +21,7 @@ OUTPUT: "usr": "c:@N@ns@F@Accept#I#", "short_name": "Accept", "detailed_name": "void ns::Accept(int)", + "hover": "void ns::Accept(int)", "declarations": [], "definition_spelling": "3:8-3:14", "definition_extent": "3:3-3:24", @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@F@Runner#", "short_name": "Runner", "detailed_name": "void Runner()", + "hover": "void Runner()", "declarations": [], "definition_spelling": "6:6-6:12", "definition_extent": "6:1-10:2", @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@N@ns@Foo", "short_name": "Foo", "detailed_name": "int ns::Foo", + "hover": "int", "definition_spelling": "2:7-2:10", "definition_extent": "2:3-2:10", "is_local": false, @@ -57,6 +60,7 @@ OUTPUT: "usr": "c:namespace_reference.cc@42@N@ns@F@Accept#I#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "3:19-3:20", "definition_extent": "3:15-3:20", "is_local": true, diff --git a/tests/objective-c/class.m b/tests/objective-c/class.m index 1ca93f1f..eff3a509 100644 --- a/tests/objective-c/class.m +++ b/tests/objective-c/class.m @@ -25,6 +25,7 @@ OUTPUT: "usr": "c:objc(cs)AClass", "short_name": "AClass", "detailed_name": "AClass", + "hover": "AClass", "definition_spelling": "7:17-7:23", "definition_extent": "7:1-9:2", "parents": [], @@ -41,6 +42,7 @@ OUTPUT: "usr": "c:objc(cs)AClass(cm)test", "short_name": "test", "detailed_name": " AClass::test", + "hover": " AClass::test", "declarations": [{ "spelling": "2:11-2:15", "extent": "2:3-2:16", @@ -57,6 +59,7 @@ OUTPUT: "usr": "c:objc(cs)AClass(im)anInstanceMethod", "short_name": "anInstanceMethod", "detailed_name": " AClass::anInstanceMethod", + "hover": " AClass::anInstanceMethod", "declarations": [{ "spelling": "3:11-3:27", "extent": "3:3-3:28", @@ -75,6 +78,7 @@ OUTPUT: "usr": "c:objc(cs)AClass(im)aProp", "short_name": "aProp", "detailed_name": " AClass::aProp", + "hover": " AClass::aProp", "declarations": [{ "spelling": "0:0-0:0", "extent": "4:29-4:34", @@ -91,6 +95,7 @@ OUTPUT: "usr": "c:objc(cs)AClass(im)setAProp:", "short_name": "setAProp:", "detailed_name": " AClass::setAProp:", + "hover": " AClass::setAProp:", "declarations": [{ "spelling": "0:0-0:0", "extent": "4:29-4:34", @@ -107,6 +112,7 @@ OUTPUT: "usr": "c:@F@main#", "short_name": "main", "detailed_name": "int main()", + "hover": "int main()", "declarations": [], "definition_spelling": "11:5-11:9", "definition_extent": "11:1-16:2", @@ -120,6 +126,7 @@ OUTPUT: "usr": "c:objc(cs)AClass(py)aProp", "short_name": "aProp", "detailed_name": "int AClass::aProp", + "hover": "int", "declaration": "4:29-4:34", "is_local": true, "is_macro": false, @@ -129,6 +136,7 @@ OUTPUT: "usr": "c:class.m@191@F@main#@instance", "short_name": "instance", "detailed_name": "AClass * instance", + "hover": "AClass *", "definition_spelling": "13:11-13:19", "definition_extent": "13:3-13:35", "is_local": true, diff --git a/tests/operators/operator.cc b/tests/operators/operator.cc index 4d6f287c..18a56168 100644 --- a/tests/operators/operator.cc +++ b/tests/operators/operator.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-5:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@S@Foo@F@operator()#I#", "short_name": "operator()", "detailed_name": "void Foo::operator()(int)", + "hover": "void Foo::operator()(int)", "declarations": [], "definition_spelling": "2:8-2:18", "definition_extent": "2:3-2:27", @@ -46,6 +48,7 @@ OUTPUT: "usr": "c:@S@Foo@F@operator()#b#", "short_name": "operator()", "detailed_name": "void Foo::operator()(bool)", + "hover": "void Foo::operator()(bool)", "declarations": [{ "spelling": "3:8-3:18", "extent": "3:3-3:24", @@ -63,6 +66,7 @@ OUTPUT: "usr": "c:@S@Foo@F@operator()#I#I#", "short_name": "operator()", "detailed_name": "int Foo::operator()(int, int)", + "hover": "int Foo::operator()(int, int)", "declarations": [{ "spelling": "4:7-4:17", "extent": "4:3-4:31", @@ -80,6 +84,7 @@ OUTPUT: "usr": "c:@F@operator+=#&1$@S@Foo#&1I#", "short_name": "operator+=", "detailed_name": "Foo &operator+=(const Foo &, const int &)", + "hover": "Foo &operator+=(const Foo &, const int &)", "declarations": [{ "spelling": "7:13-7:24", "extent": "7:1-7:50", diff --git a/tests/outline/outline.cc b/tests/outline/outline.cc index 0132deb1..a8ade049 100644 --- a/tests/outline/outline.cc +++ b/tests/outline/outline.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@S@MergeableUpdate", "short_name": "MergeableUpdate", "detailed_name": "MergeableUpdate", + "hover": "MergeableUpdate", "definition_spelling": "3:8-3:23", "definition_extent": "3:1-7:2", "parents": [], @@ -33,6 +34,7 @@ OUTPUT: "usr": "c:@N@std@ST>2#T#T@vector", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@S@MergeableUpdate@FI@a", "short_name": "a", "detailed_name": "int MergeableUpdate::a", + "hover": "int", "definition_spelling": "4:7-4:8", "definition_extent": "4:3-4:8", "declaring_type": 0, @@ -58,6 +61,7 @@ OUTPUT: "usr": "c:@S@MergeableUpdate@FI@b", "short_name": "b", "detailed_name": "int MergeableUpdate::b", + "hover": "int", "definition_spelling": "5:7-5:8", "definition_extent": "5:3-5:8", "declaring_type": 0, @@ -69,6 +73,7 @@ OUTPUT: "usr": "c:@S@MergeableUpdate@FI@to_add", "short_name": "to_add", "detailed_name": "std::vector MergeableUpdate::to_add", + "hover": "std::vector", "definition_spelling": "6:20-6:26", "definition_extent": "6:3-6:26", "variable_type": 1, diff --git a/tests/outline/outline2.cc b/tests/outline/outline2.cc index 04d6459f..6f1522b0 100644 --- a/tests/outline/outline2.cc +++ b/tests/outline/outline2.cc @@ -27,6 +27,7 @@ OUTPUT: "usr": "c:@S@CompilationEntry", "short_name": "CompilationEntry", "detailed_name": "CompilationEntry", + "hover": "CompilationEntry", "definition_spelling": "6:8-6:24", "definition_extent": "6:1-10:2", "parents": [], @@ -41,6 +42,7 @@ OUTPUT: "usr": "c:@N@std@T@string", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -53,6 +55,7 @@ OUTPUT: "usr": "c:@N@std@ST>2#T#T@vector", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -67,6 +70,7 @@ OUTPUT: "usr": "c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@S@basic_string>#C#$@N@std@S@char_traits>#C#$@N@std@S@allocator>#C#", "short_name": "LoadCompilationEntriesFromDirectory", "detailed_name": "std::vector LoadCompilationEntriesFromDirectory(const std::string &)", + "hover": "std::vector LoadCompilationEntriesFromDirectory(const std::string &)", "declarations": [{ "spelling": "12:31-12:66", "extent": "12:1-12:104", @@ -83,6 +87,7 @@ OUTPUT: "usr": "c:@S@CompilationEntry@FI@directory", "short_name": "directory", "detailed_name": "std::string CompilationEntry::directory", + "hover": "std::string", "definition_spelling": "7:15-7:24", "definition_extent": "7:3-7:24", "variable_type": 1, @@ -95,6 +100,7 @@ OUTPUT: "usr": "c:@S@CompilationEntry@FI@filename", "short_name": "filename", "detailed_name": "std::string CompilationEntry::filename", + "hover": "std::string", "definition_spelling": "8:15-8:23", "definition_extent": "8:3-8:23", "variable_type": 1, @@ -107,6 +113,7 @@ OUTPUT: "usr": "c:@S@CompilationEntry@FI@args", "short_name": "args", "detailed_name": "std::vector CompilationEntry::args", + "hover": "std::vector", "definition_spelling": "9:28-9:32", "definition_extent": "9:3-9:32", "variable_type": 2, diff --git a/tests/outline/static_function_in_type.cc b/tests/outline/static_function_in_type.cc index 43ca5f8f..03cfb0db 100644 --- a/tests/outline/static_function_in_type.cc +++ b/tests/outline/static_function_in_type.cc @@ -16,6 +16,7 @@ OUTPUT: static_function_in_type.h "usr": "c:@N@ns@S@Manager", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -28,6 +29,7 @@ OUTPUT: static_function_in_type.h "usr": "c:@N@ns@S@Foo", "short_name": "Foo", "detailed_name": "ns::Foo", + "hover": "ns::Foo", "definition_spelling": "5:8-5:11", "definition_extent": "5:1-7:2", "parents": [], @@ -44,6 +46,7 @@ OUTPUT: static_function_in_type.h "usr": "c:@N@ns@S@Foo@F@Register#*$@N@ns@S@Manager#S", "short_name": "Register", "detailed_name": "void ns::Foo::Register(ns::Manager *)", + "hover": "void ns::Foo::Register(ns::Manager *)", "declarations": [{ "spelling": "6:15-6:23", "extent": "6:3-6:33", @@ -70,6 +73,7 @@ OUTPUT: static_function_in_type.cc "usr": "c:@N@ns@S@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -82,6 +86,7 @@ OUTPUT: static_function_in_type.cc "usr": "c:@N@ns@S@Manager", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -96,6 +101,7 @@ OUTPUT: static_function_in_type.cc "usr": "c:@N@ns@S@Foo@F@Register#*$@N@ns@S@Manager#S", "short_name": "Register", "detailed_name": "void ns::Foo::Register(ns::Manager *)", + "hover": "void ns::Foo::Register(ns::Manager *)", "declarations": [], "definition_spelling": "5:11-5:19", "definition_extent": "5:1-6:2", @@ -110,6 +116,7 @@ OUTPUT: static_function_in_type.cc "usr": "c:static_function_in_type.cc@86@N@ns@S@Foo@F@Register#*$@N@ns@S@Manager#S@m", "short_name": "m", "detailed_name": "ns::Manager * m", + "hover": "ns::Manager *", "definition_spelling": "5:29-5:30", "definition_extent": "5:20-5:30", "variable_type": 1, diff --git a/tests/preprocessor/include_guard.cc b/tests/preprocessor/include_guard.cc index 8e5c5746..3e5414fd 100644 --- a/tests/preprocessor/include_guard.cc +++ b/tests/preprocessor/include_guard.cc @@ -14,7 +14,8 @@ OUTPUT: "id": 0, "usr": "c:include_guard.cc@21@macro@FOO", "short_name": "FOO", - "detailed_name": "#define FOO", + "detailed_name": "FOO", + "hover": "#define FOO", "definition_spelling": "2:9-2:12", "definition_extent": "2:9-2:12", "is_local": false, diff --git a/tests/templates/func_specialized_template_param.cc b/tests/templates/func_specialized_template_param.cc index e494a9c2..6365de8c 100644 --- a/tests/templates/func_specialized_template_param.cc +++ b/tests/templates/func_specialized_template_param.cc @@ -17,6 +17,7 @@ OUTPUT: "usr": "c:@ST>1#T@Template", "short_name": "Template", "detailed_name": "Template", + "hover": "Template", "definition_spelling": "2:7-2:15", "definition_extent": "2:1-2:18", "parents": [], @@ -31,6 +32,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "4:8-4:11", "definition_extent": "4:1-6:2", "parents": [], @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Bar#&$@S@Template>#d#", "short_name": "Bar", "detailed_name": "void Foo::Bar(Template &)", + "hover": "void Foo::Bar(Template &)", "declarations": [{ "spelling": "5:8-5:11", "extent": "5:3-5:30", diff --git a/tests/templates/implicit_variable_instantiation.cc b/tests/templates/implicit_variable_instantiation.cc index fbb36025..cb78427c 100644 --- a/tests/templates/implicit_variable_instantiation.cc +++ b/tests/templates/implicit_variable_instantiation.cc @@ -24,6 +24,7 @@ OUTPUT: "usr": "c:@N@ns@E@VarType", "short_name": "VarType", "detailed_name": "ns::VarType", + "hover": "ns::VarType", "definition_spelling": "2:8-2:15", "definition_extent": "2:3-2:18", "parents": [], @@ -38,6 +39,7 @@ OUTPUT: "usr": "c:@N@ns@ST>1#T@Holder", "short_name": "Holder", "detailed_name": "ns::Holder", + "hover": "ns::Holder", "definition_spelling": "5:10-5:16", "definition_extent": "5:3-7:4", "parents": [], @@ -54,6 +56,7 @@ OUTPUT: "usr": "c:@N@ns@ST>1#T@Holder@static_var", "short_name": "static_var", "detailed_name": "const ns::VarType ns::Holder::static_var", + "hover": "const ns::VarType", "declaration": "6:30-6:40", "definition_spelling": "10:37-10:47", "definition_extent": "9:3-10:47", @@ -67,6 +70,7 @@ OUTPUT: "usr": "c:@N@ns@Foo", "short_name": "Foo", "detailed_name": "int ns::Foo", + "hover": "int", "definition_spelling": "13:7-13:10", "definition_extent": "13:3-13:36", "is_local": false, @@ -77,6 +81,7 @@ OUTPUT: "usr": "c:@N@ns@Foo2", "short_name": "Foo2", "detailed_name": "int ns::Foo2", + "hover": "int", "definition_spelling": "14:7-14:11", "definition_extent": "14:3-14:37", "is_local": false, diff --git a/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc b/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc index 8b14e157..1661b641 100644 --- a/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc +++ b/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc @@ -21,6 +21,7 @@ OUTPUT: "usr": "c:@N@ns@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "ns::Foo", + "hover": "ns::Foo", "definition_spelling": "3:10-3:13", "definition_extent": "3:3-8:4", "parents": [], @@ -37,6 +38,7 @@ OUTPUT: "usr": "c:@N@ns@ST>1#T@Foo@FT@>1#Tfoo#I#S", "short_name": "foo", "detailed_name": "int ns::Foo::foo()", + "hover": "int ns::Foo::foo()", "declarations": [], "definition_spelling": "5:16-5:19", "definition_extent": "5:5-7:6", @@ -51,6 +53,7 @@ OUTPUT: "usr": "c:@N@ns@a", "short_name": "a", "detailed_name": "int ns::a", + "hover": "int", "definition_spelling": "10:7-10:8", "definition_extent": "10:3-10:33", "is_local": false, @@ -61,6 +64,7 @@ OUTPUT: "usr": "c:@N@ns@b", "short_name": "b", "detailed_name": "int ns::b", + "hover": "int", "definition_spelling": "11:7-11:8", "definition_extent": "11:3-11:35", "is_local": false, diff --git a/tests/templates/namespace_template_type_usage_folded_into_one.cc b/tests/templates/namespace_template_type_usage_folded_into_one.cc index e25c7987..e4c2eabc 100644 --- a/tests/templates/namespace_template_type_usage_folded_into_one.cc +++ b/tests/templates/namespace_template_type_usage_folded_into_one.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@N@ns@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "ns::Foo", + "hover": "ns::Foo", "definition_spelling": "3:9-3:12", "definition_extent": "3:3-3:15", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@N@ns@a", "short_name": "a", "detailed_name": "Foo ns::a", + "hover": "Foo", "definition_spelling": "5:12-5:13", "definition_extent": "5:3-5:13", "variable_type": 0, @@ -43,6 +45,7 @@ OUTPUT: "usr": "c:@N@ns@b", "short_name": "b", "detailed_name": "Foo ns::b", + "hover": "Foo", "definition_spelling": "6:13-6:14", "definition_extent": "6:3-6:14", "variable_type": 0, diff --git a/tests/templates/specialized_func_definition.cc b/tests/templates/specialized_func_definition.cc index 4b3b343b..2298f35d 100644 --- a/tests/templates/specialized_func_definition.cc +++ b/tests/templates/specialized_func_definition.cc @@ -22,6 +22,7 @@ OUTPUT: "usr": "c:@ST>1#T@Template", "short_name": "Template", "detailed_name": "Template", + "hover": "Template", "definition_spelling": "2:7-2:15", "definition_extent": "2:1-4:2", "parents": [], @@ -38,6 +39,7 @@ OUTPUT: "usr": "c:@ST>1#T@Template@F@Foo#", "short_name": "Foo", "detailed_name": "void Template::Foo()", + "hover": "void Template::Foo()", "declarations": [{ "spelling": "3:8-3:11", "extent": "3:3-3:13", diff --git a/tests/templates/template_class_func_usage_folded_into_one.cc b/tests/templates/template_class_func_usage_folded_into_one.cc index d83239c4..4074a0e2 100644 --- a/tests/templates/template_class_func_usage_folded_into_one.cc +++ b/tests/templates/template_class_func_usage_folded_into_one.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "2:8-2:11", "definition_extent": "2:1-6:2", "parents": [], @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo@F@foo#S", "short_name": "foo", "detailed_name": "int Foo::foo()", + "hover": "int Foo::foo()", "declarations": [], "definition_spelling": "3:14-3:17", "definition_extent": "3:3-5:4", @@ -48,6 +50,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "8:5-8:6", "definition_extent": "8:1-8:24", "is_local": false, @@ -58,6 +61,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "9:5-9:6", "definition_extent": "9:1-9:25", "is_local": false, diff --git a/tests/templates/template_class_template_func_usage_folded_into_one.cc b/tests/templates/template_class_template_func_usage_folded_into_one.cc index d8304f76..54435105 100644 --- a/tests/templates/template_class_template_func_usage_folded_into_one.cc +++ b/tests/templates/template_class_template_func_usage_folded_into_one.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "2:8-2:11", "definition_extent": "2:1-7:2", "parents": [], @@ -35,6 +36,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo@FT@>1#Tfoo#I#S", "short_name": "foo", "detailed_name": "int Foo::foo()", + "hover": "int Foo::foo()", "declarations": [], "definition_spelling": "4:14-4:17", "definition_extent": "4:3-6:4", @@ -49,6 +51,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "9:5-9:6", "definition_extent": "9:1-9:31", "is_local": false, @@ -59,6 +62,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "10:5-10:6", "definition_extent": "10:1-10:33", "is_local": false, diff --git a/tests/templates/template_class_type_usage_folded_into_one.cc b/tests/templates/template_class_type_usage_folded_into_one.cc index 3f9a070c..25743ff2 100644 --- a/tests/templates/template_class_type_usage_folded_into_one.cc +++ b/tests/templates/template_class_type_usage_folded_into_one.cc @@ -37,6 +37,7 @@ OUTPUT: "usr": "c:@E@A", "short_name": "A", "detailed_name": "A", + "hover": "A", "definition_spelling": "1:6-1:7", "definition_extent": "1:1-1:10", "parents": [], @@ -51,6 +52,7 @@ OUTPUT: "usr": "c:@E@B", "short_name": "B", "detailed_name": "B", + "hover": "B", "definition_spelling": "2:6-2:7", "definition_extent": "2:1-2:10", "parents": [], @@ -65,6 +67,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "5:8-5:11", "definition_extent": "5:1-7:2", "parents": [], @@ -79,6 +82,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo@S@Inner", "short_name": "Inner", "detailed_name": "Foo::Inner", + "hover": "Foo::Inner", "definition_spelling": "6:10-6:15", "definition_extent": "6:3-6:18", "parents": [], @@ -95,6 +99,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "Foo::Inner a", + "hover": "Foo::Inner", "definition_spelling": "9:15-9:16", "definition_extent": "9:1-9:16", "variable_type": 3, @@ -106,6 +111,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "Foo::Inner b", + "hover": "Foo::Inner", "definition_spelling": "10:15-10:16", "definition_extent": "10:1-10:16", "variable_type": 3, diff --git a/tests/templates/template_class_var_usage_folded_into_one.cc b/tests/templates/template_class_var_usage_folded_into_one.cc index a0812d0c..fc2071d0 100644 --- a/tests/templates/template_class_var_usage_folded_into_one.cc +++ b/tests/templates/template_class_var_usage_folded_into_one.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "2:8-2:11", "definition_extent": "2:1-4:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo@var", "short_name": "var", "detailed_name": "const int Foo::var", + "hover": "const int", "declaration": "3:24-3:27", "is_local": false, "is_macro": false, @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:22", "is_local": false, @@ -51,6 +54,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "7:5-7:6", "definition_extent": "7:1-7:23", "is_local": false, diff --git a/tests/templates/template_func_usage_folded_into_one.cc b/tests/templates/template_func_usage_folded_into_one.cc index a51e5024..9b23bcc4 100644 --- a/tests/templates/template_func_usage_folded_into_one.cc +++ b/tests/templates/template_func_usage_folded_into_one.cc @@ -21,6 +21,7 @@ OUTPUT: "usr": "c:template_func_usage_folded_into_one.cc@FT@>1#Tfoo#I#", "short_name": "foo", "detailed_name": "int foo()", + "hover": "int foo()", "declarations": [], "definition_spelling": "2:12-2:15", "definition_extent": "2:1-4:2", @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:19", "is_local": false, @@ -44,6 +46,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "7:5-7:6", "definition_extent": "7:1-7:20", "is_local": false, diff --git a/tests/templates/template_type_usage_folded_into_one.cc b/tests/templates/template_type_usage_folded_into_one.cc index e158b47a..7e9eb7b0 100644 --- a/tests/templates/template_type_usage_folded_into_one.cc +++ b/tests/templates/template_type_usage_folded_into_one.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "2:7-2:10", "definition_extent": "2:1-2:13", "parents": [], @@ -30,6 +31,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "Foo a", + "hover": "Foo", "definition_spelling": "4:10-4:11", "definition_extent": "4:1-4:11", "variable_type": 0, @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "Foo b", + "hover": "Foo", "definition_spelling": "5:11-5:12", "definition_extent": "5:1-5:12", "variable_type": 0, diff --git a/tests/templates/template_var_usage_folded_into_one.cc b/tests/templates/template_var_usage_folded_into_one.cc index df9fc5ab..719bc4eb 100644 --- a/tests/templates/template_var_usage_folded_into_one.cc +++ b/tests/templates/template_var_usage_folded_into_one.cc @@ -37,6 +37,7 @@ OUTPUT: "usr": "c:@E@A", "short_name": "A", "detailed_name": "A", + "hover": "A", "definition_spelling": "1:6-1:7", "definition_extent": "1:1-1:10", "parents": [], @@ -51,6 +52,7 @@ OUTPUT: "usr": "c:@E@B", "short_name": "B", "detailed_name": "B", + "hover": "B", "definition_spelling": "2:6-2:7", "definition_extent": "2:1-2:10", "parents": [], @@ -65,6 +67,7 @@ OUTPUT: "usr": "c:template_var_usage_folded_into_one.cc@35", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -79,6 +82,7 @@ OUTPUT: "usr": "c:@VT>1#T@var", "short_name": "var", "detailed_name": "T var", + "hover": "T", "definition_spelling": "5:3-5:6", "definition_extent": "5:1-5:10", "is_local": false, @@ -89,6 +93,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "7:5-7:6", "definition_extent": "7:1-7:15", "is_local": false, @@ -99,6 +104,7 @@ OUTPUT: "usr": "c:@b", "short_name": "b", "detailed_name": "int b", + "hover": "int", "definition_spelling": "8:5-8:6", "definition_extent": "8:1-8:15", "is_local": false, diff --git a/tests/types/anonymous_struct.cc b/tests/types/anonymous_struct.cc index bb79120c..b1d1335d 100644 --- a/tests/types/anonymous_struct.cc +++ b/tests/types/anonymous_struct.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@U@vector3", "short_name": "vector3", "detailed_name": "vector3", + "hover": "vector3", "definition_spelling": "1:7-1:14", "definition_extent": "1:1-4:2", "parents": [], @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:@U@vector3@Sa", "short_name": "", "detailed_name": "vector3::", + "hover": "vector3::", "definition_spelling": "2:3-2:9", "definition_extent": "2:3-2:28", "parents": [], @@ -43,6 +45,7 @@ OUTPUT: "usr": "c:@U@vector3@Sa@FI@x", "short_name": "x", "detailed_name": "float x", + "hover": "float", "definition_spelling": "2:18-2:19", "definition_extent": "2:12-2:19", "declaring_type": 1, @@ -54,6 +57,7 @@ OUTPUT: "usr": "c:@U@vector3@Sa@FI@y", "short_name": "y", "detailed_name": "float y", + "hover": "float", "definition_spelling": "2:21-2:22", "definition_extent": "2:12-2:22", "declaring_type": 1, @@ -65,6 +69,7 @@ OUTPUT: "usr": "c:@U@vector3@Sa@FI@z", "short_name": "z", "detailed_name": "float z", + "hover": "float", "definition_spelling": "2:24-2:25", "definition_extent": "2:12-2:25", "declaring_type": 1, @@ -76,6 +81,7 @@ OUTPUT: "usr": "c:@U@vector3@FI@v", "short_name": "v", "detailed_name": "float [3] vector3::v", + "hover": "float [3]", "definition_spelling": "3:9-3:10", "definition_extent": "3:3-3:13", "declaring_type": 0, diff --git a/tests/types/typedefs.cc b/tests/types/typedefs.cc index 011082d7..8b335541 100644 --- a/tests/types/typedefs.cc +++ b/tests/types/typedefs.cc @@ -10,7 +10,8 @@ OUTPUT: "id": 0, "usr": "c:typedefs.cc@T@func", "short_name": "func", - "detailed_name": "typedef int (func)(const int *a, const int *b)", + "detailed_name": "func", + "hover": "typedef int (func)(const int *a, const int *b)", "definition_spelling": "1:14-1:18", "definition_extent": "1:1-1:47", "parents": [], @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:typedefs.cc@F@g#*1I#S0_#", "short_name": "g", "detailed_name": "func g", + "hover": "func g", "declarations": [{ "spelling": "2:13-2:14", "extent": "2:1-2:14", diff --git a/tests/unions/union_decl.cc b/tests/unions/union_decl.cc index 250dd375..7e023847 100644 --- a/tests/unions/union_decl.cc +++ b/tests/unions/union_decl.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@U@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-4:2", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@U@Foo@FI@a", "short_name": "a", "detailed_name": "int Foo::a", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "declaring_type": 0, @@ -40,6 +42,7 @@ OUTPUT: "usr": "c:@U@Foo@FI@b", "short_name": "b", "detailed_name": "bool Foo::b", + "hover": "bool", "definition_spelling": "3:8-3:9", "definition_extent": "3:3-3:9", "declaring_type": 0, diff --git a/tests/unions/union_usage.cc b/tests/unions/union_usage.cc index 3b364aa6..bf2c8eb2 100644 --- a/tests/unions/union_usage.cc +++ b/tests/unions/union_usage.cc @@ -21,6 +21,7 @@ OUTPUT: "usr": "c:@U@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-4:2", "parents": [], @@ -37,6 +38,7 @@ OUTPUT: "usr": "c:@F@act#*$@U@Foo#", "short_name": "act", "detailed_name": "void act(Foo *)", + "hover": "void act(Foo *)", "declarations": [], "definition_spelling": "8:6-8:9", "definition_extent": "8:1-10:2", @@ -50,6 +52,7 @@ OUTPUT: "usr": "c:@U@Foo@FI@a", "short_name": "a", "detailed_name": "int Foo::a", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:12", "declaring_type": 0, @@ -61,6 +64,7 @@ OUTPUT: "usr": "c:@U@Foo@FI@b", "short_name": "b", "detailed_name": "bool Foo::b", + "hover": "bool", "definition_spelling": "3:8-3:9", "definition_extent": "3:3-3:13", "declaring_type": 0, @@ -72,6 +76,7 @@ OUTPUT: "usr": "c:@f", "short_name": "f", "detailed_name": "Foo f", + "hover": "Foo", "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:6", "variable_type": 0, diff --git a/tests/usage/func_called_from_constructor.cc b/tests/usage/func_called_from_constructor.cc index b6293f14..c9623587 100644 --- a/tests/usage/func_called_from_constructor.cc +++ b/tests/usage/func_called_from_constructor.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "3:8-3:11", "definition_extent": "3:1-5:2", "parents": [], @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@F@called#", "short_name": "called", "detailed_name": "void called()", + "hover": "void called()", "declarations": [], "definition_spelling": "1:6-1:12", "definition_extent": "1:1-1:17", @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Foo#", "short_name": "Foo", "detailed_name": "void Foo::Foo()", + "hover": "void Foo::Foo()", "declarations": [{ "spelling": "4:3-4:6", "extent": "4:3-4:8", diff --git a/tests/usage/func_called_from_macro_argument.cc b/tests/usage/func_called_from_macro_argument.cc index b29d92cd..39c12500 100644 --- a/tests/usage/func_called_from_macro_argument.cc +++ b/tests/usage/func_called_from_macro_argument.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@F@called#b#b#", "short_name": "called", "detailed_name": "bool called(bool, bool)", + "hover": "bool called(bool, bool)", "declarations": [{ "spelling": "3:6-3:12", "extent": "3:1-3:28", @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@F@caller#", "short_name": "caller", "detailed_name": "void caller()", + "hover": "void caller()", "declarations": [], "definition_spelling": "5:6-5:12", "definition_extent": "5:1-7:2", @@ -46,7 +48,8 @@ OUTPUT: "id": 0, "usr": "c:func_called_from_macro_argument.cc@8@macro@MACRO_CALL", "short_name": "MACRO_CALL", - "detailed_name": "#define MACRO_CALL(e) e", + "detailed_name": "MACRO_CALL", + "hover": "#define MACRO_CALL(e) e", "definition_spelling": "1:9-1:19", "definition_extent": "1:9-1:24", "is_local": false, diff --git a/tests/usage/func_called_from_template.cc b/tests/usage/func_called_from_template.cc index e17fee9d..810718b5 100644 --- a/tests/usage/func_called_from_template.cc +++ b/tests/usage/func_called_from_template.cc @@ -23,6 +23,7 @@ OUTPUT: "usr": "c:@F@called#", "short_name": "called", "detailed_name": "void called()", + "hover": "void called()", "declarations": [{ "spelling": "1:6-1:12", "extent": "1:1-1:14", @@ -39,6 +40,7 @@ OUTPUT: "usr": "c:@FT@>1#Tcaller#v#", "short_name": "caller", "detailed_name": "void caller()", + "hover": "void caller()", "declarations": [], "definition_spelling": "4:6-4:12", "definition_extent": "4:1-6:2", @@ -52,6 +54,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "8:6-8:9", "definition_extent": "8:1-10:2", diff --git a/tests/usage/func_called_implicit_ctor.cc b/tests/usage/func_called_implicit_ctor.cc index a93b5812..4275ee53 100644 --- a/tests/usage/func_called_implicit_ctor.cc +++ b/tests/usage/func_called_implicit_ctor.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@S@Wrapper", "short_name": "Wrapper", "detailed_name": "Wrapper", + "hover": "Wrapper", "definition_spelling": "1:8-1:15", "definition_extent": "1:1-3:2", "parents": [], @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@S@Wrapper@F@Wrapper#I#", "short_name": "Wrapper", "detailed_name": "void Wrapper::Wrapper(int)", + "hover": "void Wrapper::Wrapper(int)", "declarations": [{ "spelling": "2:3-2:10", "extent": "2:3-2:17", @@ -51,6 +53,7 @@ OUTPUT: "usr": "c:@F@called#", "short_name": "called", "detailed_name": "int called()", + "hover": "int called()", "declarations": [], "definition_spelling": "5:5-5:11", "definition_extent": "5:1-5:27", @@ -64,6 +67,7 @@ OUTPUT: "usr": "c:@F@caller#", "short_name": "caller", "detailed_name": "Wrapper caller()", + "hover": "Wrapper caller()", "declarations": [], "definition_spelling": "7:9-7:15", "definition_extent": "7:1-9:2", diff --git a/tests/usage/func_usage_addr_func.cc b/tests/usage/func_usage_addr_func.cc index 70b93b89..31c7bc9a 100644 --- a/tests/usage/func_usage_addr_func.cc +++ b/tests/usage/func_usage_addr_func.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@F@consume#*v#", "short_name": "consume", "detailed_name": "void consume(void *)", + "hover": "void consume(void *)", "declarations": [], "definition_spelling": "1:6-1:13", "definition_extent": "1:1-1:23", @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@F@used#", "short_name": "used", "detailed_name": "void used()", + "hover": "void used()", "declarations": [], "definition_spelling": "3:6-3:10", "definition_extent": "3:1-3:15", @@ -45,6 +47,7 @@ OUTPUT: "usr": "c:@F@user#", "short_name": "user", "detailed_name": "void user()", + "hover": "void user()", "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-8:2", @@ -58,6 +61,7 @@ OUTPUT: "usr": "c:func_usage_addr_func.cc@61@F@user#@x", "short_name": "x", "detailed_name": "void (*)() x", + "hover": "void (*)()", "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:17", "is_local": true, diff --git a/tests/usage/func_usage_addr_method.cc b/tests/usage/func_usage_addr_method.cc index 68e29849..09dc4d14 100644 --- a/tests/usage/func_usage_addr_method.cc +++ b/tests/usage/func_usage_addr_method.cc @@ -17,6 +17,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:8-1:11", "definition_extent": "1:1-3:2", "parents": [], @@ -33,6 +34,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Used#", "short_name": "Used", "detailed_name": "void Foo::Used()", + "hover": "void Foo::Used()", "declarations": [{ "spelling": "2:8-2:12", "extent": "2:3-2:14", @@ -50,6 +52,7 @@ OUTPUT: "usr": "c:@F@user#", "short_name": "user", "detailed_name": "void user()", + "hover": "void user()", "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-7:2", @@ -63,6 +66,7 @@ OUTPUT: "usr": "c:func_usage_addr_method.cc@53@F@user#@x", "short_name": "x", "detailed_name": "void (Foo::*)() x", + "hover": "void (Foo::*)()", "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:22", "is_local": true, diff --git a/tests/usage/func_usage_call_func.cc b/tests/usage/func_usage_call_func.cc index 7205a342..fbaee40e 100644 --- a/tests/usage/func_usage_call_func.cc +++ b/tests/usage/func_usage_call_func.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@F@called#", "short_name": "called", "detailed_name": "void called()", + "hover": "void called()", "declarations": [], "definition_spelling": "1:6-1:12", "definition_extent": "1:1-1:17", @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@F@caller#", "short_name": "caller", "detailed_name": "void caller()", + "hover": "void caller()", "declarations": [], "definition_spelling": "2:6-2:12", "definition_extent": "2:1-4:2", diff --git a/tests/usage/func_usage_call_method.cc b/tests/usage/func_usage_call_method.cc index f1a00488..0c39e9c3 100644 --- a/tests/usage/func_usage_call_method.cc +++ b/tests/usage/func_usage_call_method.cc @@ -17,6 +17,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:8-1:11", "definition_extent": "1:1-3:2", "parents": [], @@ -33,6 +34,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Used#", "short_name": "Used", "detailed_name": "void Foo::Used()", + "hover": "void Foo::Used()", "declarations": [{ "spelling": "2:8-2:12", "extent": "2:3-2:14", @@ -50,6 +52,7 @@ OUTPUT: "usr": "c:@F@user#", "short_name": "user", "detailed_name": "void user()", + "hover": "void user()", "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-8:2", @@ -63,6 +66,7 @@ OUTPUT: "usr": "c:func_usage_call_method.cc@53@F@user#@f", "short_name": "f", "detailed_name": "Foo * f", + "hover": "Foo *", "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:19", "variable_type": 0, diff --git a/tests/usage/func_usage_class_inline_var_def.cc b/tests/usage/func_usage_class_inline_var_def.cc index 2cd36710..a932e131 100644 --- a/tests/usage/func_usage_class_inline_var_def.cc +++ b/tests/usage/func_usage_class_inline_var_def.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "5:7-5:10", "definition_extent": "5:1-7:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:func_usage_class_inline_var_def.cc@F@helper#", "short_name": "helper", "detailed_name": "int helper()", + "hover": "int helper()", "declarations": [], "definition_spelling": "1:12-1:18", "definition_extent": "1:1-3:2", @@ -45,6 +47,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@x", "short_name": "x", "detailed_name": "int Foo::x", + "hover": "int", "definition_spelling": "6:7-6:8", "definition_extent": "6:3-6:19", "declaring_type": 0, diff --git a/tests/usage/func_usage_forward_decl_func.cc b/tests/usage/func_usage_forward_decl_func.cc index 81f0e0c6..8a1370dc 100644 --- a/tests/usage/func_usage_forward_decl_func.cc +++ b/tests/usage/func_usage_forward_decl_func.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [{ "spelling": "1:6-1:9", "extent": "1:1-1:11", @@ -31,6 +32,7 @@ OUTPUT: "usr": "c:@F@usage#", "short_name": "usage", "detailed_name": "void usage()", + "hover": "void usage()", "declarations": [], "definition_spelling": "3:6-3:11", "definition_extent": "3:1-5:2", diff --git a/tests/usage/func_usage_forward_decl_method.cc b/tests/usage/func_usage_forward_decl_method.cc index 3c0004f3..62207b2f 100644 --- a/tests/usage/func_usage_forward_decl_method.cc +++ b/tests/usage/func_usage_forward_decl_method.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:8-1:11", "definition_extent": "1:1-3:2", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "void Foo::foo()", + "hover": "void Foo::foo()", "declarations": [{ "spelling": "2:8-2:11", "extent": "2:3-2:13", @@ -49,6 +51,7 @@ OUTPUT: "usr": "c:@F@usage#", "short_name": "usage", "detailed_name": "void usage()", + "hover": "void usage()", "declarations": [], "definition_spelling": "5:6-5:11", "definition_extent": "5:1-8:2", @@ -62,6 +65,7 @@ OUTPUT: "usr": "c:func_usage_forward_decl_method.cc@53@F@usage#@f", "short_name": "f", "detailed_name": "Foo * f", + "hover": "Foo *", "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:19", "variable_type": 0, diff --git a/tests/usage/func_usage_template_func.cc b/tests/usage/func_usage_template_func.cc index abd8124a..dc089213 100644 --- a/tests/usage/func_usage_template_func.cc +++ b/tests/usage/func_usage_template_func.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@FT@>1#Taccept#t0.0#v#", "short_name": "accept", "detailed_name": "void accept(T)", + "hover": "void accept(T)", "declarations": [{ "spelling": "2:6-2:12", "extent": "2:1-2:15", @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-7:2", diff --git a/tests/usage/type_usage_as_template_parameter.cc b/tests/usage/type_usage_as_template_parameter.cc index 36cb7374..3b5c0b6d 100644 --- a/tests/usage/type_usage_as_template_parameter.cc +++ b/tests/usage/type_usage_as_template_parameter.cc @@ -20,6 +20,7 @@ OUTPUT: "usr": "c:@ST>1#T@unique_ptr", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@S@S", "short_name": "S", "detailed_name": "S", + "hover": "S", "definition_spelling": "4:8-4:9", "definition_extent": "4:1-4:12", "parents": [], @@ -48,6 +50,7 @@ OUTPUT: "usr": "c:@F@return_type#", "short_name": "return_type", "detailed_name": "unique_ptr *return_type()", + "hover": "unique_ptr *return_type()", "declarations": [], "definition_spelling": "9:16-9:27", "definition_extent": "9:1-12:2", @@ -61,6 +64,7 @@ OUTPUT: "usr": "c:type_usage_as_template_parameter.cc@f0", "short_name": "f0", "detailed_name": "unique_ptr f0", + "hover": "unique_ptr", "definition_spelling": "6:25-6:27", "definition_extent": "6:1-6:27", "variable_type": 0, @@ -72,6 +76,7 @@ OUTPUT: "usr": "c:type_usage_as_template_parameter.cc@f1", "short_name": "f1", "detailed_name": "unique_ptr f1", + "hover": "unique_ptr", "definition_spelling": "7:22-7:24", "definition_extent": "7:1-7:24", "variable_type": 0, @@ -83,6 +88,7 @@ OUTPUT: "usr": "c:type_usage_as_template_parameter.cc@150@F@return_type#@local", "short_name": "local", "detailed_name": "unique_ptr * local", + "hover": "unique_ptr *", "definition_spelling": "10:18-10:23", "definition_extent": "10:3-10:23", "variable_type": 0, diff --git a/tests/usage/type_usage_as_template_parameter_complex.cc b/tests/usage/type_usage_as_template_parameter_complex.cc index 490b0beb..e19e72b2 100644 --- a/tests/usage/type_usage_as_template_parameter_complex.cc +++ b/tests/usage/type_usage_as_template_parameter_complex.cc @@ -88,6 +88,7 @@ OUTPUT: "usr": "c:@ST>2#T#T@unique_ptr", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -100,6 +101,7 @@ OUTPUT: "usr": "c:@S@S1", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -112,6 +114,7 @@ OUTPUT: "usr": "c:@S@S2", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -124,6 +127,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "64:7-64:10", "definition_extent": "64:1-66:2", "parents": [], @@ -140,6 +144,7 @@ OUTPUT: "usr": "c:@F@as_return_type#*$@S@unique_ptr>#$@S@S1#$@S@S2#", "short_name": "as_return_type", "detailed_name": "unique_ptr, S2> *as_return_type(unique_ptr *)", + "hover": "unique_ptr, S2> *as_return_type(unique_ptr *)", "declarations": [], "definition_spelling": "33:37-33:51", "definition_extent": "33:1-33:92", @@ -153,6 +158,7 @@ OUTPUT: "usr": "c:@F@no_return_type#I#", "short_name": "no_return_type", "detailed_name": "void no_return_type(int)", + "hover": "void no_return_type(int)", "declarations": [], "definition_spelling": "40:6-40:20", "definition_extent": "40:1-40:28", @@ -166,6 +172,7 @@ OUTPUT: "usr": "c:@F@empty#", "short_name": "empty", "detailed_name": "void empty()", + "hover": "void empty()", "declarations": [], "definition_spelling": "53:6-53:11", "definition_extent": "53:1-55:2", @@ -179,6 +186,7 @@ OUTPUT: "usr": "c:@S@Foo@F@foo#", "short_name": "foo", "detailed_name": "unique_ptr *Foo::foo()", + "hover": "unique_ptr *Foo::foo()", "declarations": [{ "spelling": "65:23-65:26", "extent": "65:3-65:28", @@ -198,6 +206,7 @@ OUTPUT: "usr": "c:@f", "short_name": "f", "detailed_name": "unique_ptr, S2> f", + "hover": "unique_ptr, S2>", "declaration": "15:43-15:44", "variable_type": 0, "is_local": false, @@ -208,6 +217,7 @@ OUTPUT: "usr": "c:type_usage_as_template_parameter_complex.cc@1062@F@empty#@local", "short_name": "local", "detailed_name": "unique_ptr, S2> * local", + "hover": "unique_ptr, S2> *", "definition_spelling": "54:39-54:44", "definition_extent": "54:3-54:44", "variable_type": 0, diff --git a/tests/usage/type_usage_as_template_parameter_simple.cc b/tests/usage/type_usage_as_template_parameter_simple.cc index 7c689a7d..f7b5cd66 100644 --- a/tests/usage/type_usage_as_template_parameter_simple.cc +++ b/tests/usage/type_usage_as_template_parameter_simple.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@ST>1#T@unique_ptr", "short_name": "unique_ptr", "detailed_name": "unique_ptr", + "hover": "unique_ptr", "definition_spelling": "2:7-2:17", "definition_extent": "2:1-2:20", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@S@S", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -43,6 +45,7 @@ OUTPUT: "usr": "c:type_usage_as_template_parameter_simple.cc@foo", "short_name": "foo", "detailed_name": "unique_ptr foo", + "hover": "unique_ptr", "definition_spelling": "6:22-6:25", "definition_extent": "6:1-6:25", "variable_type": 0, diff --git a/tests/usage/type_usage_declare_extern.cc b/tests/usage/type_usage_declare_extern.cc index 60b12a32..c11a74fe 100644 --- a/tests/usage/type_usage_declare_extern.cc +++ b/tests/usage/type_usage_declare_extern.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:@S@T", "short_name": "T", "detailed_name": "T", + "hover": "T", "definition_spelling": "1:8-1:9", "definition_extent": "1:1-1:12", "parents": [], @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:@t", "short_name": "t", "detailed_name": "T t", + "hover": "T", "declaration": "3:10-3:11", "variable_type": 0, "is_local": false, diff --git a/tests/usage/type_usage_declare_field.cc b/tests/usage/type_usage_declare_field.cc index 1701224e..b6d0915a 100644 --- a/tests/usage/type_usage_declare_field.cc +++ b/tests/usage/type_usage_declare_field.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@ForwardType", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@S@ImplementedType", "short_name": "ImplementedType", "detailed_name": "ImplementedType", + "hover": "ImplementedType", "definition_spelling": "2:8-2:23", "definition_extent": "2:1-2:26", "parents": [], @@ -42,6 +44,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "4:8-4:11", "definition_extent": "4:1-7:2", "parents": [], @@ -58,6 +61,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@a", "short_name": "a", "detailed_name": "ForwardType * Foo::a", + "hover": "ForwardType *", "definition_spelling": "5:16-5:17", "definition_extent": "5:3-5:17", "variable_type": 0, @@ -70,6 +74,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@b", "short_name": "b", "detailed_name": "ImplementedType Foo::b", + "hover": "ImplementedType", "definition_spelling": "6:19-6:20", "definition_extent": "6:3-6:20", "variable_type": 1, diff --git a/tests/usage/type_usage_declare_local.cc b/tests/usage/type_usage_declare_local.cc index 8a9526ab..6b063343 100644 --- a/tests/usage/type_usage_declare_local.cc +++ b/tests/usage/type_usage_declare_local.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@ForwardType", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@S@ImplementedType", "short_name": "ImplementedType", "detailed_name": "ImplementedType", + "hover": "ImplementedType", "definition_spelling": "2:8-2:23", "definition_extent": "2:1-2:26", "parents": [], @@ -44,6 +46,7 @@ OUTPUT: "usr": "c:@F@Foo#", "short_name": "Foo", "detailed_name": "void Foo()", + "hover": "void Foo()", "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-7:2", @@ -57,6 +60,7 @@ OUTPUT: "usr": "c:type_usage_declare_local.cc@67@F@Foo#@a", "short_name": "a", "detailed_name": "ForwardType * a", + "hover": "ForwardType *", "definition_spelling": "5:16-5:17", "definition_extent": "5:3-5:17", "variable_type": 0, @@ -68,6 +72,7 @@ OUTPUT: "usr": "c:type_usage_declare_local.cc@86@F@Foo#@b", "short_name": "b", "detailed_name": "ImplementedType b", + "hover": "ImplementedType", "definition_spelling": "6:19-6:20", "definition_extent": "6:3-6:20", "variable_type": 1, diff --git a/tests/usage/type_usage_declare_param.cc b/tests/usage/type_usage_declare_param.cc index e6cfe2ce..d8162832 100644 --- a/tests/usage/type_usage_declare_param.cc +++ b/tests/usage/type_usage_declare_param.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@S@ForwardType", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -25,6 +26,7 @@ OUTPUT: "usr": "c:@S@ImplementedType", "short_name": "ImplementedType", "detailed_name": "ImplementedType", + "hover": "ImplementedType", "definition_spelling": "2:8-2:23", "definition_extent": "2:1-2:26", "parents": [], @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:@F@foo#*$@S@ForwardType#$@S@ImplementedType#", "short_name": "foo", "detailed_name": "void foo(ForwardType *, ImplementedType)", + "hover": "void foo(ForwardType *, ImplementedType)", "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-4:47", @@ -54,6 +57,7 @@ OUTPUT: "usr": "c:type_usage_declare_param.cc@60@F@foo#*$@S@ForwardType#$@S@ImplementedType#@f", "short_name": "f", "detailed_name": "ForwardType * f", + "hover": "ForwardType *", "definition_spelling": "4:23-4:24", "definition_extent": "4:10-4:24", "variable_type": 0, @@ -65,6 +69,7 @@ OUTPUT: "usr": "c:type_usage_declare_param.cc@76@F@foo#*$@S@ForwardType#$@S@ImplementedType#@a", "short_name": "a", "detailed_name": "ImplementedType a", + "hover": "ImplementedType", "definition_spelling": "4:42-4:43", "definition_extent": "4:26-4:43", "variable_type": 1, diff --git a/tests/usage/type_usage_declare_param_prototype.cc b/tests/usage/type_usage_declare_param_prototype.cc index 1bfb8cf2..5db4d0e4 100644 --- a/tests/usage/type_usage_declare_param_prototype.cc +++ b/tests/usage/type_usage_declare_param_prototype.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@F@foo#*$@S@Foo#S0_#", "short_name": "foo", "detailed_name": "void foo(Foo *, Foo *)", + "hover": "void foo(Foo *, Foo *)", "declarations": [{ "spelling": "3:6-3:9", "extent": "3:1-3:23", @@ -50,6 +52,7 @@ OUTPUT: "usr": "c:type_usage_declare_param_prototype.cc@49@F@foo#*$@S@Foo#S0_#@f", "short_name": "f", "detailed_name": "Foo * f", + "hover": "Foo *", "definition_spelling": "4:15-4:16", "definition_extent": "4:10-4:16", "variable_type": 0, diff --git a/tests/usage/type_usage_declare_param_unnamed.cc b/tests/usage/type_usage_declare_param_unnamed.cc index 43c7b046..ef534aba 100644 --- a/tests/usage/type_usage_declare_param_unnamed.cc +++ b/tests/usage/type_usage_declare_param_unnamed.cc @@ -10,6 +10,7 @@ OUTPUT: "usr": "c:@S@ForwardType", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -24,6 +25,7 @@ OUTPUT: "usr": "c:@F@foo#*$@S@ForwardType#", "short_name": "foo", "detailed_name": "void foo(ForwardType *)", + "hover": "void foo(ForwardType *)", "declarations": [], "definition_spelling": "2:6-2:9", "definition_extent": "2:1-2:26", diff --git a/tests/usage/type_usage_declare_qualifiers.cc b/tests/usage/type_usage_declare_qualifiers.cc index ffd2e9b6..a71adda5 100644 --- a/tests/usage/type_usage_declare_qualifiers.cc +++ b/tests/usage/type_usage_declare_qualifiers.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@Type", "short_name": "Type", "detailed_name": "Type", + "hover": "Type", "definition_spelling": "1:8-1:12", "definition_extent": "1:1-1:15", "parents": [], @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@F@foo#&$@S@Type#&1S1_#", "short_name": "foo", "detailed_name": "void foo(Type &, const Type &)", + "hover": "void foo(Type &, const Type &)", "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-8:2", @@ -45,6 +47,7 @@ OUTPUT: "usr": "c:type_usage_declare_qualifiers.cc@28@F@foo#&$@S@Type#&1S1_#@a0", "short_name": "a0", "detailed_name": "Type & a0", + "hover": "Type &", "definition_spelling": "3:16-3:18", "definition_extent": "3:10-3:18", "variable_type": 0, @@ -56,6 +59,7 @@ OUTPUT: "usr": "c:type_usage_declare_qualifiers.cc@38@F@foo#&$@S@Type#&1S1_#@a1", "short_name": "a1", "detailed_name": "const Type & a1", + "hover": "const Type &", "definition_spelling": "3:32-3:34", "definition_extent": "3:20-3:34", "variable_type": 0, @@ -67,6 +71,7 @@ OUTPUT: "usr": "c:type_usage_declare_qualifiers.cc@59@F@foo#&$@S@Type#&1S1_#@a2", "short_name": "a2", "detailed_name": "Type a2", + "hover": "Type", "definition_spelling": "4:8-4:10", "definition_extent": "4:3-4:10", "variable_type": 0, @@ -78,6 +83,7 @@ OUTPUT: "usr": "c:type_usage_declare_qualifiers.cc@71@F@foo#&$@S@Type#&1S1_#@a3", "short_name": "a3", "detailed_name": "Type * a3", + "hover": "Type *", "definition_spelling": "5:9-5:11", "definition_extent": "5:3-5:11", "variable_type": 0, @@ -89,6 +95,7 @@ OUTPUT: "usr": "c:type_usage_declare_qualifiers.cc@84@F@foo#&$@S@Type#&1S1_#@a4", "short_name": "a4", "detailed_name": "const Type * a4", + "hover": "const Type *", "definition_spelling": "6:15-6:17", "definition_extent": "6:3-6:17", "variable_type": 0, @@ -100,6 +107,7 @@ OUTPUT: "usr": "c:type_usage_declare_qualifiers.cc@103@F@foo#&$@S@Type#&1S1_#@a5", "short_name": "a5", "detailed_name": "const Type * a5", + "hover": "const Type *", "definition_spelling": "7:21-7:23", "definition_extent": "7:3-7:23", "variable_type": 0, diff --git a/tests/usage/type_usage_declare_static.cc b/tests/usage/type_usage_declare_static.cc index 44de4c67..b45a6ac2 100644 --- a/tests/usage/type_usage_declare_static.cc +++ b/tests/usage/type_usage_declare_static.cc @@ -10,6 +10,7 @@ OUTPUT: "usr": "c:@S@Type", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -24,6 +25,7 @@ OUTPUT: "usr": "c:type_usage_declare_static.cc@t", "short_name": "t", "detailed_name": "Type t", + "hover": "Type", "definition_spelling": "2:13-2:14", "definition_extent": "2:1-2:14", "variable_type": 0, diff --git a/tests/usage/type_usage_on_return_type.cc b/tests/usage/type_usage_on_return_type.cc index 6980692a..639fbe5a 100644 --- a/tests/usage/type_usage_on_return_type.cc +++ b/tests/usage/type_usage_on_return_type.cc @@ -27,6 +27,7 @@ OUTPUT: "usr": "c:@S@Type", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -39,6 +40,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "7:7-7:10", "definition_extent": "7:1-10:2", "parents": [], @@ -55,6 +57,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "Type *foo()", + "hover": "Type *foo()", "declarations": [{ "spelling": "3:7-3:10", "extent": "3:1-3:12", @@ -78,6 +81,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Get#I#", "short_name": "Get", "detailed_name": "Type *Foo::Get(int)", + "hover": "Type *Foo::Get(int)", "declarations": [{ "spelling": "8:9-8:12", "extent": "8:3-8:17", @@ -97,6 +101,7 @@ OUTPUT: "usr": "c:@S@Foo@F@Empty#", "short_name": "Empty", "detailed_name": "void Foo::Empty()", + "hover": "void Foo::Empty()", "declarations": [{ "spelling": "9:8-9:13", "extent": "9:3-9:15", @@ -116,6 +121,7 @@ OUTPUT: "usr": "c:@F@external#", "short_name": "external", "detailed_name": "const Type &external()", + "hover": "const Type &external()", "declarations": [{ "spelling": "15:20-15:28", "extent": "15:1-15:30", @@ -132,6 +138,7 @@ OUTPUT: "usr": "c:type_usage_on_return_type.cc@F@bar#", "short_name": "bar", "detailed_name": "Type *bar()", + "hover": "Type *bar()", "declarations": [{ "spelling": "17:14-17:17", "extent": "17:1-17:19", diff --git a/tests/usage/type_usage_typedef_and_using.cc b/tests/usage/type_usage_typedef_and_using.cc index a3193fad..59497366 100644 --- a/tests/usage/type_usage_typedef_and_using.cc +++ b/tests/usage/type_usage_typedef_and_using.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -30,7 +31,8 @@ OUTPUT: "id": 1, "usr": "c:@Foo1", "short_name": "Foo1", - "detailed_name": "using Foo1 = Foo*", + "detailed_name": "Foo1", + "hover": "using Foo1 = Foo*", "definition_spelling": "2:7-2:11", "definition_extent": "2:1-2:18", "alias_of": 0, @@ -45,7 +47,8 @@ OUTPUT: "id": 2, "usr": "c:type_usage_typedef_and_using.cc@T@Foo2", "short_name": "Foo2", - "detailed_name": "typedef Foo Foo2", + "detailed_name": "Foo2", + "hover": "typedef Foo Foo2", "definition_spelling": "3:13-3:17", "definition_extent": "3:1-3:17", "alias_of": 0, @@ -60,7 +63,8 @@ OUTPUT: "id": 3, "usr": "c:@Foo3", "short_name": "Foo3", - "detailed_name": "using Foo3 = Foo1", + "detailed_name": "Foo3", + "hover": "using Foo3 = Foo1", "definition_spelling": "4:7-4:11", "definition_extent": "4:1-4:18", "alias_of": 1, @@ -75,7 +79,8 @@ OUTPUT: "id": 4, "usr": "c:@Foo4", "short_name": "Foo4", - "detailed_name": "using Foo4 = int", + "detailed_name": "Foo4", + "hover": "using Foo4 = int", "definition_spelling": "5:7-5:11", "definition_extent": "5:1-5:17", "parents": [], @@ -92,6 +97,7 @@ OUTPUT: "usr": "c:@F@accept#*$@S@Foo#", "short_name": "accept", "detailed_name": "void accept(Foo *)", + "hover": "void accept(Foo *)", "declarations": [], "definition_spelling": "7:6-7:12", "definition_extent": "7:1-7:21", @@ -105,6 +111,7 @@ OUTPUT: "usr": "c:@F@accept1#**$@S@Foo#", "short_name": "accept1", "detailed_name": "void accept1(Foo1 *)", + "hover": "void accept1(Foo1 *)", "declarations": [], "definition_spelling": "8:6-8:13", "definition_extent": "8:1-8:23", @@ -118,6 +125,7 @@ OUTPUT: "usr": "c:@F@accept2#*$@S@Foo#", "short_name": "accept2", "detailed_name": "void accept2(Foo2 *)", + "hover": "void accept2(Foo2 *)", "declarations": [], "definition_spelling": "9:6-9:13", "definition_extent": "9:1-9:23", @@ -131,6 +139,7 @@ OUTPUT: "usr": "c:@F@accept3#**$@S@Foo#", "short_name": "accept3", "detailed_name": "void accept3(Foo3 *)", + "hover": "void accept3(Foo3 *)", "declarations": [], "definition_spelling": "10:6-10:13", "definition_extent": "10:1-10:23", diff --git a/tests/usage/type_usage_typedef_and_using_template.cc b/tests/usage/type_usage_typedef_and_using_template.cc index d7fa7cb5..8e987019 100644 --- a/tests/usage/type_usage_typedef_and_using_template.cc +++ b/tests/usage/type_usage_typedef_and_using_template.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@ST>1#T@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -25,7 +26,8 @@ OUTPUT: "id": 1, "usr": "c:@Foo1", "short_name": "Foo1", - "detailed_name": "using Foo1 = Foo", + "detailed_name": "Foo1", + "hover": "using Foo1 = Foo", "definition_spelling": "4:7-4:11", "definition_extent": "4:1-4:22", "alias_of": 0, @@ -40,7 +42,8 @@ OUTPUT: "id": 2, "usr": "c:type_usage_typedef_and_using_template.cc@T@Foo2", "short_name": "Foo2", - "detailed_name": "typedef Foo Foo2", + "detailed_name": "Foo2", + "hover": "typedef Foo Foo2", "definition_spelling": "5:19-5:23", "definition_extent": "5:1-5:23", "alias_of": 0, diff --git a/tests/usage/type_usage_various.cc b/tests/usage/type_usage_various.cc index b518bb83..78d65319 100644 --- a/tests/usage/type_usage_various.cc +++ b/tests/usage/type_usage_various.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -35,6 +36,7 @@ OUTPUT: "usr": "c:@S@Foo@F@make#", "short_name": "make", "detailed_name": "Foo *Foo::make()", + "hover": "Foo *Foo::make()", "declarations": [{ "spelling": "2:8-2:12", "extent": "2:3-2:14", @@ -54,6 +56,7 @@ OUTPUT: "usr": "c:type_usage_various.cc@57@S@Foo@F@make#@f", "short_name": "f", "detailed_name": "Foo f", + "hover": "Foo", "definition_spelling": "6:7-6:8", "definition_extent": "6:3-6:8", "variable_type": 0, @@ -65,6 +68,7 @@ OUTPUT: "usr": "c:@foo", "short_name": "foo", "detailed_name": "Foo foo", + "hover": "Foo", "declaration": "10:12-10:15", "variable_type": 0, "is_local": false, diff --git a/tests/usage/usage_inside_of_call.cc b/tests/usage/usage_inside_of_call.cc index c32eb180..720cde37 100644 --- a/tests/usage/usage_inside_of_call.cc +++ b/tests/usage/usage_inside_of_call.cc @@ -24,6 +24,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "5:8-5:11", "definition_extent": "5:1-8:2", "parents": [], @@ -40,6 +41,7 @@ OUTPUT: "usr": "c:@F@called#I#", "short_name": "called", "detailed_name": "void called(int)", + "hover": "void called(int)", "declarations": [{ "spelling": "1:6-1:12", "extent": "1:1-1:19", @@ -56,6 +58,7 @@ OUTPUT: "usr": "c:@F@gen#", "short_name": "gen", "detailed_name": "int gen()", + "hover": "int gen()", "declarations": [{ "spelling": "3:5-3:8", "extent": "3:1-3:10", @@ -72,6 +75,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "12:6-12:9", "definition_extent": "12:1-15:2", @@ -85,6 +89,7 @@ OUTPUT: "usr": "c:@S@Foo@static_var", "short_name": "static_var", "detailed_name": "int Foo::static_var", + "hover": "int", "declaration": "6:14-6:24", "definition_spelling": "10:10-10:20", "definition_extent": "10:1-10:24", @@ -97,6 +102,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@field_var", "short_name": "field_var", "detailed_name": "int Foo::field_var", + "hover": "int", "definition_spelling": "7:7-7:16", "definition_extent": "7:3-7:16", "declaring_type": 0, @@ -108,6 +114,7 @@ OUTPUT: "usr": "c:usage_inside_of_call.cc@145@F@foo#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "13:7-13:8", "definition_extent": "13:3-13:12", "is_local": true, diff --git a/tests/usage/usage_inside_of_call_simple.cc b/tests/usage/usage_inside_of_call_simple.cc index df6ed6e6..f297bdb5 100644 --- a/tests/usage/usage_inside_of_call_simple.cc +++ b/tests/usage/usage_inside_of_call_simple.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@F@called#I#", "short_name": "called", "detailed_name": "void called(int)", + "hover": "void called(int)", "declarations": [{ "spelling": "1:6-1:12", "extent": "1:1-1:19", @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@F@gen#", "short_name": "gen", "detailed_name": "int gen()", + "hover": "int gen()", "declarations": [], "definition_spelling": "3:5-3:8", "definition_extent": "3:1-3:24", @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "5:6-5:9", "definition_extent": "5:1-7:2", diff --git a/tests/usage/var_usage_call_function.cc b/tests/usage/var_usage_call_function.cc index e68444e4..7cf01295 100644 --- a/tests/usage/var_usage_call_function.cc +++ b/tests/usage/var_usage_call_function.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@F@called#", "short_name": "called", "detailed_name": "void called()", + "hover": "void called()", "declarations": [], "definition_spelling": "1:6-1:12", "definition_extent": "1:1-1:17", @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:@F@caller#", "short_name": "caller", "detailed_name": "void caller()", + "hover": "void caller()", "declarations": [], "definition_spelling": "3:6-3:12", "definition_extent": "3:1-8:2", @@ -45,6 +47,7 @@ OUTPUT: "usr": "c:var_usage_call_function.cc@39@F@caller#@x", "short_name": "x", "detailed_name": "void (*)() x", + "hover": "void (*)()", "definition_spelling": "4:8-4:9", "definition_extent": "4:3-4:19", "is_local": true, diff --git a/tests/usage/var_usage_class_member.cc b/tests/usage/var_usage_class_member.cc index 533b65ed..e9c3f15d 100644 --- a/tests/usage/var_usage_class_member.cc +++ b/tests/usage/var_usage_class_member.cc @@ -27,6 +27,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-5:2", "parents": [], @@ -43,6 +44,7 @@ OUTPUT: "usr": "c:@F@accept#I#", "short_name": "accept", "detailed_name": "void accept(int)", + "hover": "void accept(int)", "declarations": [{ "spelling": "7:6-7:12", "extent": "7:1-7:17", @@ -59,6 +61,7 @@ OUTPUT: "usr": "c:@F@accept#*I#", "short_name": "accept", "detailed_name": "void accept(int *)", + "hover": "void accept(int *)", "declarations": [{ "spelling": "8:6-8:12", "extent": "8:1-8:18", @@ -75,6 +78,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "10:6-10:9", "definition_extent": "10:1-18:2", @@ -88,6 +92,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@x", "short_name": "x", "detailed_name": "int Foo::x", + "hover": "int", "definition_spelling": "3:7-3:8", "definition_extent": "3:3-3:8", "declaring_type": 0, @@ -99,6 +104,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@y", "short_name": "y", "detailed_name": "int Foo::y", + "hover": "int", "definition_spelling": "4:7-4:8", "definition_extent": "4:3-4:8", "declaring_type": 0, @@ -110,6 +116,7 @@ OUTPUT: "usr": "c:var_usage_class_member.cc@105@F@foo#@f", "short_name": "f", "detailed_name": "Foo f", + "hover": "Foo", "definition_spelling": "11:7-11:8", "definition_extent": "11:3-11:8", "variable_type": 0, diff --git a/tests/usage/var_usage_class_member_static.cc b/tests/usage/var_usage_class_member_static.cc index c5da4e60..b34d9a9b 100644 --- a/tests/usage/var_usage_class_member_static.cc +++ b/tests/usage/var_usage_class_member_static.cc @@ -18,6 +18,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:8-1:11", "definition_extent": "1:1-3:2", "parents": [], @@ -34,6 +35,7 @@ OUTPUT: "usr": "c:@F@accept#I#", "short_name": "accept", "detailed_name": "void accept(int)", + "hover": "void accept(int)", "declarations": [{ "spelling": "5:6-5:12", "extent": "5:1-5:17", @@ -50,6 +52,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "7:6-7:9", "definition_extent": "7:1-9:2", @@ -63,6 +66,7 @@ OUTPUT: "usr": "c:@S@Foo@x", "short_name": "x", "detailed_name": "int Foo::x", + "hover": "int", "declaration": "2:14-2:15", "is_local": false, "is_macro": false, diff --git a/tests/usage/var_usage_cstyle_cast.cc b/tests/usage/var_usage_cstyle_cast.cc index 00148c10..f22392eb 100644 --- a/tests/usage/var_usage_cstyle_cast.cc +++ b/tests/usage/var_usage_cstyle_cast.cc @@ -17,6 +17,7 @@ OUTPUT: "usr": "c:@E@VarType", "short_name": "VarType", "detailed_name": "VarType", + "hover": "VarType", "definition_spelling": "1:6-1:13", "definition_extent": "1:1-1:16", "parents": [], @@ -31,6 +32,7 @@ OUTPUT: "usr": "c:@S@Holder", "short_name": "Holder", "detailed_name": "Holder", + "hover": "Holder", "definition_spelling": "3:8-3:14", "definition_extent": "3:1-5:2", "parents": [], @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@S@Holder@static_var", "short_name": "static_var", "detailed_name": "const VarType Holder::static_var", + "hover": "const VarType", "declaration": "4:28-4:38", "definition_spelling": "7:23-7:33", "definition_extent": "7:1-7:33", diff --git a/tests/usage/var_usage_extern.cc b/tests/usage/var_usage_extern.cc index 07a47515..f8bece52 100644 --- a/tests/usage/var_usage_extern.cc +++ b/tests/usage/var_usage_extern.cc @@ -15,6 +15,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "declaration": "1:12-1:13", "is_local": false, "is_macro": false, diff --git a/tests/usage/var_usage_func_parameter.cc b/tests/usage/var_usage_func_parameter.cc index 9a4c6db5..3a9e60e9 100644 --- a/tests/usage/var_usage_func_parameter.cc +++ b/tests/usage/var_usage_func_parameter.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@F@foo#I#", "short_name": "foo", "detailed_name": "void foo(int)", + "hover": "void foo(int)", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-3:2", @@ -26,6 +27,7 @@ OUTPUT: "usr": "c:var_usage_func_parameter.cc@9@F@foo#I#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "1:14-1:15", "definition_extent": "1:10-1:15", "is_local": true, diff --git a/tests/usage/var_usage_local.cc b/tests/usage/var_usage_local.cc index 2e301db1..9419cdca 100644 --- a/tests/usage/var_usage_local.cc +++ b/tests/usage/var_usage_local.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-4:2", @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:var_usage_local.cc@16@F@foo#@x", "short_name": "x", "detailed_name": "int x", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "is_local": true, diff --git a/tests/usage/var_usage_shadowed_local.cc b/tests/usage/var_usage_shadowed_local.cc index dd4c65b9..f956630e 100644 --- a/tests/usage/var_usage_shadowed_local.cc +++ b/tests/usage/var_usage_shadowed_local.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-9:2", @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:var_usage_shadowed_local.cc@16@F@foo#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "is_local": true, @@ -42,6 +44,7 @@ OUTPUT: "usr": "c:var_usage_shadowed_local.cc@43@F@foo#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "5:9-5:10", "definition_extent": "5:5-5:10", "is_local": true, diff --git a/tests/usage/var_usage_shadowed_parameter.cc b/tests/usage/var_usage_shadowed_parameter.cc index c23996d2..ccdaa99a 100644 --- a/tests/usage/var_usage_shadowed_parameter.cc +++ b/tests/usage/var_usage_shadowed_parameter.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@F@foo#I#", "short_name": "foo", "detailed_name": "void foo(int)", + "hover": "void foo(int)", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-8:2", @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:var_usage_shadowed_parameter.cc@9@F@foo#I#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "1:14-1:15", "definition_extent": "1:10-1:15", "is_local": true, @@ -42,6 +44,7 @@ OUTPUT: "usr": "c:var_usage_shadowed_parameter.cc@38@F@foo#I#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "4:9-4:10", "definition_extent": "4:5-4:10", "is_local": true, diff --git a/tests/usage/var_usage_static.cc b/tests/usage/var_usage_static.cc index 62458de3..444774dd 100644 --- a/tests/usage/var_usage_static.cc +++ b/tests/usage/var_usage_static.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:var_usage_static.cc@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "1:12-1:13", "definition_extent": "1:1-1:13", "is_local": false, diff --git a/tests/vars/class_member.cc b/tests/vars/class_member.cc index 57bcdce1..3ee05ffb 100644 --- a/tests/vars/class_member.cc +++ b/tests/vars/class_member.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:@S@Foo@FI@member", "short_name": "member", "detailed_name": "Foo * Foo::member", + "hover": "Foo *", "definition_spelling": "2:8-2:14", "definition_extent": "2:3-2:14", "variable_type": 0, diff --git a/tests/vars/class_static_member.cc b/tests/vars/class_static_member.cc index 0077e7a6..6c63d1be 100644 --- a/tests/vars/class_static_member.cc +++ b/tests/vars/class_static_member.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -29,6 +30,7 @@ OUTPUT: "usr": "c:@S@Foo@member", "short_name": "member", "detailed_name": "Foo * Foo::member", + "hover": "Foo *", "declaration": "2:15-2:21", "definition_spelling": "4:11-4:17", "definition_extent": "4:1-4:27", diff --git a/tests/vars/class_static_member_decl_only.cc b/tests/vars/class_static_member_decl_only.cc index 9de79129..2b4ed08c 100644 --- a/tests/vars/class_static_member_decl_only.cc +++ b/tests/vars/class_static_member_decl_only.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-3:2", "parents": [], @@ -27,6 +28,7 @@ OUTPUT: "usr": "c:@S@Foo@member", "short_name": "member", "detailed_name": "int Foo::member", + "hover": "int", "declaration": "2:14-2:20", "is_local": false, "is_macro": false, diff --git a/tests/vars/deduce_auto_type.cc b/tests/vars/deduce_auto_type.cc index 54daf62a..a6f7be1d 100644 --- a/tests/vars/deduce_auto_type.cc +++ b/tests/vars/deduce_auto_type.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "Foo", "detailed_name": "Foo", + "hover": "Foo", "definition_spelling": "1:7-1:10", "definition_extent": "1:1-1:13", "parents": [], @@ -30,6 +31,7 @@ OUTPUT: "usr": "c:@F@f#", "short_name": "f", "detailed_name": "void f()", + "hover": "void f()", "declarations": [], "definition_spelling": "2:6-2:7", "definition_extent": "2:1-5:2", @@ -43,6 +45,7 @@ OUTPUT: "usr": "c:deduce_auto_type.cc@29@F@f#@x", "short_name": "x", "detailed_name": "Foo * x", + "hover": "Foo *", "definition_spelling": "3:8-3:9", "definition_extent": "3:3-3:21", "variable_type": 0, @@ -54,6 +57,7 @@ OUTPUT: "usr": "c:deduce_auto_type.cc@52@F@f#@y", "short_name": "y", "detailed_name": "Foo * y", + "hover": "Foo *", "definition_spelling": "4:9-4:10", "definition_extent": "4:3-4:22", "variable_type": 0, diff --git a/tests/vars/function_local.cc b/tests/vars/function_local.cc index 4efbf90d..07e4eb6a 100644 --- a/tests/vars/function_local.cc +++ b/tests/vars/function_local.cc @@ -14,6 +14,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -28,6 +29,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", @@ -41,6 +43,7 @@ OUTPUT: "usr": "c:function_local.cc@31@F@foo#@a", "short_name": "a", "detailed_name": "Foo * a", + "hover": "Foo *", "definition_spelling": "4:8-4:9", "definition_extent": "4:3-4:9", "variable_type": 0, diff --git a/tests/vars/function_param.cc b/tests/vars/function_param.cc index 8dd431b9..0555839e 100644 --- a/tests/vars/function_param.cc +++ b/tests/vars/function_param.cc @@ -12,6 +12,7 @@ OUTPUT: "usr": "c:@S@Foo", "short_name": "", "detailed_name": "", + "hover": "", "parents": [], "derived": [], "types": [], @@ -26,6 +27,7 @@ OUTPUT: "usr": "c:@F@foo#*$@S@Foo#S0_#", "short_name": "foo", "detailed_name": "void foo(Foo *, Foo *)", + "hover": "void foo(Foo *, Foo *)", "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-3:30", @@ -39,6 +41,7 @@ OUTPUT: "usr": "c:function_param.cc@24@F@foo#*$@S@Foo#S0_#@p0", "short_name": "p0", "detailed_name": "Foo * p0", + "hover": "Foo *", "definition_spelling": "3:15-3:17", "definition_extent": "3:10-3:17", "variable_type": 0, @@ -50,6 +53,7 @@ OUTPUT: "usr": "c:function_param.cc@33@F@foo#*$@S@Foo#S0_#@p1", "short_name": "p1", "detailed_name": "Foo * p1", + "hover": "Foo *", "definition_spelling": "3:24-3:26", "definition_extent": "3:19-3:26", "variable_type": 0, diff --git a/tests/vars/function_param_unnamed.cc b/tests/vars/function_param_unnamed.cc index b24c0a6b..92dd44a8 100644 --- a/tests/vars/function_param_unnamed.cc +++ b/tests/vars/function_param_unnamed.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:@F@foo#I#I#", "short_name": "foo", "detailed_name": "void foo(int, int)", + "hover": "void foo(int, int)", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-1:22", diff --git a/tests/vars/function_shadow_local.cc b/tests/vars/function_shadow_local.cc index 811fe555..87ef8f79 100644 --- a/tests/vars/function_shadow_local.cc +++ b/tests/vars/function_shadow_local.cc @@ -19,6 +19,7 @@ OUTPUT: "usr": "c:@F@foo#", "short_name": "foo", "detailed_name": "void foo()", + "hover": "void foo()", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-9:2", @@ -32,6 +33,7 @@ OUTPUT: "usr": "c:function_shadow_local.cc@16@F@foo#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "is_local": true, @@ -42,6 +44,7 @@ OUTPUT: "usr": "c:function_shadow_local.cc@43@F@foo#@a", "short_name": "a", "detailed_name": "int a", + "hover": "int", "definition_spelling": "5:9-5:10", "definition_extent": "5:5-5:10", "is_local": true, diff --git a/tests/vars/function_shadow_param.cc b/tests/vars/function_shadow_param.cc index 80fbf8c4..f794964f 100644 --- a/tests/vars/function_shadow_param.cc +++ b/tests/vars/function_shadow_param.cc @@ -13,6 +13,7 @@ OUTPUT: "usr": "c:@F@foo#I#", "short_name": "foo", "detailed_name": "void foo(int)", + "hover": "void foo(int)", "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-3:2", @@ -26,6 +27,7 @@ OUTPUT: "usr": "c:function_shadow_param.cc@9@F@foo#I#@p", "short_name": "p", "detailed_name": "int p", + "hover": "int", "definition_spelling": "1:14-1:15", "definition_extent": "1:10-1:15", "is_local": true, @@ -36,6 +38,7 @@ OUTPUT: "usr": "c:function_shadow_param.cc@21@F@foo#I#@p", "short_name": "p", "detailed_name": "int p", + "hover": "int", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "is_local": true, diff --git a/tests/vars/global_variable.cc b/tests/vars/global_variable.cc index 574601ac..95a242fb 100644 --- a/tests/vars/global_variable.cc +++ b/tests/vars/global_variable.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:global_variable.cc@global", "short_name": "global", "detailed_name": "int global", + "hover": "int", "definition_spelling": "1:12-1:18", "definition_extent": "1:1-1:22", "is_local": false, diff --git a/tests/vars/global_variable_decl_only.cc b/tests/vars/global_variable_decl_only.cc index 3d4071f3..60da44d9 100644 --- a/tests/vars/global_variable_decl_only.cc +++ b/tests/vars/global_variable_decl_only.cc @@ -11,6 +11,7 @@ OUTPUT: "usr": "c:@global", "short_name": "global", "detailed_name": "int global", + "hover": "int", "declaration": "1:12-1:18", "is_local": false, "is_macro": false, diff --git a/tests/vars/type_instance_on_using_type.cc b/tests/vars/type_instance_on_using_type.cc index 00b56529..f039fd21 100644 --- a/tests/vars/type_instance_on_using_type.cc +++ b/tests/vars/type_instance_on_using_type.cc @@ -16,6 +16,7 @@ OUTPUT: "usr": "c:@S@S", "short_name": "S", "detailed_name": "S", + "hover": "S", "definition_spelling": "1:8-1:9", "definition_extent": "1:1-1:12", "parents": [], @@ -29,7 +30,8 @@ OUTPUT: "id": 1, "usr": "c:@F", "short_name": "F", - "detailed_name": "using F = S", + "detailed_name": "F", + "hover": "using F = S", "definition_spelling": "2:7-2:8", "definition_extent": "2:1-2:12", "alias_of": 0, @@ -47,6 +49,7 @@ OUTPUT: "usr": "c:@F@Foo#", "short_name": "Foo", "detailed_name": "void Foo()", + "hover": "void Foo()", "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", @@ -60,6 +63,7 @@ OUTPUT: "usr": "c:type_instance_on_using_type.cc@44@F@Foo#@a", "short_name": "a", "detailed_name": "F a", + "hover": "F", "definition_spelling": "4:5-4:6", "definition_extent": "4:3-4:6", "variable_type": 1,