diff --git a/src/indexer.cc b/src/indexer.cc index 65b97e47..12d1f3e7 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -368,7 +368,7 @@ std::string GetDocumentContentInRange(CXTranslationUnit cx_tu, } // namespace // static -int IndexFile::kCurrentVersion = 5; +int IndexFile::kCurrentVersion = 6; IndexFile::IndexFile(const std::string& path) : id_cache(path), path(path) { // TODO: Reconsider if we should still be reusing the same id_cache. @@ -1205,20 +1205,13 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { clang_getOverriddenCursors(decl->cursor, &overridden, &num_overridden); - // FIXME: this happens for destructors when there are multiple - // parent classes. - if (num_overridden > 1) { - std::cerr << "[indexer]: warning: multiple base overrides for " - << func->def.detailed_name << std::endl; - } - for (unsigned i = 0; i < num_overridden; ++i) { ClangCursor parent = overridden[i]; IndexFuncId parent_id = db->ToFuncId(parent.get_usr()); IndexFunc* parent_def = db->Resolve(parent_id); func = db->Resolve(func_id); // ToFuncId invalidated func_def - func->def.base = parent_id; + func->def.base.push_back(parent_id); parent_def->derived.push_back(func_id); } diff --git a/src/indexer.h b/src/indexer.h index ed6369ab..5aa9b9ef 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -255,7 +255,7 @@ struct FuncDefDefinitionData { optional declaring_type; // Method this method overrides. - optional base; + std::vector base; // Local variables defined in this function. std::vector locals; diff --git a/src/messages/cquery_base.cc b/src/messages/cquery_base.cc index 7f566127..6ba40b88 100644 --- a/src/messages/cquery_base.cc +++ b/src/messages/cquery_base.cc @@ -34,15 +34,9 @@ struct CqueryBaseHandler : BaseMessageHandler { out.result = GetLsLocations(db, working_files, locations); } else if (ref.idx.kind == SymbolKind::Func) { QueryFunc& func = db->funcs[ref.idx.idx]; - optional location = - GetBaseDefinitionOrDeclarationSpelling(db, func); - if (!location) - continue; - optional ls_loc = - GetLsLocation(db, working_files, *location); - if (!ls_loc) - continue; - out.result.push_back(*ls_loc); + std::vector locations = + ToQueryLocation(db, func.def->base); + out.result = GetLsLocations(db, working_files, locations); } } IpcManager::WriteStdout(IpcId::CqueryBase, out); diff --git a/src/messages/cquery_type_hierarchy_tree.cc b/src/messages/cquery_type_hierarchy_tree.cc index 6144ec73..03784c72 100644 --- a/src/messages/cquery_type_hierarchy_tree.cc +++ b/src/messages/cquery_type_hierarchy_tree.cc @@ -99,24 +99,28 @@ std::vector BuildParentInheritanceHierarchyForFunc(QueryDatabase* db, WorkingFiles* working_files, QueryFuncId root) { - QueryFunc& root_func = db->funcs[root.id]; - if (!root_func.def || !root_func.def->base) - return {}; - - QueryFunc& parent_func = db->funcs[root_func.def->base->id]; - if (!parent_func.def) - return {}; - - Out_CqueryTypeHierarchyTree::TypeEntry parent_entry; - parent_entry.name = parent_func.def->detailed_name; - if (parent_func.def->definition_spelling) - parent_entry.location = - GetLsLocation(db, working_files, *parent_func.def->definition_spelling); - parent_entry.children = BuildParentInheritanceHierarchyForFunc( - db, working_files, *root_func.def->base); - std::vector entries; - entries.push_back(parent_entry); + + QueryFunc& root_func = db->funcs[root.id]; + if (!root_func.def || root_func.def->base.empty()) + return {}; + + for (QueryFuncId parent_id : root_func.def->base) { + QueryFunc& parent_func = db->funcs[parent_id.id]; + if (!parent_func.def) + continue; + + Out_CqueryTypeHierarchyTree::TypeEntry parent_entry; + parent_entry.name = parent_func.def->detailed_name; + if (parent_func.def->definition_spelling) + parent_entry.location = + GetLsLocation(db, working_files, *parent_func.def->definition_spelling); + parent_entry.children = BuildParentInheritanceHierarchyForFunc( + db, working_files, parent_id); + + entries.push_back(parent_entry); + } + return entries; } diff --git a/src/messages/text_document_code_lens.cc b/src/messages/text_document_code_lens.cc index 0b26a8d1..9876a5cf 100644 --- a/src/messages/text_document_code_lens.cc +++ b/src/messages/text_document_code_lens.cc @@ -201,26 +201,32 @@ struct TextDocumentCodeLensHandler false /*force_display*/); // "Base" - optional base_loc = - GetBaseDefinitionOrDeclarationSpelling(db, func); - if (base_loc) { - optional ls_base = + if (func.def->base.size() == 1) { + optional base_loc = GetDefinitionSpellingOfSymbol(db, func.def->base[0]); + if (base_loc) { + optional ls_base = GetLsLocation(db, working_files, *base_loc); - if (ls_base) { - optional range = + if (ls_base) { + optional range = GetLsRange(common.working_file, ref.loc.range); - if (range) { - TCodeLens code_lens; - code_lens.range = *range; - code_lens.range.start.character += offset++; - code_lens.command = lsCommand(); - code_lens.command->title = "Base"; - code_lens.command->command = "cquery.goto"; - code_lens.command->arguments.uri = ls_base->uri; - code_lens.command->arguments.position = ls_base->range.start; - out.result.push_back(code_lens); + if (range) { + TCodeLens code_lens; + code_lens.range = *range; + code_lens.range.start.character += offset++; + code_lens.command = lsCommand(); + code_lens.command->title = "Base"; + code_lens.command->command = "cquery.goto"; + code_lens.command->arguments.uri = ls_base->uri; + code_lens.command->arguments.position = ls_base->range.start; + out.result.push_back(code_lens); + } } } + } else { + AddCodeLens("base", "base", &common, + ref.loc.OffsetStartColumn(1), + ToQueryLocation(db, func.def->base), nullopt, + false /*force_display*/); } break; diff --git a/src/query_utils.cc b/src/query_utils.cc index 547fcbb0..e2a29e72 100644 --- a/src/query_utils.cc +++ b/src/query_utils.cc @@ -245,39 +245,24 @@ std::vector GetDeclarationsOfSymbolForGotoDefinition( return {}; } -optional GetBaseDefinitionOrDeclarationSpelling( - QueryDatabase* db, - QueryFunc& func) { - if (!func.def->base) - return nullopt; - QueryFunc& base = db->funcs[func.def->base->id]; - - optional def; - if (base.def) - def = base.def->definition_spelling; - if (!def && !base.declarations.empty()) - def = base.declarations[0]; - return def; -} - bool HasCallersOnSelfOrBaseOrDerived(QueryDatabase* db, QueryFunc& root) { // Check self. if (!root.callers.empty()) return true; // Check for base calls. - optional func_id = root.def->base; - while (func_id) { - QueryFunc& func = db->funcs[func_id->id]; + std::queue queue; + PushRange(&queue, root.def->base); + while (!queue.empty()) { + QueryFunc& func = db->funcs[queue.front().id]; + queue.pop(); if (!func.callers.empty()) return true; - if (!func.def) - break; - func_id = func.def->base; + if (func.def) + PushRange(&queue, func.def->base); } // Check for derived calls. - std::queue queue; PushRange(&queue, root.derived); while (!queue.empty()) { QueryFunc& func = db->funcs[queue.front().id]; @@ -294,14 +279,15 @@ std::vector GetCallersForAllBaseFunctions(QueryDatabase* db, QueryFunc& root) { std::vector callers; - optional func_id = root.def->base; - while (func_id) { - QueryFunc& func = db->funcs[func_id->id]; - AddRange(&callers, func.callers); + std::queue queue; + PushRange(&queue, root.def->base); + while (!queue.empty()) { + QueryFunc& func = db->funcs[queue.front().id]; + queue.pop(); - if (!func.def) - break; - func_id = func.def->base; + AddRange(&callers, func.callers); + if (func.def) + PushRange(&queue, func.def->base); } return callers; diff --git a/src/query_utils.h b/src/query_utils.h index 45c1820a..4bd6ff7a 100644 --- a/src/query_utils.h +++ b/src/query_utils.h @@ -33,9 +33,6 @@ std::vector GetUsesOfSymbol(QueryDatabase* db, std::vector GetDeclarationsOfSymbolForGotoDefinition( QueryDatabase* db, const SymbolIdx& symbol); -optional GetBaseDefinitionOrDeclarationSpelling( - QueryDatabase* db, - QueryFunc& func); bool HasCallersOnSelfOrBaseOrDerived(QueryDatabase* db, QueryFunc& root); std::vector GetCallersForAllBaseFunctions(QueryDatabase* db, QueryFunc& root); diff --git a/src/test.cc b/src/test.cc index 2be751ae..d2a791bf 100644 --- a/src/test.cc +++ b/src/test.cc @@ -120,7 +120,7 @@ void RunIndexTests() { float memory_after = -1.; { - // if (path != "tests/stl.cc") continue; + // if (path != "tests/inheritance/multiple_base_functions.cc") continue; Config config; FileConsumer::SharedState file_consumer_shared; diff --git a/tests/constructors/constructor.cc b/tests/constructors/constructor.cc index 20397817..0cbc247e 100644 --- a/tests/constructors/constructor.cc +++ b/tests/constructors/constructor.cc @@ -40,6 +40,7 @@ OUTPUT: "definition_spelling": "3:3-3:6", "definition_extent": "3:3-3:11", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["~1@7:7-7:8", "1@8:17-8:20"], @@ -54,6 +55,7 @@ OUTPUT: "declarations": [], "definition_spelling": "6:6-6:9", "definition_extent": "6:1-9:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/constructors/destructor.cc b/tests/constructors/destructor.cc index 465a8cf6..f7daa1d9 100644 --- a/tests/constructors/destructor.cc +++ b/tests/constructors/destructor.cc @@ -45,6 +45,7 @@ OUTPUT: "definition_spelling": "3:3-3:6", "definition_extent": "3:3-3:11", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["~2@8:7-8:8"], @@ -60,6 +61,7 @@ OUTPUT: "definition_spelling": "4:3-4:7", "definition_extent": "4:3-4:12", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -74,6 +76,7 @@ OUTPUT: "declarations": [], "definition_spelling": "7:6-7:9", "definition_extent": "7:1-9:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/constructors/implicit_constructor.cc b/tests/constructors/implicit_constructor.cc index e632d4d0..ca54d2a6 100644 --- a/tests/constructors/implicit_constructor.cc +++ b/tests/constructors/implicit_constructor.cc @@ -39,6 +39,7 @@ OUTPUT: "definition_spelling": "2:3-2:7", "definition_extent": "2:3-2:12", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["~1@6:8-6:11"], @@ -53,6 +54,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/constructors/invalid_reference.cc b/tests/constructors/invalid_reference.cc index 63bfa4f7..4dff9864 100644 --- a/tests/constructors/invalid_reference.cc +++ b/tests/constructors/invalid_reference.cc @@ -35,6 +35,7 @@ OUTPUT: "definition_spelling": "4:6-4:9", "definition_extent": "4:1-4:11", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/constructors/make_functions.cc b/tests/constructors/make_functions.cc index 6bc74d59..a075f84c 100644 --- a/tests/constructors/make_functions.cc +++ b/tests/constructors/make_functions.cc @@ -70,6 +70,7 @@ OUTPUT: make_functions.h "definition_spelling": "5:3-5:9", "definition_extent": "5:3-5:14", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -85,6 +86,7 @@ OUTPUT: make_functions.h "definition_spelling": "6:3-6:9", "definition_extent": "6:3-6:17", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -100,6 +102,7 @@ OUTPUT: make_functions.h "definition_spelling": "7:3-7:9", "definition_extent": "7:3-7:32", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -115,6 +118,7 @@ OUTPUT: make_functions.h "definition_spelling": "8:3-8:9", "definition_extent": "8:3-8:30", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -218,6 +222,7 @@ OUTPUT: make_functions.cc "declarations": [], "definition_spelling": "4:4-4:14", "definition_extent": "4:1-6:2", + "base": [], "derived": [], "locals": [], "callers": ["2@14:3-14:13", "2@15:3-15:13", "2@16:3-16:13"], @@ -232,6 +237,7 @@ OUTPUT: make_functions.cc "declarations": [], "definition_spelling": "9:4-9:15", "definition_extent": "9:1-11:2", + "base": [], "derived": [], "locals": [], "callers": ["2@17:3-17:14"], @@ -246,6 +252,7 @@ OUTPUT: make_functions.cc "declarations": [], "definition_spelling": "13:6-13:14", "definition_extent": "13:1-18:2", + "base": [], "derived": [], "locals": [], "callers": [], @@ -258,6 +265,7 @@ OUTPUT: make_functions.cc "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["~-1@14:3-14:13"], @@ -270,6 +278,7 @@ OUTPUT: make_functions.cc "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["~-1@15:3-15:13"], @@ -282,6 +291,7 @@ OUTPUT: make_functions.cc "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["~-1@16:3-16:13"], @@ -294,6 +304,7 @@ OUTPUT: make_functions.cc "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["~-1@17:3-17:14"], diff --git a/tests/declaration_vs_definition/func.cc b/tests/declaration_vs_definition/func.cc index 3b86c161..df29ceb5 100644 --- a/tests/declaration_vs_definition/func.cc +++ b/tests/declaration_vs_definition/func.cc @@ -35,6 +35,7 @@ OUTPUT: }], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-3:14", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/declaration_vs_definition/func_associated_function_params.cc b/tests/declaration_vs_definition/func_associated_function_params.cc index 7a4bdfde..c352be3e 100644 --- a/tests/declaration_vs_definition/func_associated_function_params.cc +++ b/tests/declaration_vs_definition/func_associated_function_params.cc @@ -35,6 +35,7 @@ OUTPUT: }], "definition_spelling": "5:5-5:8", "definition_extent": "5:1-5:36", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/declaration_vs_definition/method.cc b/tests/declaration_vs_definition/method.cc index 7d94e5de..b7eed507 100644 --- a/tests/declaration_vs_definition/method.cc +++ b/tests/declaration_vs_definition/method.cc @@ -41,6 +41,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -59,6 +60,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -79,6 +81,7 @@ OUTPUT: "definition_spelling": "7:11-7:14", "definition_extent": "7:1-7:19", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/function_declaration.cc b/tests/function_declaration.cc index 6ceb48a9..c07a6c14 100644 --- a/tests/function_declaration.cc +++ b/tests/function_declaration.cc @@ -19,6 +19,7 @@ OUTPUT: "content": "void foo(int a, int b)", "param_spellings": ["1:14-1:15", "1:21-1:22"] }], + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/function_declaration_definition.cc b/tests/function_declaration_definition.cc index 3239e6dd..0bf3ddce 100644 --- a/tests/function_declaration_definition.cc +++ b/tests/function_declaration_definition.cc @@ -23,6 +23,7 @@ OUTPUT: }], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-3:14", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/function_definition.cc b/tests/function_definition.cc index f2468ff2..87af763b 100644 --- a/tests/function_definition.cc +++ b/tests/function_definition.cc @@ -16,6 +16,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-1:14", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/inheritance/function_override.cc b/tests/inheritance/function_override.cc index 3042b25b..7701369b 100644 --- a/tests/inheritance/function_override.cc +++ b/tests/inheritance/function_override.cc @@ -55,6 +55,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [1], "locals": [], "callers": [], @@ -70,7 +71,7 @@ OUTPUT: "definition_spelling": "5:8-5:11", "definition_extent": "5:3-5:25", "declaring_type": 1, - "base": 0, + "base": [0], "derived": [], "locals": [], "callers": [], diff --git a/tests/inheritance/interface_pure_virtual.cc b/tests/inheritance/interface_pure_virtual.cc index 05adf021..8977f8a5 100644 --- a/tests/inheritance/interface_pure_virtual.cc +++ b/tests/inheritance/interface_pure_virtual.cc @@ -34,6 +34,7 @@ OUTPUT: "definition_spelling": "2:16-2:19", "definition_extent": "2:3-2:28", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/inheritance/multiple_base_functions.cc b/tests/inheritance/multiple_base_functions.cc new file mode 100644 index 00000000..8a166beb --- /dev/null +++ b/tests/inheritance/multiple_base_functions.cc @@ -0,0 +1,113 @@ +struct Base0 { + virtual ~Base0() { } +}; +struct Base1 { + virtual ~Base1() { } +}; +struct Derived : Base0, Base1 { + ~Derived() override { } +}; + +/* +OUTPUT: +{ + "includes": [], + "skipped_by_preprocessor": [], + "types": [{ + "id": 0, + "usr": "c:@S@Base0", + "short_name": "Base0", + "detailed_name": "Base0", + "hover": "Base0", + "definition_spelling": "1:8-1:13", + "definition_extent": "1:1-3:2", + "parents": [], + "derived": [2], + "types": [], + "funcs": [0], + "vars": [], + "instances": [], + "uses": ["1:8-1:13", "2:12-2:17", "7:18-7:23"] + }, { + "id": 1, + "usr": "c:@S@Base1", + "short_name": "Base1", + "detailed_name": "Base1", + "hover": "Base1", + "definition_spelling": "4:8-4:13", + "definition_extent": "4:1-6:2", + "parents": [], + "derived": [2], + "types": [], + "funcs": [1], + "vars": [], + "instances": [], + "uses": ["4:8-4:13", "5:12-5:17", "7:25-7:30"] + }, { + "id": 2, + "usr": "c:@S@Derived", + "short_name": "Derived", + "detailed_name": "Derived", + "hover": "Derived", + "definition_spelling": "7:8-7:15", + "definition_extent": "7:1-9:2", + "parents": [0, 1], + "derived": [], + "types": [], + "funcs": [2], + "vars": [], + "instances": [], + "uses": ["7:8-7:15", "8:4-8:11"] + }], + "funcs": [{ + "id": 0, + "is_operator": false, + "usr": "c:@S@Base0@F@~Base0#", + "short_name": "~Base0", + "detailed_name": "void Base0::~Base0() noexcept", + "hover": "void Base0::~Base0() noexcept", + "declarations": [], + "definition_spelling": "2:11-2:17", + "definition_extent": "2:3-2:23", + "declaring_type": 0, + "base": [], + "derived": [2], + "locals": [], + "callers": [], + "callees": [] + }, { + "id": 1, + "is_operator": false, + "usr": "c:@S@Base1@F@~Base1#", + "short_name": "~Base1", + "detailed_name": "void Base1::~Base1() noexcept", + "hover": "void Base1::~Base1() noexcept", + "declarations": [], + "definition_spelling": "5:11-5:17", + "definition_extent": "5:3-5:23", + "declaring_type": 1, + "base": [], + "derived": [2], + "locals": [], + "callers": [], + "callees": [] + }, { + "id": 2, + "is_operator": false, + "usr": "c:@S@Derived@F@~Derived#", + "short_name": "~Derived", + "detailed_name": "void Derived::~Derived() noexcept", + "hover": "void Derived::~Derived() noexcept", + "declarations": [], + "definition_spelling": "8:3-8:11", + "definition_extent": "8:3-8:26", + "declaring_type": 2, + "base": [0, 1], + "derived": [], + "locals": [], + "callers": [], + "callees": [] + }], + "vars": [] +} +*/ \ No newline at end of file diff --git a/tests/lambdas/lambda.cc b/tests/lambdas/lambda.cc index 8485c7ab..cb3c2be4 100644 --- a/tests/lambdas/lambda.cc +++ b/tests/lambdas/lambda.cc @@ -40,6 +40,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-12:2", + "base": [], "derived": [], "locals": [], "callers": [], @@ -52,6 +53,7 @@ OUTPUT: "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["0@9:14-9:15", "0@10:14-10:15", "0@11:14-11:15"], diff --git a/tests/macros/complex.cc b/tests/macros/complex.cc index 0fa537ba..04e125d6 100644 --- a/tests/macros/complex.cc +++ b/tests/macros/complex.cc @@ -27,6 +27,7 @@ OUTPUT: "declarations": [], "definition_spelling": "6:5-6:10", "definition_extent": "6:1-8:2", + "base": [], "derived": [], "locals": [], "callers": ["1@12:5-12:10"], @@ -46,6 +47,7 @@ OUTPUT: }], "definition_spelling": "12:1-12:20", "definition_extent": "12:1-12:20", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/method_declaration.cc b/tests/method_declaration.cc index 6ea378ec..af71cdc9 100644 --- a/tests/method_declaration.cc +++ b/tests/method_declaration.cc @@ -41,6 +41,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/method_definition.cc b/tests/method_definition.cc index 3fbae1f2..170af79f 100644 --- a/tests/method_definition.cc +++ b/tests/method_definition.cc @@ -41,6 +41,7 @@ OUTPUT: "definition_spelling": "5:11-5:14", "definition_extent": "5:1-5:25", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/method_inline_declaration.cc b/tests/method_inline_declaration.cc index a0506534..5f793a28 100644 --- a/tests/method_inline_declaration.cc +++ b/tests/method_inline_declaration.cc @@ -34,6 +34,7 @@ OUTPUT: "definition_spelling": "2:8-2:11", "definition_extent": "2:3-2:16", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/multi_file/impl.cc b/tests/multi_file/impl.cc index fb030f79..7d7f0185 100644 --- a/tests/multi_file/impl.cc +++ b/tests/multi_file/impl.cc @@ -96,6 +96,7 @@ OUTPUT: header.h "declarations": [], "definition_spelling": "10:6-10:10", "definition_extent": "10:1-10:15", + "base": [], "derived": [], "locals": [], "callers": [], @@ -182,6 +183,7 @@ OUTPUT: impl.cc "declarations": [], "definition_spelling": "3:6-3:10", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], @@ -194,6 +196,7 @@ OUTPUT: impl.cc "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["0@4:3-4:7"], diff --git a/tests/multi_file/simple_impl.cc b/tests/multi_file/simple_impl.cc index bae099ba..3e5a40bf 100644 --- a/tests/multi_file/simple_impl.cc +++ b/tests/multi_file/simple_impl.cc @@ -23,6 +23,7 @@ OUTPUT: simple_header.h "content": "void header()", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": [], @@ -48,6 +49,7 @@ OUTPUT: simple_impl.cc "declarations": [], "definition_spelling": "3:6-3:10", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], @@ -60,6 +62,7 @@ OUTPUT: simple_impl.cc "detailed_name": "", "hover": "", "declarations": [], + "base": [], "derived": [], "locals": [], "callers": ["0@4:3-4:9"], diff --git a/tests/multi_file/static.cc b/tests/multi_file/static.cc index 51a878a8..18cec1c4 100644 --- a/tests/multi_file/static.cc +++ b/tests/multi_file/static.cc @@ -37,6 +37,7 @@ OUTPUT: static.h "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -76,6 +77,7 @@ OUTPUT: static.cc "definition_spelling": "3:14-3:32", "definition_extent": "3:1-3:37", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/anonymous_function.cc b/tests/namespaces/anonymous_function.cc index 9c2f6547..711401e8 100644 --- a/tests/namespaces/anonymous_function.cc +++ b/tests/namespaces/anonymous_function.cc @@ -21,6 +21,7 @@ OUTPUT: "content": "void foo()", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/function_declaration.cc b/tests/namespaces/function_declaration.cc index a7dec976..25f36ff1 100644 --- a/tests/namespaces/function_declaration.cc +++ b/tests/namespaces/function_declaration.cc @@ -21,6 +21,7 @@ OUTPUT: "content": "void foo(int a, int b)", "param_spellings": ["2:14-2:15", "2:21-2:22"] }], + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/function_definition.cc b/tests/namespaces/function_definition.cc index ba50912a..75a93408 100644 --- a/tests/namespaces/function_definition.cc +++ b/tests/namespaces/function_definition.cc @@ -18,6 +18,7 @@ OUTPUT: "declarations": [], "definition_spelling": "2:6-2:9", "definition_extent": "2:1-2:14", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/method_declaration.cc b/tests/namespaces/method_declaration.cc index 9299fe21..0a871ae4 100644 --- a/tests/namespaces/method_declaration.cc +++ b/tests/namespaces/method_declaration.cc @@ -39,6 +39,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/method_definition.cc b/tests/namespaces/method_definition.cc index 285820d6..0c8aca48 100644 --- a/tests/namespaces/method_definition.cc +++ b/tests/namespaces/method_definition.cc @@ -43,6 +43,7 @@ OUTPUT: "definition_spelling": "6:11-6:14", "definition_extent": "6:1-6:19", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/method_inline_declaration.cc b/tests/namespaces/method_inline_declaration.cc index 591cb102..a97ea173 100644 --- a/tests/namespaces/method_inline_declaration.cc +++ b/tests/namespaces/method_inline_declaration.cc @@ -36,6 +36,7 @@ OUTPUT: "definition_spelling": "3:8-3:11", "definition_extent": "3:3-3:16", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/namespace_alias.cc b/tests/namespaces/namespace_alias.cc index d82c95ee..4b235b9a 100644 --- a/tests/namespaces/namespace_alias.cc +++ b/tests/namespaces/namespace_alias.cc @@ -29,6 +29,7 @@ OUTPUT: "declarations": [], "definition_spelling": "11:6-11:9", "definition_extent": "11:1-14:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/namespaces/namespace_reference.cc b/tests/namespaces/namespace_reference.cc index 3bb31603..a7fd736b 100644 --- a/tests/namespaces/namespace_reference.cc +++ b/tests/namespaces/namespace_reference.cc @@ -25,6 +25,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:8-3:14", "definition_extent": "3:3-3:24", + "base": [], "derived": [], "locals": [], "callers": ["1@7:7-7:13", "1@9:3-9:9"], @@ -39,6 +40,7 @@ OUTPUT: "declarations": [], "definition_spelling": "6:6-6:12", "definition_extent": "6:1-10:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/objective-c/class.m b/tests/objective-c/class.m index eff3a509..252179c3 100644 --- a/tests/objective-c/class.m +++ b/tests/objective-c/class.m @@ -49,6 +49,7 @@ OUTPUT: "content": "+ (void)test;", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": [], @@ -68,6 +69,7 @@ OUTPUT: }], "definition_spelling": "8:9-8:25", "definition_extent": "8:1-8:28", + "base": [], "derived": [], "locals": [], "callers": ["4@14:13-14:29"], @@ -85,6 +87,7 @@ OUTPUT: "content": "aProp", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": [], @@ -102,6 +105,7 @@ OUTPUT: "content": "aProp", "param_spellings": ["4:29-4:34"] }], + "base": [], "derived": [], "locals": [], "callers": ["4@0:0-0:0"], @@ -116,6 +120,7 @@ OUTPUT: "declarations": [], "definition_spelling": "11:5-11:9", "definition_extent": "11:1-16:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/operators/operator.cc b/tests/operators/operator.cc index 18a56168..9c282299 100644 --- a/tests/operators/operator.cc +++ b/tests/operators/operator.cc @@ -38,6 +38,7 @@ OUTPUT: "definition_spelling": "2:8-2:18", "definition_extent": "2:3-2:27", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -56,6 +57,7 @@ OUTPUT: "param_spellings": ["3:23-3:23"] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -74,6 +76,7 @@ OUTPUT: "param_spellings": ["4:22-4:23", "4:29-4:30"] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], @@ -91,6 +94,7 @@ OUTPUT: "content": "friend Foo &operator += (const Foo&, const Type&)", "param_spellings": ["7:36-7:36", "7:49-7:49"] }], + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/outline/outline2.cc b/tests/outline/outline2.cc index 6f1522b0..d185c44d 100644 --- a/tests/outline/outline2.cc +++ b/tests/outline/outline2.cc @@ -77,6 +77,7 @@ OUTPUT: "content": "std::vector LoadCompilationEntriesFromDirectory(const std::string& project_directory)", "param_spellings": ["12:86-12:103"] }], + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/outline/static_function_in_type.cc b/tests/outline/static_function_in_type.cc index 03cfb0db..06a8c7de 100644 --- a/tests/outline/static_function_in_type.cc +++ b/tests/outline/static_function_in_type.cc @@ -54,6 +54,7 @@ OUTPUT: static_function_in_type.h "param_spellings": ["6:32-6:32"] }], "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -106,6 +107,7 @@ OUTPUT: static_function_in_type.cc "definition_spelling": "5:11-5:19", "definition_extent": "5:1-6:2", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/templates/func_specialized_template_param.cc b/tests/templates/func_specialized_template_param.cc index 6365de8c..0affb4c5 100644 --- a/tests/templates/func_specialized_template_param.cc +++ b/tests/templates/func_specialized_template_param.cc @@ -59,6 +59,7 @@ OUTPUT: "definition_spelling": "8:11-8:14", "definition_extent": "8:1-8:36", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], 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 1661b641..a8668adf 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 @@ -43,6 +43,7 @@ OUTPUT: "definition_spelling": "5:16-5:19", "definition_extent": "5:5-7:6", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["-1@10:21-10:24", "-1@11:22-11:25"], diff --git a/tests/templates/specialized_func_definition.cc b/tests/templates/specialized_func_definition.cc index 2298f35d..6b3b4255 100644 --- a/tests/templates/specialized_func_definition.cc +++ b/tests/templates/specialized_func_definition.cc @@ -54,6 +54,7 @@ OUTPUT: "definition_spelling": "7:19-7:22", "definition_extent": "6:1-7:24", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], 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 4074a0e2..6ad87bdc 100644 --- a/tests/templates/template_class_func_usage_folded_into_one.cc +++ b/tests/templates/template_class_func_usage_folded_into_one.cc @@ -40,6 +40,7 @@ OUTPUT: "definition_spelling": "3:14-3:17", "definition_extent": "3:3-5:4", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["-1@8:19-8:22", "-1@9:20-9:23"], 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 54435105..59260e3c 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 @@ -41,6 +41,7 @@ OUTPUT: "definition_spelling": "4:14-4:17", "definition_extent": "4:3-6:4", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["-1@9:19-9:22", "-1@10:20-10:23"], diff --git a/tests/templates/template_func_usage_folded_into_one.cc b/tests/templates/template_func_usage_folded_into_one.cc index 9b23bcc4..3c4b3653 100644 --- a/tests/templates/template_func_usage_folded_into_one.cc +++ b/tests/templates/template_func_usage_folded_into_one.cc @@ -25,6 +25,7 @@ OUTPUT: "declarations": [], "definition_spelling": "2:12-2:15", "definition_extent": "2:1-4:2", + "base": [], "derived": [], "locals": [], "callers": ["-1@6:9-6:12", "-1@7:9-7:12"], diff --git a/tests/types/typedefs.cc b/tests/types/typedefs.cc index 8b335541..56472d50 100644 --- a/tests/types/typedefs.cc +++ b/tests/types/typedefs.cc @@ -35,6 +35,7 @@ OUTPUT: "content": "static func g", "param_spellings": ["2:13-2:13", "2:13-2:13"] }], + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/unions/union_usage.cc b/tests/unions/union_usage.cc index bf2c8eb2..b7648e25 100644 --- a/tests/unions/union_usage.cc +++ b/tests/unions/union_usage.cc @@ -42,6 +42,7 @@ OUTPUT: "declarations": [], "definition_spelling": "8:6-8:9", "definition_extent": "8:1-10:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_called_from_constructor.cc b/tests/usage/func_called_from_constructor.cc index c9623587..32817e32 100644 --- a/tests/usage/func_called_from_constructor.cc +++ b/tests/usage/func_called_from_constructor.cc @@ -39,6 +39,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:12", "definition_extent": "1:1-1:17", + "base": [], "derived": [], "locals": [], "callers": ["1@8:3-8:9"], @@ -59,6 +60,7 @@ OUTPUT: "definition_spelling": "7:6-7:9", "definition_extent": "7:1-9:2", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_called_from_macro_argument.cc b/tests/usage/func_called_from_macro_argument.cc index 39c12500..a3833bbf 100644 --- a/tests/usage/func_called_from_macro_argument.cc +++ b/tests/usage/func_called_from_macro_argument.cc @@ -25,6 +25,7 @@ OUTPUT: "content": "bool called(bool a, bool b)", "param_spellings": ["3:18-3:19", "3:26-3:27"] }], + "base": [], "derived": [], "locals": [], "callers": ["1@6:14-6:20"], @@ -39,6 +40,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:12", "definition_extent": "5:1-7:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_called_from_template.cc b/tests/usage/func_called_from_template.cc index 810718b5..b1cb4066 100644 --- a/tests/usage/func_called_from_template.cc +++ b/tests/usage/func_called_from_template.cc @@ -30,6 +30,7 @@ OUTPUT: "content": "void called()", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": ["1@5:3-5:9"], @@ -44,6 +45,7 @@ OUTPUT: "declarations": [], "definition_spelling": "4:6-4:12", "definition_extent": "4:1-6:2", + "base": [], "derived": [], "locals": [], "callers": ["2@9:3-9:9"], @@ -58,6 +60,7 @@ OUTPUT: "declarations": [], "definition_spelling": "8:6-8:9", "definition_extent": "8:1-10:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_called_implicit_ctor.cc b/tests/usage/func_called_implicit_ctor.cc index 4275ee53..1d315753 100644 --- a/tests/usage/func_called_implicit_ctor.cc +++ b/tests/usage/func_called_implicit_ctor.cc @@ -43,6 +43,7 @@ OUTPUT: "param_spellings": ["2:15-2:16"] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["~2@8:10-8:16"], @@ -57,6 +58,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:5-5:11", "definition_extent": "5:1-5:27", + "base": [], "derived": [], "locals": [], "callers": ["2@8:10-8:16"], @@ -71,6 +73,7 @@ OUTPUT: "declarations": [], "definition_spelling": "7:9-7:15", "definition_extent": "7:1-9:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_addr_func.cc b/tests/usage/func_usage_addr_func.cc index 31c7bc9a..476dafd8 100644 --- a/tests/usage/func_usage_addr_func.cc +++ b/tests/usage/func_usage_addr_func.cc @@ -23,6 +23,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:13", "definition_extent": "1:1-1:23", + "base": [], "derived": [], "locals": [], "callers": ["2@7:3-7:10"], @@ -37,6 +38,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:10", "definition_extent": "3:1-3:15", + "base": [], "derived": [], "locals": [], "callers": ["2@6:13-6:17", "2@7:12-7:16"], @@ -51,6 +53,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_addr_method.cc b/tests/usage/func_usage_addr_method.cc index 09dc4d14..45cbbe3f 100644 --- a/tests/usage/func_usage_addr_method.cc +++ b/tests/usage/func_usage_addr_method.cc @@ -42,6 +42,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["1@6:18-6:22"], @@ -56,6 +57,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-7:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_call_func.cc b/tests/usage/func_usage_call_func.cc index fbaee40e..43bcf698 100644 --- a/tests/usage/func_usage_call_func.cc +++ b/tests/usage/func_usage_call_func.cc @@ -19,6 +19,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:12", "definition_extent": "1:1-1:17", + "base": [], "derived": [], "locals": [], "callers": ["1@3:3-3:9"], @@ -33,6 +34,7 @@ OUTPUT: "declarations": [], "definition_spelling": "2:6-2:12", "definition_extent": "2:1-4:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_call_method.cc b/tests/usage/func_usage_call_method.cc index 0c39e9c3..3ec86f4d 100644 --- a/tests/usage/func_usage_call_method.cc +++ b/tests/usage/func_usage_call_method.cc @@ -42,6 +42,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["1@7:6-7:10"], @@ -56,6 +57,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:10", "definition_extent": "5:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_class_inline_var_def.cc b/tests/usage/func_usage_class_inline_var_def.cc index a932e131..88d94541 100644 --- a/tests/usage/func_usage_class_inline_var_def.cc +++ b/tests/usage/func_usage_class_inline_var_def.cc @@ -37,6 +37,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:12-1:18", "definition_extent": "1:1-3:2", + "base": [], "derived": [], "locals": [], "callers": ["-1@6:11-6:17"], diff --git a/tests/usage/func_usage_forward_decl_func.cc b/tests/usage/func_usage_forward_decl_func.cc index 8a1370dc..60c01f46 100644 --- a/tests/usage/func_usage_forward_decl_func.cc +++ b/tests/usage/func_usage_forward_decl_func.cc @@ -22,6 +22,7 @@ OUTPUT: "content": "void foo()", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": ["1@4:3-4:6"], @@ -36,6 +37,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:11", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_forward_decl_method.cc b/tests/usage/func_usage_forward_decl_method.cc index 62207b2f..85867949 100644 --- a/tests/usage/func_usage_forward_decl_method.cc +++ b/tests/usage/func_usage_forward_decl_method.cc @@ -41,6 +41,7 @@ OUTPUT: "param_spellings": [] }], "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": ["1@7:6-7:9"], @@ -55,6 +56,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:11", "definition_extent": "5:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/func_usage_template_func.cc b/tests/usage/func_usage_template_func.cc index dc089213..c32a2a3f 100644 --- a/tests/usage/func_usage_template_func.cc +++ b/tests/usage/func_usage_template_func.cc @@ -25,6 +25,7 @@ OUTPUT: "content": "void accept(T)", "param_spellings": ["2:14-2:14"] }], + "base": [], "derived": [], "locals": [], "callers": ["1@5:3-5:9", "1@6:3-6:9"], @@ -39,6 +40,7 @@ OUTPUT: "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-7:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_as_template_parameter.cc b/tests/usage/type_usage_as_template_parameter.cc index 3b5c0b6d..8439b267 100644 --- a/tests/usage/type_usage_as_template_parameter.cc +++ b/tests/usage/type_usage_as_template_parameter.cc @@ -54,6 +54,7 @@ OUTPUT: "declarations": [], "definition_spelling": "9:16-9:27", "definition_extent": "9:1-12:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_as_template_parameter_complex.cc b/tests/usage/type_usage_as_template_parameter_complex.cc index e19e72b2..6a7affbf 100644 --- a/tests/usage/type_usage_as_template_parameter_complex.cc +++ b/tests/usage/type_usage_as_template_parameter_complex.cc @@ -148,6 +148,7 @@ OUTPUT: "declarations": [], "definition_spelling": "33:37-33:51", "definition_extent": "33:1-33:92", + "base": [], "derived": [], "locals": [], "callers": [], @@ -162,6 +163,7 @@ OUTPUT: "declarations": [], "definition_spelling": "40:6-40:20", "definition_extent": "40:1-40:28", + "base": [], "derived": [], "locals": [], "callers": [], @@ -176,6 +178,7 @@ OUTPUT: "declarations": [], "definition_spelling": "53:6-53:11", "definition_extent": "53:1-55:2", + "base": [], "derived": [], "locals": [], "callers": [], @@ -196,6 +199,7 @@ OUTPUT: "definition_spelling": "79:26-79:29", "definition_extent": "79:1-79:51", "declaring_type": 3, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_declare_local.cc b/tests/usage/type_usage_declare_local.cc index 6b063343..223cabf0 100644 --- a/tests/usage/type_usage_declare_local.cc +++ b/tests/usage/type_usage_declare_local.cc @@ -50,6 +50,7 @@ OUTPUT: "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-7:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_declare_param.cc b/tests/usage/type_usage_declare_param.cc index d8162832..8f843829 100644 --- a/tests/usage/type_usage_declare_param.cc +++ b/tests/usage/type_usage_declare_param.cc @@ -47,6 +47,7 @@ OUTPUT: "declarations": [], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-4:47", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_declare_param_prototype.cc b/tests/usage/type_usage_declare_param_prototype.cc index 5db4d0e4..cf3a7a44 100644 --- a/tests/usage/type_usage_declare_param_prototype.cc +++ b/tests/usage/type_usage_declare_param_prototype.cc @@ -42,6 +42,7 @@ OUTPUT: }], "definition_spelling": "4:6-4:9", "definition_extent": "4:1-4:26", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_declare_param_unnamed.cc b/tests/usage/type_usage_declare_param_unnamed.cc index ef534aba..a4fb5a21 100644 --- a/tests/usage/type_usage_declare_param_unnamed.cc +++ b/tests/usage/type_usage_declare_param_unnamed.cc @@ -29,6 +29,7 @@ OUTPUT: "declarations": [], "definition_spelling": "2:6-2:9", "definition_extent": "2:1-2:26", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_declare_qualifiers.cc b/tests/usage/type_usage_declare_qualifiers.cc index a71adda5..6e56fb90 100644 --- a/tests/usage/type_usage_declare_qualifiers.cc +++ b/tests/usage/type_usage_declare_qualifiers.cc @@ -37,6 +37,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_on_return_type.cc b/tests/usage/type_usage_on_return_type.cc index 639fbe5a..31b39193 100644 --- a/tests/usage/type_usage_on_return_type.cc +++ b/tests/usage/type_usage_on_return_type.cc @@ -71,6 +71,7 @@ OUTPUT: }], "definition_spelling": "5:7-5:10", "definition_extent": "5:1-5:15", + "base": [], "derived": [], "locals": [], "callers": [], @@ -91,6 +92,7 @@ OUTPUT: "definition_spelling": "12:12-12:15", "definition_extent": "12:1-12:23", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -111,6 +113,7 @@ OUTPUT: "definition_spelling": "13:11-13:16", "definition_extent": "13:1-13:21", "declaring_type": 1, + "base": [], "derived": [], "locals": [], "callers": [], @@ -128,6 +131,7 @@ OUTPUT: "content": "extern const Type& external()", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": [], @@ -147,6 +151,7 @@ OUTPUT: }], "definition_spelling": "18:14-18:17", "definition_extent": "18:1-18:22", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_typedef_and_using.cc b/tests/usage/type_usage_typedef_and_using.cc index 59497366..f175429d 100644 --- a/tests/usage/type_usage_typedef_and_using.cc +++ b/tests/usage/type_usage_typedef_and_using.cc @@ -101,6 +101,7 @@ OUTPUT: "declarations": [], "definition_spelling": "7:6-7:12", "definition_extent": "7:1-7:21", + "base": [], "derived": [], "locals": [], "callers": [], @@ -115,6 +116,7 @@ OUTPUT: "declarations": [], "definition_spelling": "8:6-8:13", "definition_extent": "8:1-8:23", + "base": [], "derived": [], "locals": [], "callers": [], @@ -129,6 +131,7 @@ OUTPUT: "declarations": [], "definition_spelling": "9:6-9:13", "definition_extent": "9:1-9:23", + "base": [], "derived": [], "locals": [], "callers": [], @@ -143,6 +146,7 @@ OUTPUT: "declarations": [], "definition_spelling": "10:6-10:13", "definition_extent": "10:1-10:23", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/type_usage_various.cc b/tests/usage/type_usage_various.cc index 78d65319..581dc8f0 100644 --- a/tests/usage/type_usage_various.cc +++ b/tests/usage/type_usage_various.cc @@ -46,6 +46,7 @@ OUTPUT: "definition_spelling": "5:11-5:15", "definition_extent": "5:1-8:2", "declaring_type": 0, + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/usage_inside_of_call.cc b/tests/usage/usage_inside_of_call.cc index 720cde37..b2ee4bcb 100644 --- a/tests/usage/usage_inside_of_call.cc +++ b/tests/usage/usage_inside_of_call.cc @@ -48,6 +48,7 @@ OUTPUT: "content": "void called(int a)", "param_spellings": ["1:17-1:18"] }], + "base": [], "derived": [], "locals": [], "callers": ["2@14:3-14:9"], @@ -65,6 +66,7 @@ OUTPUT: "content": "int gen()", "param_spellings": [] }], + "base": [], "derived": [], "locals": [], "callers": ["2@14:14-14:17"], @@ -79,6 +81,7 @@ OUTPUT: "declarations": [], "definition_spelling": "12:6-12:9", "definition_extent": "12:1-15:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/usage_inside_of_call_simple.cc b/tests/usage/usage_inside_of_call_simple.cc index f297bdb5..5debfbea 100644 --- a/tests/usage/usage_inside_of_call_simple.cc +++ b/tests/usage/usage_inside_of_call_simple.cc @@ -25,6 +25,7 @@ OUTPUT: "content": "void called(int a)", "param_spellings": ["1:17-1:18"] }], + "base": [], "derived": [], "locals": [], "callers": ["2@6:3-6:9"], @@ -39,6 +40,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:5-3:8", "definition_extent": "3:1-3:24", + "base": [], "derived": [], "locals": [], "callers": ["2@6:10-6:13", "2@6:18-6:21"], @@ -53,6 +55,7 @@ OUTPUT: "declarations": [], "definition_spelling": "5:6-5:9", "definition_extent": "5:1-7:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_call_function.cc b/tests/usage/var_usage_call_function.cc index 7cf01295..e0f3e320 100644 --- a/tests/usage/var_usage_call_function.cc +++ b/tests/usage/var_usage_call_function.cc @@ -23,6 +23,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:12", "definition_extent": "1:1-1:17", + "base": [], "derived": [], "locals": [], "callers": ["1@4:13-4:19", "1@7:3-7:9"], @@ -37,6 +38,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:12", "definition_extent": "3:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_class_member.cc b/tests/usage/var_usage_class_member.cc index e9c3f15d..614e7f07 100644 --- a/tests/usage/var_usage_class_member.cc +++ b/tests/usage/var_usage_class_member.cc @@ -51,6 +51,7 @@ OUTPUT: "content": "void accept(int)", "param_spellings": ["7:16-7:16"] }], + "base": [], "derived": [], "locals": [], "callers": ["2@14:3-14:9", "2@15:3-15:9", "2@17:3-17:9"], @@ -68,6 +69,7 @@ OUTPUT: "content": "void accept(int*)", "param_spellings": ["8:17-8:17"] }], + "base": [], "derived": [], "locals": [], "callers": ["2@16:3-16:9"], @@ -82,6 +84,7 @@ OUTPUT: "declarations": [], "definition_spelling": "10:6-10:9", "definition_extent": "10:1-18:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_class_member_static.cc b/tests/usage/var_usage_class_member_static.cc index b34d9a9b..26b46295 100644 --- a/tests/usage/var_usage_class_member_static.cc +++ b/tests/usage/var_usage_class_member_static.cc @@ -42,6 +42,7 @@ OUTPUT: "content": "void accept(int)", "param_spellings": ["5:16-5:16"] }], + "base": [], "derived": [], "locals": [], "callers": ["1@8:3-8:9"], @@ -56,6 +57,7 @@ OUTPUT: "declarations": [], "definition_spelling": "7:6-7:9", "definition_extent": "7:1-9:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_extern.cc b/tests/usage/var_usage_extern.cc index f8bece52..e6786a46 100644 --- a/tests/usage/var_usage_extern.cc +++ b/tests/usage/var_usage_extern.cc @@ -19,6 +19,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_func_parameter.cc b/tests/usage/var_usage_func_parameter.cc index 3a9e60e9..05a90855 100644 --- a/tests/usage/var_usage_func_parameter.cc +++ b/tests/usage/var_usage_func_parameter.cc @@ -17,6 +17,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-3:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_local.cc b/tests/usage/var_usage_local.cc index 9419cdca..80c7731a 100644 --- a/tests/usage/var_usage_local.cc +++ b/tests/usage/var_usage_local.cc @@ -18,6 +18,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-4:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_shadowed_local.cc b/tests/usage/var_usage_shadowed_local.cc index f956630e..7a616593 100644 --- a/tests/usage/var_usage_shadowed_local.cc +++ b/tests/usage/var_usage_shadowed_local.cc @@ -23,6 +23,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-9:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_shadowed_parameter.cc b/tests/usage/var_usage_shadowed_parameter.cc index ccdaa99a..27c3677d 100644 --- a/tests/usage/var_usage_shadowed_parameter.cc +++ b/tests/usage/var_usage_shadowed_parameter.cc @@ -23,6 +23,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-8:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/usage/var_usage_static.cc b/tests/usage/var_usage_static.cc index 444774dd..4665bc97 100644 --- a/tests/usage/var_usage_static.cc +++ b/tests/usage/var_usage_static.cc @@ -20,6 +20,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/deduce_auto_type.cc b/tests/vars/deduce_auto_type.cc index a6f7be1d..38e18e2b 100644 --- a/tests/vars/deduce_auto_type.cc +++ b/tests/vars/deduce_auto_type.cc @@ -35,6 +35,7 @@ OUTPUT: "declarations": [], "definition_spelling": "2:6-2:7", "definition_extent": "2:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/function_local.cc b/tests/vars/function_local.cc index 07e4eb6a..c4cb02dc 100644 --- a/tests/vars/function_local.cc +++ b/tests/vars/function_local.cc @@ -33,6 +33,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/function_param.cc b/tests/vars/function_param.cc index 0555839e..3b50c8cc 100644 --- a/tests/vars/function_param.cc +++ b/tests/vars/function_param.cc @@ -31,6 +31,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-3:30", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/function_param_unnamed.cc b/tests/vars/function_param_unnamed.cc index 92dd44a8..16c6b3a7 100644 --- a/tests/vars/function_param_unnamed.cc +++ b/tests/vars/function_param_unnamed.cc @@ -15,6 +15,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-1:22", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/function_shadow_local.cc b/tests/vars/function_shadow_local.cc index 87ef8f79..c6449a19 100644 --- a/tests/vars/function_shadow_local.cc +++ b/tests/vars/function_shadow_local.cc @@ -23,6 +23,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-9:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/function_shadow_param.cc b/tests/vars/function_shadow_param.cc index f794964f..773b3054 100644 --- a/tests/vars/function_shadow_param.cc +++ b/tests/vars/function_shadow_param.cc @@ -17,6 +17,7 @@ OUTPUT: "declarations": [], "definition_spelling": "1:6-1:9", "definition_extent": "1:1-3:2", + "base": [], "derived": [], "locals": [], "callers": [], diff --git a/tests/vars/type_instance_on_using_type.cc b/tests/vars/type_instance_on_using_type.cc index f039fd21..3a96ebc2 100644 --- a/tests/vars/type_instance_on_using_type.cc +++ b/tests/vars/type_instance_on_using_type.cc @@ -53,6 +53,7 @@ OUTPUT: "declarations": [], "definition_spelling": "3:6-3:9", "definition_extent": "3:1-5:2", + "base": [], "derived": [], "locals": [], "callers": [],