Add is_global and is_member.

This commit is contained in:
Chao Shen 2017-12-23 10:10:23 +08:00 committed by Jacob Dufault
parent 2056e44d22
commit 0985613d16
81 changed files with 328 additions and 6 deletions

View File

@ -53,7 +53,7 @@ Range ResolveExtent(const CXCursor& cx_cursor, CXFile* cx_file = nullptr) {
return Resolve(cx_range, cx_file);
}
bool IsLocalSemanticContainer(CXCursorKind kind) {
bool IsScopeSemanticContainer(CXCursorKind kind) {
switch (kind) {
case CXCursor_Namespace:
case CXCursor_TranslationUnit:
@ -91,7 +91,7 @@ struct NamespaceHelper {
std::vector<ClangCursor> namespaces;
std::string qualifier;
while (cursor.get_kind() != CXCursor_TranslationUnit &&
!IsLocalSemanticContainer(cursor.get_kind())) {
!IsScopeSemanticContainer(cursor.get_kind())) {
auto it = container_cursor_to_qualified_name.find(cursor);
if (it != container_cursor_to_qualified_name.end()) {
qualifier = it->second;
@ -600,6 +600,19 @@ optional<ClangCursor> FindType(ClangCursor cursor) {
return result;
}
bool IsGlobalContainer(const CXIdxContainerInfo* container) {
if (!container)
return false;
switch (container->cursor.kind) {
case CXCursor_Namespace:
case CXCursor_TranslationUnit:
return true;
default:
return false;
}
}
bool IsTypeDefinition(const CXIdxContainerInfo* container) {
if (!container)
return false;
@ -1046,9 +1059,13 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) {
var->def.detailed_name = type_name + " " + std::move(qualified_name);
}
var->def.is_local =
!decl->semanticContainer ||
IsLocalSemanticContainer(decl->semanticContainer->cursor.kind);
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;
//}
@ -1465,6 +1482,7 @@ void OnIndexReference(CXClientData client_data, const CXIdxEntityRefInfo* ref) {
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;
UniqueAdd(var->uses, ResolveSpelling(referenced.cx_cursor));
AddDeclInitializerUsages(db, referenced.cx_cursor);
// TODO Use proper semantic_container and lexical_container.

View File

@ -379,6 +379,10 @@ struct VarDefDefinitionData {
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;
bool operator==(
const VarDefDefinitionData<TypeId, FuncId, VarId, Range>& other) const {
@ -414,6 +418,8 @@ void Reflect(TVisitor& visitor,
REFLECT_MEMBER(declaring_type);
REFLECT_MEMBER(is_local);
REFLECT_MEMBER(is_macro);
REFLECT_MEMBER(is_global);
REFLECT_MEMBER(is_member);
REFLECT_MEMBER_END();
}

View File

@ -106,7 +106,7 @@ 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->declaring_type)
if (!var->def->is_local && !var->def->is_global && !var->def->is_member)
continue; // applies to for loop
is_type_member = var->def->declaring_type.has_value();
detailed_name = var->def->short_name;

View File

@ -71,6 +71,8 @@ optional<QueryVar::Def> ToQuery(const IdMap& id_map, const IndexVar::Def& var) {
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;
return result;
}

View File

@ -149,6 +149,8 @@ void Reflect(TVisitor& visitor, IndexVar& value) {
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("uses", value.uses);
REFLECT_MEMBER_END();
}

View File

@ -70,6 +70,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:7-7:8"]
}, {
"id": 1,
@ -81,6 +83,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["8:8-8:10"]
}]
}

View File

@ -91,6 +91,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["8:7-8:8"]
}]
}

View File

@ -69,6 +69,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:8-6:12"]
}, {
"id": 1,
@ -80,6 +82,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:8-7:12"]
}]
}

View File

@ -307,6 +307,8 @@ OUTPUT: make_functions.cc
"definition_extent": "4:15-4:29",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:25-4:29"]
}, {
"id": 1,
@ -317,6 +319,8 @@ OUTPUT: make_functions.cc
"definition_extent": "9:16-9:28",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["9:24-9:28"]
}]
}

View File

@ -33,6 +33,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:7-2:10"]
}]
}

View File

@ -36,6 +36,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:14-2:17", "5:10-5:13"]
}]
}

View File

