From cb7ccbe54318f91e0e39c177da6fb4477e300ac6 Mon Sep 17 00:00:00 2001 From: scturtle Date: Sun, 24 Dec 2017 08:49:11 +0800 Subject: [PATCH] Change var.def.is_* to enum. --- src/indexer.cc | 23 ++++++------- src/indexer.h | 33 +++++++++++-------- src/message_handler.cc | 10 ++++-- src/messages/text_document_code_lens.cc | 4 +-- src/query.cc | 7 ++-- src/serializer.cc | 5 +-- tests/constructors/constructor.cc | 10 ++---- tests/constructors/destructor.cc | 5 +-- tests/constructors/implicit_constructor.cc | 10 ++---- tests/constructors/make_functions.cc | 10 ++---- .../declaration_vs_definition/class_member.cc | 5 +-- .../class_member_static.cc | 5 +-- .../func_associated_function_params.cc | 10 ++---- tests/enums/enum_class_decl.cc | 10 ++---- tests/enums/enum_decl.cc | 10 ++---- tests/enums/enum_inherit.cc | 10 ++---- tests/enums/enum_usage.cc | 15 ++------- tests/foobar.cc | 10 ++---- tests/lambdas/lambda.cc | 15 ++------- tests/macros/complex.cc | 10 ++---- tests/macros/foo.cc | 15 ++------- tests/multi_file/funky_enum.cc | 15 ++------- tests/multi_file/impl.cc | 25 +++----------- tests/namespaces/namespace_alias.cc | 15 ++------- tests/namespaces/namespace_reference.cc | 10 ++---- tests/objective-c/class.m | 15 ++------- tests/outline/outline.cc | 15 ++------- tests/outline/outline2.cc | 15 ++------- tests/outline/static_function_in_type.cc | 5 +-- tests/preprocessor/include_guard.cc | 5 +-- .../implicit_variable_instantiation.cc | 15 ++------- ...ass_template_func_usage_folded_into_one.cc | 10 ++---- ...ace_template_type_usage_folded_into_one.cc | 10 ++---- ...mplate_class_func_usage_folded_into_one.cc | 10 ++---- ...ass_template_func_usage_folded_into_one.cc | 10 ++---- ...mplate_class_type_usage_folded_into_one.cc | 10 ++---- ...emplate_class_var_usage_folded_into_one.cc | 15 ++------- .../template_func_usage_folded_into_one.cc | 10 ++---- .../template_type_usage_folded_into_one.cc | 10 ++---- .../template_var_usage_folded_into_one.cc | 15 ++------- tests/types/anonymous_struct.cc | 20 +++-------- tests/unions/union_decl.cc | 10 ++---- tests/unions/union_usage.cc | 15 ++------- .../usage/func_called_from_macro_argument.cc | 5 +-- tests/usage/func_usage_addr_func.cc | 5 +-- tests/usage/func_usage_addr_method.cc | 5 +-- tests/usage/func_usage_call_method.cc | 5 +-- .../usage/func_usage_class_inline_var_def.cc | 5 +-- tests/usage/func_usage_forward_decl_method.cc | 5 +-- .../usage/type_usage_as_template_parameter.cc | 15 ++------- ...ype_usage_as_template_parameter_complex.cc | 10 ++---- ...type_usage_as_template_parameter_simple.cc | 5 +-- tests/usage/type_usage_declare_extern.cc | 5 +-- tests/usage/type_usage_declare_field.cc | 10 ++---- tests/usage/type_usage_declare_local.cc | 10 ++---- tests/usage/type_usage_declare_param.cc | 10 ++---- .../type_usage_declare_param_prototype.cc | 5 +-- tests/usage/type_usage_declare_qualifiers.cc | 30 ++++------------- tests/usage/type_usage_declare_static.cc | 5 +-- tests/usage/type_usage_various.cc | 10 ++---- tests/usage/usage_inside_of_call.cc | 15 ++------- tests/usage/var_usage_call_function.cc | 5 +-- tests/usage/var_usage_class_member.cc | 15 ++------- tests/usage/var_usage_class_member_static.cc | 5 +-- tests/usage/var_usage_cstyle_cast.cc | 5 +-- tests/usage/var_usage_extern.cc | 5 +-- tests/usage/var_usage_func_parameter.cc | 5 +-- tests/usage/var_usage_local.cc | 5 +-- tests/usage/var_usage_shadowed_local.cc | 10 ++---- tests/usage/var_usage_shadowed_parameter.cc | 10 ++---- tests/usage/var_usage_static.cc | 5 +-- tests/vars/class_member.cc | 5 +-- tests/vars/class_static_member.cc | 5 +-- tests/vars/class_static_member_decl_only.cc | 5 +-- tests/vars/deduce_auto_type.cc | 10 ++---- tests/vars/function_local.cc | 5 +-- tests/vars/function_param.cc | 10 ++---- tests/vars/function_shadow_local.cc | 10 ++---- tests/vars/function_shadow_param.cc | 10 ++---- tests/vars/global_variable.cc | 5 +-- tests/vars/global_variable_decl_only.cc | 5 +-- tests/vars/type_instance_on_using_type.cc | 5 +-- 82 files changed, 192 insertions(+), 625 deletions(-) diff --git a/src/indexer.cc b/src/indexer.cc index 628531c9..11c546af 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -951,8 +951,7 @@ ClangCursor::VisitResult VisitMacroDefinitionAndExpansions(ClangCursor cursor, 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.cls = VarClass::Macro; var_def->def.definition_spelling = decl_loc_spelling; var_def->def.definition_extent = Resolve(cx_extent, nullptr); } @@ -1059,13 +1058,16 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { bool is_system = clang_Location_isInSystemHeader( clang_indexLoc_getCXSourceLocation(decl->loc)); - var->def.is_global = - !is_system && IsGlobalContainer(decl->semanticContainer); - var->def.is_member = - !is_system && IsTypeDefinition(decl->semanticContainer); - var->def.is_local = - !is_system && !var->def.is_global && !var->def.is_member; - + if (is_system) + var->def.cls = VarClass::Unknown; + else { + if (IsGlobalContainer(decl->semanticContainer)) + var->def.cls = VarClass::Global; + else if (IsTypeDefinition(decl->semanticContainer)) + var->def.cls = VarClass::Member; + else + var->def.cls = VarClass::Local; + } //} if (decl->isDefinition) { @@ -1491,8 +1493,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.is_local = false; - var->def.is_member = true; + var->def.cls = VarClass::Member; UniqueAdd(var->uses, ResolveSpelling(referenced.cx_cursor)); AddDeclInitializerUsages(db, referenced.cx_cursor); // TODO Use proper semantic_container and lexical_container. diff --git a/src/indexer.h b/src/indexer.h index 0c95632c..e65c9868 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -355,6 +355,20 @@ MAKE_REFLECT_STRUCT(IndexFunc::Declaration, content, param_spellings); +enum class VarClass { + // probably a variable in system headers + Unknown = 0, + // a parameter or function variable + Local = 1, + // a macro, ie, #define FOO + Macro = 2, + // a global variable + Global = 3, + // a member variable of struct/union/class/enum + Member = 4 +}; +MAKE_REFLECT_TYPE_PROXY(VarClass, std::underlying_type::type); + template struct VarDefDefinitionData { // General metadata. @@ -373,14 +387,10 @@ struct VarDefDefinitionData { // Type which declares this one. optional declaring_type; - // Is this a parameter or function variable? - bool is_local = false; - // Is this a macro, ie, #define FOO? - bool is_macro = false; - // Is this a global variable? - bool is_global = false; - // Is this a member variable of struct/union/class/enum? - bool is_member = false; + VarClass cls; + + bool is_local() const { return cls == VarClass::Local; } + bool is_macro() const { return cls == VarClass::Macro; } bool operator==( const VarDefDefinitionData& other) const { @@ -413,10 +423,7 @@ void Reflect(TVisitor& visitor, REFLECT_MEMBER(definition_extent); REFLECT_MEMBER(variable_type); REFLECT_MEMBER(declaring_type); - REFLECT_MEMBER(is_local); - REFLECT_MEMBER(is_macro); - REFLECT_MEMBER(is_global); - REFLECT_MEMBER(is_member); + REFLECT_MEMBER(cls); REFLECT_MEMBER_END(); } @@ -557,4 +564,4 @@ void IndexInit(); void ClangSanityCheck(); -std::string GetClangVersion(); \ No newline at end of file +std::string GetClangVersion(); diff --git a/src/message_handler.cc b/src/message_handler.cc index c67e2e27..ae748023 100644 --- a/src/message_handler.cc +++ b/src/message_handler.cc @@ -106,8 +106,14 @@ void EmitSemanticHighlighting(QueryDatabase* db, QueryVar* var = &db->vars[sym.idx.idx]; if (!var->def) continue; // applies to for loop - if (!var->def->is_local && !var->def->is_global && !var->def->is_member) - continue; // applies to for loop + switch (var->def->cls) { + case VarClass::Local: + case VarClass::Global: + case VarClass::Member: + break; + default: + continue; // applies to for loop + } is_type_member = var->def->declaring_type.has_value(); detailed_name = var->def->short_name; break; diff --git a/src/messages/text_document_code_lens.cc b/src/messages/text_document_code_lens.cc index 2983b27b..06f8c02b 100644 --- a/src/messages/text_document_code_lens.cc +++ b/src/messages/text_document_code_lens.cc @@ -236,13 +236,13 @@ struct TextDocumentCodeLensHandler if (!var.def) continue; - if (var.def->is_local && !config->codeLensOnLocalVariables) + if (var.def->is_local() && !config->codeLensOnLocalVariables) continue; bool force_display = true; // Do not show 0 refs on macro with no uses, as it is most likely // a header guard. - if (var.def->is_macro) + if (var.def->is_macro()) force_display = false; AddCodeLens("ref", "refs", &common, ref.loc.OffsetStartColumn(0), diff --git a/src/query.cc b/src/query.cc index a80aa308..12dd723b 100644 --- a/src/query.cc +++ b/src/query.cc @@ -69,10 +69,7 @@ optional ToQuery(const IdMap& id_map, const IndexVar::Def& var) { result.definition_extent = id_map.ToQuery(var.definition_extent); result.variable_type = id_map.ToQuery(var.variable_type); result.declaring_type = id_map.ToQuery(var.declaring_type); - result.is_local = var.is_local; - result.is_macro = var.is_macro; - result.is_global = var.is_global; - result.is_member = var.is_member; + result.cls = var.cls; return result; } @@ -828,7 +825,7 @@ void QueryDatabase::ImportOrUpdate( continue; existing.def = def.value; - if (!def.value.is_local) + if (!def.value.is_local()) UpdateDetailedNames(&existing.detailed_name_idx, SymbolKind::Var, it->second.id, def.value.detailed_name); } diff --git a/src/serializer.cc b/src/serializer.cc index d4c4cfdb..adbcd78a 100644 --- a/src/serializer.cc +++ b/src/serializer.cc @@ -147,10 +147,7 @@ void Reflect(TVisitor& visitor, IndexVar& value) { REFLECT_MEMBER2("definition_extent", value.def.definition_extent); REFLECT_MEMBER2("variable_type", value.def.variable_type); REFLECT_MEMBER2("declaring_type", value.def.declaring_type); - REFLECT_MEMBER2("is_local", value.def.is_local); - REFLECT_MEMBER2("is_macro", value.def.is_macro); - REFLECT_MEMBER2("is_global", value.def.is_global); - REFLECT_MEMBER2("is_member", value.def.is_member); + REFLECT_MEMBER2("cls", value.def.cls); REFLECT_MEMBER2("uses", value.uses); REFLECT_MEMBER_END(); } diff --git a/tests/constructors/constructor.cc b/tests/constructors/constructor.cc index c409042e..cee6bb7e 100644 --- a/tests/constructors/constructor.cc +++ b/tests/constructors/constructor.cc @@ -66,10 +66,7 @@ OUTPUT: "definition_spelling": "7:7-7:8", "definition_extent": "7:3-7:8", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["7:7-7:8"] }, { "id": 1, @@ -79,10 +76,7 @@ OUTPUT: "definition_spelling": "8:8-8:10", "definition_extent": "8:3-8:22", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["8:8-8:10"] }] } diff --git a/tests/constructors/destructor.cc b/tests/constructors/destructor.cc index 1220a970..7c939d85 100644 --- a/tests/constructors/destructor.cc +++ b/tests/constructors/destructor.cc @@ -86,10 +86,7 @@ OUTPUT: "definition_spelling": "8:7-8:8", "definition_extent": "8:3-8:8", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["8:7-8:8"] }] } diff --git a/tests/constructors/implicit_constructor.cc b/tests/constructors/implicit_constructor.cc index 66003391..a4daf3f6 100644 --- a/tests/constructors/implicit_constructor.cc +++ b/tests/constructors/implicit_constructor.cc @@ -65,10 +65,7 @@ OUTPUT: "definition_spelling": "6:8-6:12", "definition_extent": "6:3-6:12", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:8-6:12"] }, { "id": 1, @@ -78,10 +75,7 @@ OUTPUT: "definition_spelling": "7:8-7:12", "definition_extent": "7:3-7:21", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["7:8-7:12"] }] } diff --git a/tests/constructors/make_functions.cc b/tests/constructors/make_functions.cc index 37aff408..7aeb27f2 100644 --- a/tests/constructors/make_functions.cc +++ b/tests/constructors/make_functions.cc @@ -298,10 +298,7 @@ OUTPUT: make_functions.cc "detailed_name": "Args &&... args", "definition_spelling": "4:25-4:29", "definition_extent": "4:15-4:29", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:25-4:29"] }, { "id": 1, @@ -310,10 +307,7 @@ OUTPUT: make_functions.cc "detailed_name": "Args... args", "definition_spelling": "9:24-9:28", "definition_extent": "9:16-9:28", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["9:24-9:28"] }] } diff --git a/tests/declaration_vs_definition/class_member.cc b/tests/declaration_vs_definition/class_member.cc index 75b3b61d..007e38db 100644 --- a/tests/declaration_vs_definition/class_member.cc +++ b/tests/declaration_vs_definition/class_member.cc @@ -31,10 +31,7 @@ OUTPUT: "definition_spelling": "2:7-2:10", "definition_extent": "2:3-2:10", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:7-2:10"] }] } diff --git a/tests/declaration_vs_definition/class_member_static.cc b/tests/declaration_vs_definition/class_member_static.cc index a148eb40..03d29105 100644 --- a/tests/declaration_vs_definition/class_member_static.cc +++ b/tests/declaration_vs_definition/class_member_static.cc @@ -34,10 +34,7 @@ OUTPUT: "definition_spelling": "5:10-5:13", "definition_extent": "5:1-5:13", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:14-2:17", "5:10-5:13"] }] } diff --git a/tests/declaration_vs_definition/func_associated_function_params.cc b/tests/declaration_vs_definition/func_associated_function_params.cc index 7e151953..47dcdd93 100644 --- a/tests/declaration_vs_definition/func_associated_function_params.cc +++ b/tests/declaration_vs_definition/func_associated_function_params.cc @@ -47,10 +47,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "5:13-5:14", "definition_extent": "5:9-5:14", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:13-5:14"] }, { "id": 1, @@ -59,10 +56,7 @@ OUTPUT: "detailed_name": "int b", "definition_spelling": "5:20-5:21", "definition_extent": "5:16-5:21", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:20-5:21"] }] } diff --git a/tests/enums/enum_class_decl.cc b/tests/enums/enum_class_decl.cc index 55923746..f38d91dd 100644 --- a/tests/enums/enum_class_decl.cc +++ b/tests/enums/enum_class_decl.cc @@ -33,10 +33,7 @@ OUTPUT: "definition_extent": "2:3-2:4", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:3-2:4"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: "definition_extent": "3:3-3:9", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:3-3:4"] }] } diff --git a/tests/enums/enum_decl.cc b/tests/enums/enum_decl.cc index 718aec49..707b7ca5 100644 --- a/tests/enums/enum_decl.cc +++ b/tests/enums/enum_decl.cc @@ -33,10 +33,7 @@ OUTPUT: "definition_extent": "2:3-2:4", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:3-2:4"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: "definition_extent": "3:3-3:9", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:3-3:4"] }] } diff --git a/tests/enums/enum_inherit.cc b/tests/enums/enum_inherit.cc index 569bacd6..693cb27a 100644 --- a/tests/enums/enum_inherit.cc +++ b/tests/enums/enum_inherit.cc @@ -33,10 +33,7 @@ OUTPUT: "definition_extent": "2:3-2:4", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:3-2:4"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: "definition_extent": "3:3-3:9", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:3-3:4"] }] } diff --git a/tests/enums/enum_usage.cc b/tests/enums/enum_usage.cc index 90e7fbd9..442320c4 100644 --- a/tests/enums/enum_usage.cc +++ b/tests/enums/enum_usage.cc @@ -35,10 +35,7 @@ OUTPUT: "definition_extent": "2:3-2:4", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:3-2:4", "6:14-6:15"] }, { "id": 1, @@ -49,10 +46,7 @@ OUTPUT: "definition_extent": "3:3-3:9", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:3-3:4"] }, { "id": 2, @@ -62,10 +56,7 @@ OUTPUT: "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:15", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:5-6:6"] }] } diff --git a/tests/foobar.cc b/tests/foobar.cc index a9fe9304..e2965b96 100644 --- a/tests/foobar.cc +++ b/tests/foobar.cc @@ -79,10 +79,7 @@ OUTPUT: "definition_spelling": "9:15-9:16", "definition_extent": "9:1-9:16", "variable_type": 3, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["9:15-9:16"] }, { "id": 1, @@ -92,10 +89,7 @@ OUTPUT: "definition_spelling": "10:8-10:9", "definition_extent": "10:1-10:9", "variable_type": 2, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["10:8-10:9"] }] } diff --git a/tests/lambdas/lambda.cc b/tests/lambdas/lambda.cc index 9e23fde3..fd686e79 100644 --- a/tests/lambdas/lambda.cc +++ b/tests/lambdas/lambda.cc @@ -63,10 +63,7 @@ OUTPUT: "detailed_name": "int x", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["2:7-2:8", "5:7-5:8", "4:24-4:25"] }, { "id": 1, @@ -76,10 +73,7 @@ OUTPUT: "definition_spelling": "4:8-4:19", "definition_extent": "4:3-7:4", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:8-4:19", "9:3-9:14", "10:3-10:14", "11:3-11:14"] }, { "id": 2, @@ -88,10 +82,7 @@ OUTPUT: "detailed_name": "int y", "definition_spelling": "4:31-4:32", "definition_extent": "4:27-4:32", - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["4:31-4:32", "6:7-6:8"] }] } diff --git a/tests/macros/complex.cc b/tests/macros/complex.cc index fec5956f..d782f62c 100644 --- a/tests/macros/complex.cc +++ b/tests/macros/complex.cc @@ -58,10 +58,7 @@ OUTPUT: "detailed_name": "const int make2", "definition_spelling": "9:11-9:16", "definition_extent": "9:1-9:20", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["9:11-9:16", "12:14-12:19"] }, { "id": 1, @@ -71,10 +68,7 @@ OUTPUT: "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, - "is_macro": true, - "is_global": false, - "is_member": false, + "cls": 2, "uses": ["1:9-1:12", "12:1-12:4"] }] } diff --git a/tests/macros/foo.cc b/tests/macros/foo.cc index b17109cd..31d399b9 100644 --- a/tests/macros/foo.cc +++ b/tests/macros/foo.cc @@ -35,10 +35,7 @@ OUTPUT: "detailed_name": "int x", "definition_spelling": "8:5-8:6", "definition_extent": "8:1-8:10", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["8:5-8:6"] }, { "id": 1, @@ -48,10 +45,7 @@ OUTPUT: "hover": "#define A 5", "definition_spelling": "1:9-1:10", "definition_extent": "1:9-1:12", - "is_local": false, - "is_macro": true, - "is_global": false, - "is_member": false, + "cls": 2, "uses": ["1:9-1:10", "8:9-8:10"] }, { "id": 2, @@ -61,10 +55,7 @@ OUTPUT: "hover": "#define DISALLOW(type) type(type&&) = delete;", "definition_spelling": "2:9-2:17", "definition_extent": "2:9-2:46", - "is_local": false, - "is_macro": true, - "is_global": false, - "is_member": false, + "cls": 2, "uses": ["2:9-2:17", "5:3-5:11"] }] } diff --git a/tests/multi_file/funky_enum.cc b/tests/multi_file/funky_enum.cc index b74c6694..e436456f 100644 --- a/tests/multi_file/funky_enum.cc +++ b/tests/multi_file/funky_enum.cc @@ -33,10 +33,7 @@ OUTPUT: funky_enum.h "definition_extent": "4:1-4:2", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["4:1-4:2"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: funky_enum.h "definition_extent": "5:1-5:2", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["5:1-5:2"] }, { "id": 2, @@ -61,10 +55,7 @@ OUTPUT: funky_enum.h "definition_extent": "6:1-6:2", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["6:1-6:2"] }] } diff --git a/tests/multi_file/impl.cc b/tests/multi_file/impl.cc index 187dfe8c..581e3fea 100644 --- a/tests/multi_file/impl.cc +++ b/tests/multi_file/impl.cc @@ -106,10 +106,7 @@ OUTPUT: header.h "definition_extent": "15:13-15:14", "variable_type": 4, "declaring_type": 4, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["15:13-15:14"] }, { "id": 1, @@ -120,10 +117,7 @@ OUTPUT: header.h "definition_extent": "15:16-15:17", "variable_type": 4, "declaring_type": 4, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["15:16-15:17"] }, { "id": 2, @@ -134,10 +128,7 @@ OUTPUT: header.h "definition_extent": "15:19-15:20", "variable_type": 4, "declaring_type": 4, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["15:19-15:20"] }, { "id": 3, @@ -146,10 +137,7 @@ OUTPUT: header.h "detailed_name": "int Foo4", "definition_spelling": "17:5-17:9", "definition_extent": "17:1-17:9", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["17:5-17:9"] }, { "id": 4, @@ -158,10 +146,7 @@ OUTPUT: header.h "detailed_name": "int Foo5", "definition_spelling": "18:12-18:16", "definition_extent": "18:1-18:16", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["18:12-18:16"] }] } diff --git a/tests/namespaces/namespace_alias.cc b/tests/namespaces/namespace_alias.cc index becef09b..3e216d30 100644 --- a/tests/namespaces/namespace_alias.cc +++ b/tests/namespaces/namespace_alias.cc @@ -41,10 +41,7 @@ OUTPUT: "detailed_name": "int foo::bar::baz::qux", "definition_spelling": "4:18-4:21", "definition_extent": "4:14-4:26", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["4:18-4:21", "12:26-12:29", "13:16-13:19"] }, { "id": 1, @@ -53,10 +50,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "12:7-12:8", "definition_extent": "12:3-12:29", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["12:7-12:8"] }, { "id": 2, @@ -65,10 +59,7 @@ OUTPUT: "detailed_name": "int b", "definition_spelling": "13:7-13:8", "definition_extent": "13:3-13:19", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["13:7-13:8"] }] } diff --git a/tests/namespaces/namespace_reference.cc b/tests/namespaces/namespace_reference.cc index e065ed1c..8026faf4 100644 --- a/tests/namespaces/namespace_reference.cc +++ b/tests/namespaces/namespace_reference.cc @@ -51,10 +51,7 @@ OUTPUT: "detailed_name": "int ns::Foo", "definition_spelling": "2:7-2:10", "definition_extent": "2:3-2:10", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["2:7-2:10", "7:18-7:21", "9:10-9:13"] }, { "id": 1, @@ -63,10 +60,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "3:19-3:20", "definition_extent": "3:15-3:20", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["3:19-3:20"] }] } diff --git a/tests/objective-c/class.m b/tests/objective-c/class.m index 098bc1c4..78cbe94b 100644 --- a/tests/objective-c/class.m +++ b/tests/objective-c/class.m @@ -129,10 +129,7 @@ OUTPUT: "short_name": "aProp", "detailed_name": "int AClass::aProp", "declaration": "4:29-4:34", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:29-4:34", "16:12-16:17"] }, { "id": 1, @@ -141,10 +138,7 @@ OUTPUT: "detailed_name": "int AClass::_aProp", "definition_spelling": "4:29-4:34", "definition_extent": "4:29-4:34", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:29-4:34"] }, { "id": 2, @@ -153,10 +147,7 @@ OUTPUT: "detailed_name": "AClass * instance", "definition_spelling": "14:11-14:19", "definition_extent": "14:3-14:35", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["14:11-14:19", "15:4-15:12", "16:3-16:11"] }] } diff --git a/tests/outline/outline.cc b/tests/outline/outline.cc index 7604944c..9b0b058d 100644 --- a/tests/outline/outline.cc +++ b/tests/outline/outline.cc @@ -53,10 +53,7 @@ OUTPUT: "definition_spelling": "4:7-4:8", "definition_extent": "4:3-4:8", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["4:7-4:8"] }, { "id": 1, @@ -66,10 +63,7 @@ OUTPUT: "definition_spelling": "5:7-5:8", "definition_extent": "5:3-5:8", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["5:7-5:8"] }, { "id": 2, @@ -80,10 +74,7 @@ OUTPUT: "definition_extent": "6:3-6:26", "variable_type": 1, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["6:20-6:26"] }] } diff --git a/tests/outline/outline2.cc b/tests/outline/outline2.cc index 971ac2e6..8e2d11d1 100644 --- a/tests/outline/outline2.cc +++ b/tests/outline/outline2.cc @@ -95,10 +95,7 @@ OUTPUT: "definition_extent": "7:3-7:24", "variable_type": 1, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["7:15-7:24"] }, { "id": 1, @@ -109,10 +106,7 @@ OUTPUT: "definition_extent": "8:3-8:23", "variable_type": 1, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["8:15-8:23"] }, { "id": 2, @@ -123,10 +117,7 @@ OUTPUT: "definition_extent": "9:3-9:32", "variable_type": 2, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["9:28-9:32"] }] } diff --git a/tests/outline/static_function_in_type.cc b/tests/outline/static_function_in_type.cc index 018787b8..7e9e6cd9 100644 --- a/tests/outline/static_function_in_type.cc +++ b/tests/outline/static_function_in_type.cc @@ -115,10 +115,7 @@ OUTPUT: static_function_in_type.cc "definition_spelling": "5:29-5:30", "definition_extent": "5:20-5:30", "variable_type": 1, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:29-5:30"] }] } diff --git a/tests/preprocessor/include_guard.cc b/tests/preprocessor/include_guard.cc index 5ff2a37f..b59c241e 100644 --- a/tests/preprocessor/include_guard.cc +++ b/tests/preprocessor/include_guard.cc @@ -18,10 +18,7 @@ OUTPUT: "hover": "#define FOO", "definition_spelling": "2:9-2:12", "definition_extent": "2:9-2:12", - "is_local": false, - "is_macro": true, - "is_global": false, - "is_member": false, + "cls": 2, "uses": ["2:9-2:12"] }] } diff --git a/tests/templates/implicit_variable_instantiation.cc b/tests/templates/implicit_variable_instantiation.cc index a9867b01..744eb3d6 100644 --- a/tests/templates/implicit_variable_instantiation.cc +++ b/tests/templates/implicit_variable_instantiation.cc @@ -59,10 +59,7 @@ OUTPUT: "definition_extent": "9:3-10:47", "variable_type": 0, "declaring_type": 1, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["6:30-6:40", "10:37-10:47", "13:26-13:36", "14:27-14:37"] }, { "id": 1, @@ -71,10 +68,7 @@ OUTPUT: "detailed_name": "int ns::Foo", "definition_spelling": "13:7-13:10", "definition_extent": "13:3-13:36", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["13:7-13:10"] }, { "id": 2, @@ -83,10 +77,7 @@ OUTPUT: "detailed_name": "int ns::Foo2", "definition_spelling": "14:7-14:11", "definition_extent": "14:3-14:37", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["14:7-14:11"] }] } 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 11d6d17f..79fddb4d 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 @@ -54,10 +54,7 @@ OUTPUT: "detailed_name": "int ns::a", "definition_spelling": "10:7-10:8", "definition_extent": "10:3-10:33", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["10:7-10:8"] }, { "id": 1, @@ -66,10 +63,7 @@ OUTPUT: "detailed_name": "int ns::b", "definition_spelling": "11:7-11:8", "definition_extent": "11:3-11:35", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["11:7-11:8"] }] } 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 1e5d0841..480774b4 100644 --- a/tests/templates/namespace_template_type_usage_folded_into_one.cc +++ b/tests/templates/namespace_template_type_usage_folded_into_one.cc @@ -35,10 +35,7 @@ OUTPUT: "definition_spelling": "5:12-5:13", "definition_extent": "5:3-5:13", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["5:12-5:13"] }, { "id": 1, @@ -48,10 +45,7 @@ OUTPUT: "definition_spelling": "6:13-6:14", "definition_extent": "6:3-6:14", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:13-6:14"] }] } 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 f46d95ec..97abddf1 100644 --- a/tests/templates/template_class_func_usage_folded_into_one.cc +++ b/tests/templates/template_class_func_usage_folded_into_one.cc @@ -51,10 +51,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "8:5-8:6", "definition_extent": "8:1-8:24", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["8:5-8:6"] }, { "id": 1, @@ -63,10 +60,7 @@ OUTPUT: "detailed_name": "int b", "definition_spelling": "9:5-9:6", "definition_extent": "9:1-9:25", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["9:5-9:6"] }] } 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 06f4a9b1..546011d3 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 @@ -52,10 +52,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "9:5-9:6", "definition_extent": "9:1-9:31", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["9:5-9:6"] }, { "id": 1, @@ -64,10 +61,7 @@ OUTPUT: "detailed_name": "int b", "definition_spelling": "10:5-10:6", "definition_extent": "10:1-10:33", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["10:5-10:6"] }] } 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 c7faaacb..c142fd94 100644 --- a/tests/templates/template_class_type_usage_folded_into_one.cc +++ b/tests/templates/template_class_type_usage_folded_into_one.cc @@ -98,10 +98,7 @@ OUTPUT: "definition_spelling": "9:15-9:16", "definition_extent": "9:1-9:16", "variable_type": 3, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["9:15-9:16"] }, { "id": 1, @@ -111,10 +108,7 @@ OUTPUT: "definition_spelling": "10:15-10:16", "definition_extent": "10:1-10:16", "variable_type": 3, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["10:15-10:16"] }] } 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 114d81c0..44a2126c 100644 --- a/tests/templates/template_class_var_usage_folded_into_one.cc +++ b/tests/templates/template_class_var_usage_folded_into_one.cc @@ -33,10 +33,7 @@ OUTPUT: "short_name": "var", "detailed_name": "const int Foo::var", "declaration": "3:24-3:27", - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:24-3:27", "6:19-6:22", "7:20-7:23"] }, { "id": 1, @@ -45,10 +42,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:22", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:5-6:6"] }, { "id": 2, @@ -57,10 +51,7 @@ OUTPUT: "detailed_name": "int b", "definition_spelling": "7:5-7:6", "definition_extent": "7:1-7:23", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["7:5-7:6"] }] } diff --git a/tests/templates/template_func_usage_folded_into_one.cc b/tests/templates/template_func_usage_folded_into_one.cc index 315527d9..d8d6322a 100644 --- a/tests/templates/template_func_usage_folded_into_one.cc +++ b/tests/templates/template_func_usage_folded_into_one.cc @@ -37,10 +37,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:19", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:5-6:6"] }, { "id": 1, @@ -49,10 +46,7 @@ OUTPUT: "detailed_name": "int b", "definition_spelling": "7:5-7:6", "definition_extent": "7:1-7:20", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["7:5-7:6"] }] } diff --git a/tests/templates/template_type_usage_folded_into_one.cc b/tests/templates/template_type_usage_folded_into_one.cc index 0a8d0896..a2b93b41 100644 --- a/tests/templates/template_type_usage_folded_into_one.cc +++ b/tests/templates/template_type_usage_folded_into_one.cc @@ -33,10 +33,7 @@ OUTPUT: "definition_spelling": "4:10-4:11", "definition_extent": "4:1-4:11", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["4:10-4:11"] }, { "id": 1, @@ -46,10 +43,7 @@ OUTPUT: "definition_spelling": "5:11-5:12", "definition_extent": "5:1-5:12", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["5:11-5:12"] }] } diff --git a/tests/templates/template_var_usage_folded_into_one.cc b/tests/templates/template_var_usage_folded_into_one.cc index af241b7e..603909ed 100644 --- a/tests/templates/template_var_usage_folded_into_one.cc +++ b/tests/templates/template_var_usage_folded_into_one.cc @@ -84,10 +84,7 @@ OUTPUT: "detailed_name": "T var", "definition_spelling": "5:3-5:6", "definition_extent": "5:1-5:12", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["5:3-5:6", "7:7-7:10", "8:7-8:10"] }, { "id": 1, @@ -97,10 +94,7 @@ OUTPUT: "definition_spelling": "7:3-7:4", "definition_extent": "7:1-7:13", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["7:3-7:4"] }, { "id": 2, @@ -110,10 +104,7 @@ OUTPUT: "definition_spelling": "8:3-8:4", "definition_extent": "8:1-8:13", "variable_type": 1, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["8:3-8:4"] }] } diff --git a/tests/types/anonymous_struct.cc b/tests/types/anonymous_struct.cc index 598af845..38e4bcb7 100644 --- a/tests/types/anonymous_struct.cc +++ b/tests/types/anonymous_struct.cc @@ -46,10 +46,7 @@ OUTPUT: "definition_spelling": "2:18-2:19", "definition_extent": "2:12-2:19", "declaring_type": 1, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:18-2:19"] }, { "id": 1, @@ -59,10 +56,7 @@ OUTPUT: "definition_spelling": "2:21-2:22", "definition_extent": "2:12-2:22", "declaring_type": 1, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:21-2:22"] }, { "id": 2, @@ -72,10 +66,7 @@ OUTPUT: "definition_spelling": "2:24-2:25", "definition_extent": "2:12-2:25", "declaring_type": 1, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:24-2:25"] }, { "id": 3, @@ -85,10 +76,7 @@ OUTPUT: "definition_spelling": "3:9-3:10", "definition_extent": "3:3-3:13", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:9-3:10"] }] } diff --git a/tests/unions/union_decl.cc b/tests/unions/union_decl.cc index 951a91bc..d8fc668b 100644 --- a/tests/unions/union_decl.cc +++ b/tests/unions/union_decl.cc @@ -32,10 +32,7 @@ OUTPUT: "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:7-2:8"] }, { "id": 1, @@ -45,10 +42,7 @@ OUTPUT: "definition_spelling": "3:8-3:9", "definition_extent": "3:3-3:9", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:8-3:9"] }] } diff --git a/tests/unions/union_usage.cc b/tests/unions/union_usage.cc index 4a796dbb..8c15f7a6 100644 --- a/tests/unions/union_usage.cc +++ b/tests/unions/union_usage.cc @@ -54,10 +54,7 @@ OUTPUT: "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:12", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:7-2:8", "9:5-9:6"] }, { "id": 1, @@ -67,10 +64,7 @@ OUTPUT: "definition_spelling": "3:8-3:9", "definition_extent": "3:3-3:13", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:8-3:9"] }, { "id": 2, @@ -80,10 +74,7 @@ OUTPUT: "definition_spelling": "6:5-6:6", "definition_extent": "6:1-6:6", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:5-6:6", "9:3-9:4"] }] } diff --git a/tests/usage/func_called_from_macro_argument.cc b/tests/usage/func_called_from_macro_argument.cc index dfe9f52b..b394b9ce 100644 --- a/tests/usage/func_called_from_macro_argument.cc +++ b/tests/usage/func_called_from_macro_argument.cc @@ -52,10 +52,7 @@ OUTPUT: "hover": "#define MACRO_CALL(e) e", "definition_spelling": "1:9-1:19", "definition_extent": "1:9-1:24", - "is_local": false, - "is_macro": true, - "is_global": false, - "is_member": false, + "cls": 2, "uses": ["1:9-1:19", "6:3-6:13"] }] } diff --git a/tests/usage/func_usage_addr_func.cc b/tests/usage/func_usage_addr_func.cc index 5340caeb..ad60ac27 100644 --- a/tests/usage/func_usage_addr_func.cc +++ b/tests/usage/func_usage_addr_func.cc @@ -63,10 +63,7 @@ OUTPUT: "detailed_name": "void (*)() x", "definition_spelling": "6:10-6:11", "definition_extent": "6:3-6:22", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:10-6:11"] }] } diff --git a/tests/usage/func_usage_addr_method.cc b/tests/usage/func_usage_addr_method.cc index bdbdc060..dc2b7c72 100644 --- a/tests/usage/func_usage_addr_method.cc +++ b/tests/usage/func_usage_addr_method.cc @@ -67,10 +67,7 @@ OUTPUT: "detailed_name": "void (Foo::*)() x", "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:22", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:8-6:9"] }] } diff --git a/tests/usage/func_usage_call_method.cc b/tests/usage/func_usage_call_method.cc index 9c5dae77..8c913203 100644 --- a/tests/usage/func_usage_call_method.cc +++ b/tests/usage/func_usage_call_method.cc @@ -68,10 +68,7 @@ OUTPUT: "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:19", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:8-6:9", "7:3-7:4"] }] } diff --git a/tests/usage/func_usage_class_inline_var_def.cc b/tests/usage/func_usage_class_inline_var_def.cc index 425245ee..3be4aa9b 100644 --- a/tests/usage/func_usage_class_inline_var_def.cc +++ b/tests/usage/func_usage_class_inline_var_def.cc @@ -49,10 +49,7 @@ OUTPUT: "definition_spelling": "6:7-6:8", "definition_extent": "6:3-6:19", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["6:7-6:8"] }] } diff --git a/tests/usage/func_usage_forward_decl_method.cc b/tests/usage/func_usage_forward_decl_method.cc index c97d92dd..1b24c1eb 100644 --- a/tests/usage/func_usage_forward_decl_method.cc +++ b/tests/usage/func_usage_forward_decl_method.cc @@ -67,10 +67,7 @@ OUTPUT: "definition_spelling": "6:8-6:9", "definition_extent": "6:3-6:19", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:8-6:9", "7:3-7:4"] }] } diff --git a/tests/usage/type_usage_as_template_parameter.cc b/tests/usage/type_usage_as_template_parameter.cc index 690fa8a8..36acfe7b 100644 --- a/tests/usage/type_usage_as_template_parameter.cc +++ b/tests/usage/type_usage_as_template_parameter.cc @@ -67,10 +67,7 @@ OUTPUT: "definition_spelling": "6:25-6:27", "definition_extent": "6:1-6:27", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:25-6:27"] }, { "id": 1, @@ -80,10 +77,7 @@ OUTPUT: "definition_spelling": "7:22-7:24", "definition_extent": "7:1-7:24", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["7:22-7:24"] }, { "id": 2, @@ -93,10 +87,7 @@ OUTPUT: "definition_spelling": "10:18-10:23", "definition_extent": "10:3-10:23", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["10:18-10:23"] }] } diff --git a/tests/usage/type_usage_as_template_parameter_complex.cc b/tests/usage/type_usage_as_template_parameter_complex.cc index e6d327e8..64f22bc5 100644 --- a/tests/usage/type_usage_as_template_parameter_complex.cc +++ b/tests/usage/type_usage_as_template_parameter_complex.cc @@ -204,10 +204,7 @@ OUTPUT: "detailed_name": "unique_ptr, S2> f", "declaration": "15:43-15:44", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["15:43-15:44"] }, { "id": 1, @@ -217,10 +214,7 @@ OUTPUT: "definition_spelling": "54:39-54:44", "definition_extent": "54:3-54:44", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["54:39-54:44"] }] } diff --git a/tests/usage/type_usage_as_template_parameter_simple.cc b/tests/usage/type_usage_as_template_parameter_simple.cc index cdc78060..5dfa93b6 100644 --- a/tests/usage/type_usage_as_template_parameter_simple.cc +++ b/tests/usage/type_usage_as_template_parameter_simple.cc @@ -46,10 +46,7 @@ OUTPUT: "definition_spelling": "6:22-6:25", "definition_extent": "6:1-6:25", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["6:22-6:25"] }] } diff --git a/tests/usage/type_usage_declare_extern.cc b/tests/usage/type_usage_declare_extern.cc index 36c91add..fe37f414 100644 --- a/tests/usage/type_usage_declare_extern.cc +++ b/tests/usage/type_usage_declare_extern.cc @@ -29,10 +29,7 @@ OUTPUT: "detailed_name": "T t", "declaration": "3:10-3:11", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["3:10-3:11"] }] } diff --git a/tests/usage/type_usage_declare_field.cc b/tests/usage/type_usage_declare_field.cc index c514c881..2ec0e228 100644 --- a/tests/usage/type_usage_declare_field.cc +++ b/tests/usage/type_usage_declare_field.cc @@ -62,10 +62,7 @@ OUTPUT: "definition_extent": "5:3-5:17", "variable_type": 0, "declaring_type": 2, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["5:16-5:17"] }, { "id": 1, @@ -76,10 +73,7 @@ OUTPUT: "definition_extent": "6:3-6:20", "variable_type": 1, "declaring_type": 2, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["6:19-6:20"] }] } diff --git a/tests/usage/type_usage_declare_local.cc b/tests/usage/type_usage_declare_local.cc index f30c356b..2207d338 100644 --- a/tests/usage/type_usage_declare_local.cc +++ b/tests/usage/type_usage_declare_local.cc @@ -61,10 +61,7 @@ OUTPUT: "definition_spelling": "5:16-5:17", "definition_extent": "5:3-5:17", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:16-5:17"] }, { "id": 1, @@ -74,10 +71,7 @@ OUTPUT: "definition_spelling": "6:19-6:20", "definition_extent": "6:3-6:20", "variable_type": 1, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:19-6:20"] }] } diff --git a/tests/usage/type_usage_declare_param.cc b/tests/usage/type_usage_declare_param.cc index e797eb79..2b43906c 100644 --- a/tests/usage/type_usage_declare_param.cc +++ b/tests/usage/type_usage_declare_param.cc @@ -58,10 +58,7 @@ OUTPUT: "definition_spelling": "4:23-4:24", "definition_extent": "4:10-4:24", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:23-4:24"] }, { "id": 1, @@ -71,10 +68,7 @@ OUTPUT: "definition_spelling": "4:42-4:43", "definition_extent": "4:26-4:43", "variable_type": 1, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:42-4:43"] }] } diff --git a/tests/usage/type_usage_declare_param_prototype.cc b/tests/usage/type_usage_declare_param_prototype.cc index 37059ffb..e19880f8 100644 --- a/tests/usage/type_usage_declare_param_prototype.cc +++ b/tests/usage/type_usage_declare_param_prototype.cc @@ -54,10 +54,7 @@ OUTPUT: "definition_spelling": "4:15-4:16", "definition_extent": "4:10-4:16", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:15-4:16"] }] } diff --git a/tests/usage/type_usage_declare_qualifiers.cc b/tests/usage/type_usage_declare_qualifiers.cc index 9b828949..8234e1c4 100644 --- a/tests/usage/type_usage_declare_qualifiers.cc +++ b/tests/usage/type_usage_declare_qualifiers.cc @@ -49,10 +49,7 @@ OUTPUT: "definition_spelling": "3:16-3:18", "definition_extent": "3:10-3:18", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["3:16-3:18"] }, { "id": 1, @@ -62,10 +59,7 @@ OUTPUT: "definition_spelling": "3:32-3:34", "definition_extent": "3:20-3:34", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["3:32-3:34"] }, { "id": 2, @@ -75,10 +69,7 @@ OUTPUT: "definition_spelling": "4:8-4:10", "definition_extent": "4:3-4:10", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:8-4:10"] }, { "id": 3, @@ -88,10 +79,7 @@ OUTPUT: "definition_spelling": "5:9-5:11", "definition_extent": "5:3-5:11", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:9-5:11"] }, { "id": 4, @@ -101,10 +89,7 @@ OUTPUT: "definition_spelling": "6:15-6:17", "definition_extent": "6:3-6:17", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:15-6:17"] }, { "id": 5, @@ -114,10 +99,7 @@ OUTPUT: "definition_spelling": "7:21-7:23", "definition_extent": "7:3-7:33", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["7:21-7:23"] }] } diff --git a/tests/usage/type_usage_declare_static.cc b/tests/usage/type_usage_declare_static.cc index 029f72a8..dc9a3ff1 100644 --- a/tests/usage/type_usage_declare_static.cc +++ b/tests/usage/type_usage_declare_static.cc @@ -29,10 +29,7 @@ OUTPUT: "definition_spelling": "2:13-2:14", "definition_extent": "2:1-2:14", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["2:13-2:14"] }] } diff --git a/tests/usage/type_usage_various.cc b/tests/usage/type_usage_various.cc index e9fafcd6..e433dd58 100644 --- a/tests/usage/type_usage_various.cc +++ b/tests/usage/type_usage_various.cc @@ -58,10 +58,7 @@ OUTPUT: "definition_spelling": "6:7-6:8", "definition_extent": "6:3-6:8", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["6:7-6:8"] }, { "id": 1, @@ -70,10 +67,7 @@ OUTPUT: "detailed_name": "Foo foo", "declaration": "10:12-10:15", "variable_type": 0, - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["10:12-10:15"] }] } diff --git a/tests/usage/usage_inside_of_call.cc b/tests/usage/usage_inside_of_call.cc index d78ed126..ee93e7ac 100644 --- a/tests/usage/usage_inside_of_call.cc +++ b/tests/usage/usage_inside_of_call.cc @@ -92,10 +92,7 @@ OUTPUT: "definition_spelling": "10:10-10:20", "definition_extent": "10:1-10:24", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["6:14-6:24", "10:10-10:20", "14:45-14:55"] }, { "id": 1, @@ -105,10 +102,7 @@ OUTPUT: "definition_spelling": "7:7-7:16", "definition_extent": "7:3-7:16", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["7:7-7:16", "14:28-14:37"] }, { "id": 2, @@ -117,10 +111,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "13:7-13:8", "definition_extent": "13:3-13:12", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["13:7-13:8", "14:10-14:11"] }] } diff --git a/tests/usage/var_usage_call_function.cc b/tests/usage/var_usage_call_function.cc index b4f17bc2..7a56d54b 100644 --- a/tests/usage/var_usage_call_function.cc +++ b/tests/usage/var_usage_call_function.cc @@ -49,10 +49,7 @@ OUTPUT: "detailed_name": "void (*)() x", "definition_spelling": "4:8-4:9", "definition_extent": "4:3-4:19", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:8-4:9", "5:3-5:4"] }] } diff --git a/tests/usage/var_usage_class_member.cc b/tests/usage/var_usage_class_member.cc index 3d37a907..b385d195 100644 --- a/tests/usage/var_usage_class_member.cc +++ b/tests/usage/var_usage_class_member.cc @@ -94,10 +94,7 @@ OUTPUT: "definition_spelling": "3:7-3:8", "definition_extent": "3:3-3:8", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["3:7-3:8", "12:5-12:6", "13:5-13:6", "14:12-14:13", "15:12-15:13", "16:13-16:14"] }, { "id": 1, @@ -107,10 +104,7 @@ OUTPUT: "definition_spelling": "4:7-4:8", "definition_extent": "4:3-4:8", "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["4:7-4:8", "17:12-17:13"] }, { "id": 2, @@ -120,10 +114,7 @@ OUTPUT: "definition_spelling": "11:7-11:8", "definition_extent": "11:3-11:8", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["11:7-11:8", "12:3-12:4", "13:3-13:4", "14:10-14:11", "15:10-15:11", "16:11-16:12", "17:10-17:11"] }] } diff --git a/tests/usage/var_usage_class_member_static.cc b/tests/usage/var_usage_class_member_static.cc index 1326920b..b8d0b7b1 100644 --- a/tests/usage/var_usage_class_member_static.cc +++ b/tests/usage/var_usage_class_member_static.cc @@ -66,10 +66,7 @@ OUTPUT: "short_name": "x", "detailed_name": "int Foo::x", "declaration": "2:14-2:15", - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:14-2:15", "8:15-8:16"] }] } diff --git a/tests/usage/var_usage_cstyle_cast.cc b/tests/usage/var_usage_cstyle_cast.cc index a8360c68..706e36c8 100644 --- a/tests/usage/var_usage_cstyle_cast.cc +++ b/tests/usage/var_usage_cstyle_cast.cc @@ -52,10 +52,7 @@ OUTPUT: "definition_extent": "7:1-7:33", "variable_type": 0, "declaring_type": 1, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["4:28-4:38", "7:23-7:33"] }] } diff --git a/tests/usage/var_usage_extern.cc b/tests/usage/var_usage_extern.cc index 17a25950..7693e8f2 100644 --- a/tests/usage/var_usage_extern.cc +++ b/tests/usage/var_usage_extern.cc @@ -30,10 +30,7 @@ OUTPUT: "short_name": "a", "detailed_name": "int a", "declaration": "1:12-1:13", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["1:12-1:13", "4:3-4:4"] }] } diff --git a/tests/usage/var_usage_func_parameter.cc b/tests/usage/var_usage_func_parameter.cc index 955eca09..6f468d7e 100644 --- a/tests/usage/var_usage_func_parameter.cc +++ b/tests/usage/var_usage_func_parameter.cc @@ -29,10 +29,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "1:14-1:15", "definition_extent": "1:10-1:15", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["1:14-1:15", "2:3-2:4"] }] } diff --git a/tests/usage/var_usage_local.cc b/tests/usage/var_usage_local.cc index fcd3ee5c..677c02c9 100644 --- a/tests/usage/var_usage_local.cc +++ b/tests/usage/var_usage_local.cc @@ -30,10 +30,7 @@ OUTPUT: "detailed_name": "int x", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["2:7-2:8", "3:3-3:4"] }] } diff --git a/tests/usage/var_usage_shadowed_local.cc b/tests/usage/var_usage_shadowed_local.cc index 0d6a1803..fd42f212 100644 --- a/tests/usage/var_usage_shadowed_local.cc +++ b/tests/usage/var_usage_shadowed_local.cc @@ -35,10 +35,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "5:9-5:10", "definition_extent": "5:5-5:10", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:9-5:10", "6:5-6:6"] }] } diff --git a/tests/usage/var_usage_shadowed_parameter.cc b/tests/usage/var_usage_shadowed_parameter.cc index b3fe522e..cde0da98 100644 --- a/tests/usage/var_usage_shadowed_parameter.cc +++ b/tests/usage/var_usage_shadowed_parameter.cc @@ -35,10 +35,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "1:14-1:15", "definition_extent": "1:10-1:15", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["1:14-1:15", "2:3-2:4", "7:3-7:4"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "4:9-4:10", "definition_extent": "4:5-4:10", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:9-4:10", "5:5-5:6"] }] } diff --git a/tests/usage/var_usage_static.cc b/tests/usage/var_usage_static.cc index e628dfa5..f2115ba7 100644 --- a/tests/usage/var_usage_static.cc +++ b/tests/usage/var_usage_static.cc @@ -32,10 +32,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "1:12-1:13", "definition_extent": "1:1-1:13", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["1:12-1:13", "4:3-4:4"] }] } diff --git a/tests/vars/class_member.cc b/tests/vars/class_member.cc index 52cdd34c..41eff031 100644 --- a/tests/vars/class_member.cc +++ b/tests/vars/class_member.cc @@ -31,10 +31,7 @@ OUTPUT: "definition_extent": "2:3-2:14", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:8-2:14"] }] } diff --git a/tests/vars/class_static_member.cc b/tests/vars/class_static_member.cc index 6b2875fd..03529e1e 100644 --- a/tests/vars/class_static_member.cc +++ b/tests/vars/class_static_member.cc @@ -34,10 +34,7 @@ OUTPUT: "definition_extent": "4:1-4:27", "variable_type": 0, "declaring_type": 0, - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:15-2:21", "4:11-4:17"] }] } diff --git a/tests/vars/class_static_member_decl_only.cc b/tests/vars/class_static_member_decl_only.cc index 5b14140d..37d1d99c 100644 --- a/tests/vars/class_static_member_decl_only.cc +++ b/tests/vars/class_static_member_decl_only.cc @@ -28,10 +28,7 @@ OUTPUT: "short_name": "member", "detailed_name": "int Foo::member", "declaration": "2:14-2:20", - "is_local": false, - "is_macro": false, - "is_global": false, - "is_member": true, + "cls": 4, "uses": ["2:14-2:20"] }] } diff --git a/tests/vars/deduce_auto_type.cc b/tests/vars/deduce_auto_type.cc index e49b2003..3ae379ba 100644 --- a/tests/vars/deduce_auto_type.cc +++ b/tests/vars/deduce_auto_type.cc @@ -47,10 +47,7 @@ OUTPUT: "definition_spelling": "3:8-3:9", "definition_extent": "3:3-3:21", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["3:8-3:9"] }, { "id": 1, @@ -60,10 +57,7 @@ OUTPUT: "definition_spelling": "4:9-4:10", "definition_extent": "4:3-4:22", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:9-4:10"] }] } diff --git a/tests/vars/function_local.cc b/tests/vars/function_local.cc index 7a41ab73..df90fc32 100644 --- a/tests/vars/function_local.cc +++ b/tests/vars/function_local.cc @@ -45,10 +45,7 @@ OUTPUT: "definition_spelling": "4:8-4:9", "definition_extent": "4:3-4:9", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:8-4:9"] }] } diff --git a/tests/vars/function_param.cc b/tests/vars/function_param.cc index 6ca52e25..73a7cfa3 100644 --- a/tests/vars/function_param.cc +++ b/tests/vars/function_param.cc @@ -43,10 +43,7 @@ OUTPUT: "definition_spelling": "3:15-3:17", "definition_extent": "3:10-3:17", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["3:15-3:17"] }, { "id": 1, @@ -56,10 +53,7 @@ OUTPUT: "definition_spelling": "3:24-3:26", "definition_extent": "3:19-3:26", "variable_type": 0, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["3:24-3:26"] }] } diff --git a/tests/vars/function_shadow_local.cc b/tests/vars/function_shadow_local.cc index 782a57cb..d0ecdf75 100644 --- a/tests/vars/function_shadow_local.cc +++ b/tests/vars/function_shadow_local.cc @@ -35,10 +35,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "2:7-2:8", "definition_extent": "2:3-2:8", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"] }, { "id": 1, @@ -47,10 +44,7 @@ OUTPUT: "detailed_name": "int a", "definition_spelling": "5:9-5:10", "definition_extent": "5:5-5:10", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["5:9-5:10", "6:5-6:6"] }] } diff --git a/tests/vars/function_shadow_param.cc b/tests/vars/function_shadow_param.cc index 43fa931e..d91d2414 100644 --- a/tests/vars/function_shadow_param.cc +++ b/tests/vars/function_shadow_param.cc @@ -29,10 +29,7 @@ OUTPUT: "detailed_name": "int p", "definition_spelling": "1:14-1:15", "definition_extent": "1:10-1:15", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["1:14-1:15"] }, { "id": 1, @@ -41,10 +38,7 @@ OUTPUT: "detailed_name": "int p", "definition_spelling": "2:9-2:10", "definition_extent": "2:5-2:14", - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["2:9-2:10"] }] } diff --git a/tests/vars/global_variable.cc b/tests/vars/global_variable.cc index 11dd012e..e2948bef 100644 --- a/tests/vars/global_variable.cc +++ b/tests/vars/global_variable.cc @@ -13,10 +13,7 @@ OUTPUT: "detailed_name": "int global", "definition_spelling": "1:12-1:18", "definition_extent": "1:1-1:22", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["1:12-1:18"] }] } diff --git a/tests/vars/global_variable_decl_only.cc b/tests/vars/global_variable_decl_only.cc index ad908f1a..4d74d23b 100644 --- a/tests/vars/global_variable_decl_only.cc +++ b/tests/vars/global_variable_decl_only.cc @@ -12,10 +12,7 @@ OUTPUT: "short_name": "global", "detailed_name": "int global", "declaration": "1:12-1:18", - "is_local": false, - "is_macro": false, - "is_global": true, - "is_member": false, + "cls": 3, "uses": ["1:12-1:18"] }] } diff --git a/tests/vars/type_instance_on_using_type.cc b/tests/vars/type_instance_on_using_type.cc index 5eef78c5..20c5555a 100644 --- a/tests/vars/type_instance_on_using_type.cc +++ b/tests/vars/type_instance_on_using_type.cc @@ -65,10 +65,7 @@ OUTPUT: "definition_spelling": "4:5-4:6", "definition_extent": "4:3-4:6", "variable_type": 1, - "is_local": true, - "is_macro": false, - "is_global": false, - "is_member": false, + "cls": 1, "uses": ["4:5-4:6"] }] }