@ -50,6 +50,8 @@ OUTPUT:
"definition_extent": "5:9-5:14",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:13-5:14"]
}, {
"id": 1,
@ -60,6 +62,8 @@ OUTPUT:
"definition_extent": "5:16-5:21",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:20-5:21"]
}]
}

View File

@ -35,6 +35,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:3-2:4"]
}, {
"id": 1,
@ -47,6 +49,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:3-3:4"]
}]
}

View File

@ -35,6 +35,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:3-2:4"]
}, {
"id": 1,
@ -47,6 +49,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:3-3:4"]
}]
}

View File

@ -35,6 +35,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:3-2:4"]
}, {
"id": 1,
@ -47,6 +49,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:3-3:4"]
}]
}

View File

@ -37,6 +37,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:3-2:4", "6:14-6:15"]
}, {
"id": 1,
@ -49,6 +51,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:3-3:4"]
}, {
"id": 2,
@ -60,6 +64,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["6:5-6:6"]
}]
}

View File

@ -81,6 +81,8 @@ OUTPUT:
"variable_type": 3,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["9:15-9:16"]
}, {
"id": 1,
@ -92,6 +94,8 @@ OUTPUT:
"variable_type": 2,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["10:8-10:9"]
}]
}

View File

@ -66,6 +66,8 @@ OUTPUT:
"definition_extent": "2:3-2:8",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:7-2:8", "5:7-5:8", "4:24-4:25"]
}, {
"id": 1,
@ -77,6 +79,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:8-4:19", "9:3-9:14", "10:3-10:14", "11:3-11:14"]
}, {
"id": 2,
@ -87,6 +91,8 @@ OUTPUT:
"definition_extent": "4:27-4:32",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:31-4:32", "6:7-6:8"]
}]
}

View File

@ -62,6 +62,8 @@ OUTPUT:
"definition_extent": "9:1-9:20",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["9:11-9:16", "12:14-12:19"]
}, {
"id": 1,
@ -73,6 +75,8 @@ OUTPUT:
"definition_extent": "1:9-3:32",
"is_local": false,
"is_macro": true,
"is_global": false,
"is_member": false,
"uses": ["1:9-1:12", "12:1-12:4"]
}]
}

View File

@ -53,6 +53,8 @@ OUTPUT:
"definition_extent": "8:1-8:10",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["8:5-8:6"]
}, {
"id": 1,
@ -64,6 +66,8 @@ OUTPUT:
"definition_extent": "1:9-1:12",
"is_local": false,
"is_macro": true,
"is_global": false,
"is_member": false,
"uses": ["1:9-1:10", "8:9-8:10"]
}, {
"id": 2,
@ -75,6 +79,8 @@ OUTPUT:
"definition_extent": "2:9-2:46",
"is_local": false,
"is_macro": true,
"is_global": false,
"is_member": false,
"uses": ["2:9-2:17", "5:3-5:11"]
}]
}

View File

@ -37,6 +37,8 @@ OUTPUT: funky_enum.h
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:1-4:2"]
}, {
"id": 1,
@ -50,6 +52,8 @@ OUTPUT: funky_enum.h
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:1-5:2"]
}, {
"id": 2,
@ -63,6 +67,8 @@ OUTPUT: funky_enum.h
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:1-6:2"]
}]
}

View File

@ -114,6 +114,8 @@ OUTPUT: header.h
"declaring_type": 4,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["15:13-15:14"]
}, {
"id": 1,
@ -127,6 +129,8 @@ OUTPUT: header.h
"declaring_type": 4,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["15:16-15:17"]
}, {
"id": 2,
@ -140,6 +144,8 @@ OUTPUT: header.h
"declaring_type": 4,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["15:19-15:20"]
}, {
"id": 3,
@ -151,6 +157,8 @@ OUTPUT: header.h
"definition_extent": "17:1-17:9",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["17:5-17:9"]
}, {
"id": 4,
@ -162,6 +170,8 @@ OUTPUT: header.h
"definition_extent": "18:1-18:16",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["18:12-18:16"]
}]
}

View File

@ -44,6 +44,8 @@ OUTPUT:
"definition_extent": "4:14-4:26",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:18-4:21", "12:26-12:29", "13:16-13:19"]
}, {
"id": 1,
@ -54,6 +56,8 @@ OUTPUT:
"definition_extent": "12:3-12:29",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["12:7-12:8"]
}, {
"id": 2,
@ -64,6 +68,8 @@ OUTPUT:
"definition_extent": "13:3-13:19",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["13:7-13:8"]
}]
}

View File

@ -55,6 +55,8 @@ OUTPUT:
"definition_extent": "2:3-2:10",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:7-2:10", "7:18-7:21", "9:10-9:13"]
}, {
"id": 1,
@ -65,6 +67,8 @@ OUTPUT:
"definition_extent": "3:15-3:20",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:19-3:20"]
}]
}

View File

@ -138,6 +138,8 @@ OUTPUT:
"declaration": "4:29-4:34",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:29-4:34", "16:12-16:17"]
}, {
"id": 1,
@ -149,6 +151,8 @@ OUTPUT:
"definition_extent": "4:29-4:34",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:29-4:34"]
}, {
"id": 2,
@ -160,6 +164,8 @@ OUTPUT:
"definition_extent": "14:3-14:35",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["14:11-14:19", "15:4-15:12", "16:3-16:11"]
}]
}

View File

@ -58,6 +58,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:7-4:8"]
}, {
"id": 1,
@ -70,6 +72,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:7-5:8"]
}, {
"id": 2,
@ -83,6 +87,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:20-6:26"]
}]
}

View File

@ -102,6 +102,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:15-7:24"]
}, {
"id": 1,
@ -115,6 +117,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["8:15-8:23"]
}, {
"id": 2,
@ -128,6 +132,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["9:28-9:32"]
}]
}

View File

@ -119,6 +119,8 @@ OUTPUT: static_function_in_type.cc
"variable_type": 1,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:29-5:30"]
}]
}

View File

@ -20,6 +20,8 @@ OUTPUT:
"definition_extent": "2:9-2:12",
"is_local": false,
"is_macro": true,
"is_global": false,
"is_member": false,
"uses": ["2:9-2:12"]
}]
}

View File

@ -61,6 +61,8 @@ OUTPUT:
"declaring_type": 1,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["6:30-6:40", "10:37-10:47", "13:26-13:36", "14:27-14:37"]
}, {
"id": 1,
@ -71,6 +73,8 @@ OUTPUT:
"definition_extent": "13:3-13:36",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["13:7-13:10"]
}, {
"id": 2,
@ -81,6 +85,8 @@ OUTPUT:
"definition_extent": "14:3-14:37",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["14:7-14:11"]
}]
}

View File

@ -57,6 +57,8 @@ OUTPUT:
"definition_extent": "10:3-10:33",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["10:7-10:8"]
}, {
"id": 1,
@ -67,6 +69,8 @@ OUTPUT:
"definition_extent": "11:3-11:35",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["11:7-11:8"]
}]
}

View File

@ -37,6 +37,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["5:12-5:13"]
}, {
"id": 1,
@ -48,6 +50,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["6:13-6:14"]
}]
}

View File

@ -54,6 +54,8 @@ OUTPUT:
"definition_extent": "8:1-8:24",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["8:5-8:6"]
}, {
"id": 1,
@ -64,6 +66,8 @@ OUTPUT:
"definition_extent": "9:1-9:25",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["9:5-9:6"]
}]
}

View File

@ -55,6 +55,8 @@ OUTPUT:
"definition_extent": "9:1-9:31",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["9:5-9:6"]
}, {
"id": 1,
@ -65,6 +67,8 @@ OUTPUT:
"definition_extent": "10:1-10:33",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["10:5-10:6"]
}]
}

View File

@ -100,6 +100,8 @@ OUTPUT:
"variable_type": 3,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["9:15-9:16"]
}, {
"id": 1,
@ -111,6 +113,8 @@ OUTPUT:
"variable_type": 3,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["10:15-10:16"]
}]
}

View File

@ -35,6 +35,8 @@ OUTPUT:
"declaration": "3:24-3:27",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:24-3:27", "6:19-6:22", "7:20-7:23"]
}, {
"id": 1,
@ -45,6 +47,8 @@ OUTPUT:
"definition_extent": "6:1-6:22",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["6:5-6:6"]
}, {
"id": 2,
@ -55,6 +59,8 @@ OUTPUT:
"definition_extent": "7:1-7:23",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["7:5-7:6"]
}]
}

View File

@ -40,6 +40,8 @@ OUTPUT:
"definition_extent": "6:1-6:19",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:5-6:6"]
}, {
"id": 1,
@ -50,6 +52,8 @@ OUTPUT:
"definition_extent": "7:1-7:20",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:5-7:6"]
}]
}

View File

@ -35,6 +35,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["4:10-4:11"]
}, {
"id": 1,
@ -46,6 +48,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["5:11-5:12"]
}]
}

View File

@ -86,6 +86,8 @@ OUTPUT:
"definition_extent": "5:1-5:12",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["5:3-5:6", "7:7-7:10", "8:7-8:10"]
}, {
"id": 1,
@ -97,6 +99,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["7:3-7:4"]
}, {
"id": 2,
@ -108,6 +112,8 @@ OUTPUT:
"variable_type": 1,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["8:3-8:4"]
}]
}

View File

@ -48,6 +48,8 @@ OUTPUT:
"declaring_type": 1,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:18-2:19"]
}, {
"id": 1,
@ -59,6 +61,8 @@ OUTPUT:
"declaring_type": 1,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:21-2:22"]
}, {
"id": 2,
@ -70,6 +74,8 @@ OUTPUT:
"declaring_type": 1,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:24-2:25"]
}, {
"id": 3,
@ -81,6 +87,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:9-3:10"]
}]
}

View File

@ -34,6 +34,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:7-2:8"]
}, {
"id": 1,
@ -45,6 +47,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["3:8-3:9"]
}]
}

View File

@ -57,6 +57,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:7-2:8", "9:5-9:6"]
}, {
"id": 1,
@ -68,6 +70,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:8-3:9"]
}, {
"id": 2,
@ -79,6 +83,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:5-6:6", "9:3-9:4"]
}]
}

View File

@ -56,6 +56,8 @@ OUTPUT:
"definition_extent": "1:9-1:24",
"is_local": false,
"is_macro": true,
"is_global": false,
"is_member": false,
"uses": ["1:9-1:19", "6:3-6:13"]
}]
}

View File

@ -68,6 +68,8 @@ OUTPUT:
"definition_extent": "6:3-6:22",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:10-6:11"]
}]
}

View File

@ -71,6 +71,8 @@ OUTPUT:
"definition_extent": "6:3-6:22",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:8-6:9"]
}]
}

View File

@ -72,6 +72,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:8-6:9", "7:3-7:4"]
}]
}

View File

@ -52,6 +52,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:7-6:8"]
}]
}

View File

@ -71,6 +71,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:8-6:9", "7:3-7:4"]
}]
}

View File

@ -70,6 +70,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:25-6:27"]
}, {
"id": 1,
@ -81,6 +83,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:22-7:24"]
}, {
"id": 2,
@ -92,6 +96,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["10:18-10:23"]
}]
}

View File

@ -210,6 +210,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["15:43-15:44"]
}, {
"id": 1,
@ -221,6 +223,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["54:39-54:44"]
}]
}

View File

@ -48,6 +48,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["6:22-6:25"]
}]
}

View File

@ -31,6 +31,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["3:10-3:11"]
}]
}

View File

@ -64,6 +64,8 @@ OUTPUT:
"declaring_type": 2,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["5:16-5:17"]
}, {
"id": 1,
@ -76,6 +78,8 @@ OUTPUT:
"declaring_type": 2,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["6:19-6:20"]
}]
}

View File

@ -64,6 +64,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:16-5:17"]
}, {
"id": 1,
@ -75,6 +77,8 @@ OUTPUT:
"variable_type": 1,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:19-6:20"]
}]
}

View File

@ -61,6 +61,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:23-4:24"]
}, {
"id": 1,
@ -72,6 +74,8 @@ OUTPUT:
"variable_type": 1,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:42-4:43"]
}]
}

View File

@ -57,6 +57,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:15-4:16"]
}]
}

View File

@ -52,6 +52,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:16-3:18"]
}, {
"id": 1,
@ -63,6 +65,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:32-3:34"]
}, {
"id": 2,
@ -74,6 +78,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:8-4:10"]
}, {
"id": 3,
@ -85,6 +91,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:9-5:11"]
}, {
"id": 4,
@ -96,6 +104,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:15-6:17"]
}, {
"id": 5,
@ -107,6 +117,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:21-7:23"]
}]
}

View File

@ -31,6 +31,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["2:13-2:14"]
}]
}

View File

@ -61,6 +61,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:7-6:8"]
}, {
"id": 1,
@ -71,6 +73,8 @@ OUTPUT:
"variable_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["10:12-10:15"]
}]
}

View File

@ -97,6 +97,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["6:14-6:24", "10:10-10:20", "14:45-14:55"]
}, {
"id": 1,
@ -108,6 +110,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["7:7-7:16", "14:28-14:37"]
}, {
"id": 2,
@ -118,6 +122,8 @@ OUTPUT:
"definition_extent": "13:3-13:12",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["13:7-13:8", "14:10-14:11"]
}]
}

View File

@ -53,6 +53,8 @@ OUTPUT:
"definition_extent": "4:3-4:19",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:8-4:9", "5:3-5:4"]
}]
}

View File

@ -99,6 +99,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"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,
@ -110,6 +112,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:7-4:8", "17:12-17:13"]
}, {
"id": 2,
@ -121,6 +125,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"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"]
}]
}

View File

@ -70,6 +70,8 @@ OUTPUT:
"declaration": "2:14-2:15",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:14-2:15", "8:15-8:16"]
}]
}

View File

@ -54,6 +54,8 @@ OUTPUT:
"declaring_type": 1,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["4:28-4:38", "7:23-7:33"]
}]
}

View File

@ -33,6 +33,8 @@ OUTPUT:
"declaration": "1:12-1:13",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["1:12-1:13", "4:3-4:4"]
}]
}

View File

@ -32,6 +32,8 @@ OUTPUT:
"definition_extent": "1:10-1:15",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["1:14-1:15", "2:3-2:4"]
}]
}

View File

@ -33,6 +33,8 @@ OUTPUT:
"definition_extent": "2:3-2:8",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:7-2:8", "3:3-3:4"]
}]
}

View File

@ -38,6 +38,8 @@ OUTPUT:
"definition_extent": "2:3-2:8",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"]
}, {
"id": 1,
@ -48,6 +50,8 @@ OUTPUT:
"definition_extent": "5:5-5:10",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:9-5:10", "6:5-6:6"]
}]
}

View File

@ -38,6 +38,8 @@ OUTPUT:
"definition_extent": "1:10-1:15",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["1:14-1:15", "2:3-2:4", "7:3-7:4"]
}, {
"id": 1,
@ -48,6 +50,8 @@ OUTPUT:
"definition_extent": "4:5-4:10",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:9-4:10", "5:5-5:6"]
}]
}

View File

@ -35,6 +35,8 @@ OUTPUT:
"definition_extent": "1:1-1:13",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["1:12-1:13", "4:3-4:4"]
}]
}

View File

@ -33,6 +33,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:8-2:14"]
}]
}

View File

@ -36,6 +36,8 @@ OUTPUT:
"declaring_type": 0,
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:15-2:21", "4:11-4:17"]
}]
}

View File

@ -30,6 +30,8 @@ OUTPUT:
"declaration": "2:14-2:20",
"is_local": false,
"is_macro": false,
"is_global": false,
"is_member": true,
"uses": ["2:14-2:20"]
}]
}

View File

@ -50,6 +50,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:8-3:9"]
}, {
"id": 1,
@ -61,6 +63,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:9-4:10"]
}]
}

View File

@ -48,6 +48,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:8-4:9"]
}]
}

View File

@ -46,6 +46,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:15-3:17"]
}, {
"id": 1,
@ -57,6 +59,8 @@ OUTPUT:
"variable_type": 0,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["3:24-3:26"]
}]
}

View File

@ -38,6 +38,8 @@ OUTPUT:
"definition_extent": "2:3-2:8",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"]
}, {
"id": 1,
@ -48,6 +50,8 @@ OUTPUT:
"definition_extent": "5:5-5:10",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["5:9-5:10", "6:5-6:6"]
}]
}

View File

@ -32,6 +32,8 @@ OUTPUT:
"definition_extent": "1:10-1:15",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["1:14-1:15"]
}, {
"id": 1,
@ -42,6 +44,8 @@ OUTPUT:
"definition_extent": "2:5-2:14",
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["2:9-2:10"]
}]
}

View File

@ -15,6 +15,8 @@ OUTPUT:
"definition_extent": "1:1-1:22",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["1:12-1:18"]
}]
}

View File

@ -14,6 +14,8 @@ OUTPUT:
"declaration": "1:12-1:18",
"is_local": false,
"is_macro": false,
"is_global": true,
"is_member": false,
"uses": ["1:12-1:18"]
}]
}

View File

@ -68,6 +68,8 @@ OUTPUT:
"variable_type": 1,
"is_local": true,
"is_macro": false,
"is_global": false,
"is_member": false,
"uses": ["4:5-4:6"]
}]
}