Code lens improvements

- Hide declaration from list of refs on types and variables (so now they will show as '0 refs')
- Let the user hide code lens on parameter and function-local variables
This commit is contained in:
Jacob Dufault 2017-05-20 18:26:50 -07:00
parent 44153f94e8
commit d3bd31604e
71 changed files with 174 additions and 19 deletions

View File

@ -647,12 +647,13 @@ struct CommonCodeLensParams {
}; };
void AddCodeLens( void AddCodeLens(
const char* singular,
const char* plural,
CommonCodeLensParams* common, CommonCodeLensParams* common,
QueryLocation loc, QueryLocation loc,
const std::vector<QueryLocation>& uses, const std::vector<QueryLocation>& uses,
const char* singular, optional<QueryLocation> excluded,
const char* plural, bool force_display) {
bool exclude_loc = false) {
TCodeLens code_lens; TCodeLens code_lens;
optional<lsRange> range = GetLsRange(common->working_file, loc.range); optional<lsRange> range = GetLsRange(common->working_file, loc.range);
if (!range) if (!range)
@ -666,7 +667,7 @@ void AddCodeLens(
// Add unique uses. // Add unique uses.
std::unordered_set<lsLocation> unique_uses; std::unordered_set<lsLocation> unique_uses;
for (const QueryLocation& use : uses) { for (const QueryLocation& use : uses) {
if (exclude_loc && use == loc) if (excluded == use)
continue; continue;
optional<lsLocation> location = GetLsLocation(common->db, common->working_files, use); optional<lsLocation> location = GetLsLocation(common->db, common->working_files, use);
if (!location) if (!location)
@ -684,7 +685,7 @@ void AddCodeLens(
else else
code_lens.command->title += plural; code_lens.command->title += plural;
if (exclude_loc || unique_uses.size() > 0) if (force_display || unique_uses.size() > 0)
common->result->push_back(code_lens); common->result->push_back(code_lens);
} }
@ -2155,9 +2156,9 @@ bool QueryDbMainLoop(
optional<QueryType>& type = db->types[symbol.idx]; optional<QueryType>& type = db->types[symbol.idx];
if (!type) if (!type)
continue; continue;
AddCodeLens(&common, ref.loc.OffsetStartColumn(0), type->uses, "ref", "refs"); AddCodeLens("ref", "refs", &common, ref.loc.OffsetStartColumn(0), type->uses, type->def.definition_spelling, true /*force_display*/);
AddCodeLens(&common, ref.loc.OffsetStartColumn(1), ToQueryLocation(db, type->derived), "derived", "derived"); AddCodeLens("derived", "derived", &common, ref.loc.OffsetStartColumn(1), ToQueryLocation(db, type->derived), nullopt, false /*force_display*/);
AddCodeLens(&common, ref.loc.OffsetStartColumn(2), ToQueryLocation(db, type->instances), "var", "vars"); AddCodeLens("var", "vars", &common, ref.loc.OffsetStartColumn(2), ToQueryLocation(db, type->instances), nullopt, false /*force_display*/);
break; break;
} }
case SymbolKind::Func: { case SymbolKind::Func: {
@ -2170,18 +2171,17 @@ bool QueryDbMainLoop(
std::vector<QueryFuncRef> base_callers = GetCallersForAllBaseFunctions(db, *func); std::vector<QueryFuncRef> base_callers = GetCallersForAllBaseFunctions(db, *func);
std::vector<QueryFuncRef> derived_callers = GetCallersForAllDerivedFunctions(db, *func); std::vector<QueryFuncRef> derived_callers = GetCallersForAllDerivedFunctions(db, *func);
if (base_callers.empty() && derived_callers.empty()) { if (base_callers.empty() && derived_callers.empty()) {
// set exclude_loc to true to force the code lens to show up AddCodeLens("call", "calls", &common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, func->callers), nullopt, true /*force_display*/);
AddCodeLens(&common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, func->callers), "call", "calls", true /*exclude_loc*/);
} }
else { else {
AddCodeLens(&common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, func->callers), "direct call", "direct calls"); AddCodeLens("direct call", "direct calls", &common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, func->callers), nullopt, false /*force_display*/);
if (!base_callers.empty()) if (!base_callers.empty())
AddCodeLens(&common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, base_callers), "base call", "base calls"); AddCodeLens("base call", "base calls", &common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, base_callers), nullopt, false /*force_display*/);
if (!derived_callers.empty()) if (!derived_callers.empty())
AddCodeLens(&common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, derived_callers), "derived call", "derived calls"); AddCodeLens("derived call", "derived calls", &common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, derived_callers), nullopt, false /*force_display*/);
} }
AddCodeLens(&common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, func->derived), "derived", "derived"); AddCodeLens("derived", "derived", &common, ref.loc.OffsetStartColumn(offset++), ToQueryLocation(db, func->derived), nullopt, false /*force_display*/);
// "Base" // "Base"
optional<QueryLocation> base_loc = GetBaseDefinitionOrDeclarationSpelling(db, *func); optional<QueryLocation> base_loc = GetBaseDefinitionOrDeclarationSpelling(db, *func);
@ -2210,7 +2210,10 @@ bool QueryDbMainLoop(
if (!var) if (!var)
continue; continue;
AddCodeLens(&common, ref.loc.OffsetStartColumn(0), var->uses, "ref", "refs", true /*exclude_loc*/); if (var->def.is_local && !config->codeLensOnLocalVariables)
continue;
AddCodeLens("ref", "refs", &common, ref.loc.OffsetStartColumn(0), var->uses, var->def.definition_spelling, true /*force_display*/);
break; break;
} }
case SymbolKind::File: case SymbolKind::File:

View File

@ -130,6 +130,20 @@ IndexFile* ConsumeFile(IndexParam* param, CXFile file) {
return db; return db;
} }
bool IsLocalSemanticContainer(CXCursorKind kind) {
switch (kind) {
case CXCursor_Namespace:
case CXCursor_TranslationUnit:
case CXCursor_StructDecl:
case CXCursor_UnionDecl:
case CXCursor_ClassDecl:
case CXCursor_EnumDecl:
return false;
default:
return true;
}
}
} // namespace } // namespace
@ -806,6 +820,9 @@ void indexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) {
std::string type_name = clang::ToString(clang_getTypeSpelling(clang_getCursorType(decl->cursor))); std::string type_name = clang::ToString(clang_getTypeSpelling(clang_getCursorType(decl->cursor)));
var_def->def.detailed_name = type_name + " " + ns->QualifiedName(decl->semanticContainer, var_def->def.short_name); var_def->def.detailed_name = type_name + " " + ns->QualifiedName(decl->semanticContainer, var_def->def.short_name);
var_def->def.is_local = !decl->semanticContainer || IsLocalSemanticContainer(decl->semanticContainer->cursor.kind);
//} //}
if (decl->isDefinition) { if (decl->isDefinition) {

View File

@ -404,6 +404,9 @@ struct VarDefDefinitionData {
// Type which declares this one (ie, it is a method) // Type which declares this one (ie, it is a method)
optional<TypeId> declaring_type; optional<TypeId> declaring_type;
// Is this a "local" variable, ie, a parameter or function variable?
bool is_local = false;
VarDefDefinitionData() {} // For reflection. VarDefDefinitionData() {} // For reflection.
VarDefDefinitionData(const std::string& usr) : usr(usr) {} VarDefDefinitionData(const std::string& usr) : usr(usr) {}
@ -448,6 +451,7 @@ void Reflect(TVisitor& visitor,
REFLECT_MEMBER(definition_extent); REFLECT_MEMBER(definition_extent);
REFLECT_MEMBER(variable_type); REFLECT_MEMBER(variable_type);
REFLECT_MEMBER(declaring_type); REFLECT_MEMBER(declaring_type);
REFLECT_MEMBER(is_local);
REFLECT_MEMBER_END(); REFLECT_MEMBER_END();
} }

View File

@ -74,6 +74,9 @@ struct IndexerConfig {
// If false, the index will not be loaded from a previous run. // If false, the index will not be loaded from a previous run.
bool enableCacheRead = true; bool enableCacheRead = true;
// Enables code lens on parameter and function variables.
bool codeLensOnLocalVariables = true;
// Version of the client. // Version of the client.
int clientVersion = 0; int clientVersion = 0;
}; };
@ -86,6 +89,8 @@ MAKE_REFLECT_STRUCT(IndexerConfig,
indexerCount, indexerCount,
enableIndexing, enableCacheWrite, enableCacheRead, enableIndexing, enableCacheWrite, enableCacheRead,
codeLensOnLocalVariables,
clientVersion); clientVersion);

View File

@ -54,6 +54,7 @@ QueryVar::DefUpdate ToQuery(const IdMap& id_map, const IndexVar::Def& var) {
result.definition_extent = id_map.ToQuery(var.definition_extent); result.definition_extent = id_map.ToQuery(var.definition_extent);
result.variable_type = id_map.ToQuery(var.variable_type); result.variable_type = id_map.ToQuery(var.variable_type);
result.declaring_type = id_map.ToQuery(var.declaring_type); result.declaring_type = id_map.ToQuery(var.declaring_type);
result.is_local = var.is_local;
return result; return result;
} }

View File

@ -172,6 +172,7 @@ void Reflect(TVisitor& visitor, IndexVar& value) {
REFLECT_MEMBER2("definition_extent", value.def.definition_extent); REFLECT_MEMBER2("definition_extent", value.def.definition_extent);
REFLECT_MEMBER2("variable_type", value.def.variable_type); REFLECT_MEMBER2("variable_type", value.def.variable_type);
REFLECT_MEMBER2("declaring_type", value.def.declaring_type); REFLECT_MEMBER2("declaring_type", value.def.declaring_type);
REFLECT_MEMBER2("is_local", value.def.is_local);
REFLECT_MEMBER2("uses", value.uses); REFLECT_MEMBER2("uses", value.uses);
REFLECT_MEMBER_END(); REFLECT_MEMBER_END();
} }

View File

@ -48,6 +48,7 @@ OUTPUT:
"definition_spelling": "7:7-7:8", "definition_spelling": "7:7-7:8",
"definition_extent": "7:3-7:8", "definition_extent": "7:3-7:8",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["7:7-7:8"] "uses": ["7:7-7:8"]
}, { }, {
"id": 1, "id": 1,
@ -57,6 +58,7 @@ OUTPUT:
"definition_spelling": "8:8-8:10", "definition_spelling": "8:8-8:10",
"definition_extent": "8:3-8:22", "definition_extent": "8:3-8:22",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["8:8-8:10"] "uses": ["8:8-8:10"]
}] }]
} }

View File

@ -61,6 +61,7 @@ OUTPUT:
"definition_spelling": "8:7-8:8", "definition_spelling": "8:7-8:8",
"definition_extent": "8:3-8:8", "definition_extent": "8:3-8:8",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["8:7-8:8"] "uses": ["8:7-8:8"]
}] }]
} }

View File

@ -23,6 +23,7 @@ OUTPUT:
"definition_spelling": "2:7-2:10", "definition_spelling": "2:7-2:10",
"definition_extent": "2:3-2:10", "definition_extent": "2:3-2:10",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:7-2:10"] "uses": ["2:7-2:10"]
}] }]
} }

View File

@ -26,6 +26,7 @@ OUTPUT:
"definition_spelling": "5:10-5:13", "definition_spelling": "5:10-5:13",
"definition_extent": "5:1-5:13", "definition_extent": "5:1-5:13",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:14-2:17", "5:10-5:13"] "uses": ["2:14-2:17", "5:10-5:13"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"definition_extent": "2:3-2:4", "definition_extent": "2:3-2:4",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:3-2:4"] "uses": ["2:3-2:4"]
}, { }, {
"id": 1, "id": 1,
@ -35,6 +36,7 @@ OUTPUT:
"definition_extent": "3:3-3:9", "definition_extent": "3:3-3:9",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:3-3:4"] "uses": ["3:3-3:4"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"definition_extent": "2:3-2:4", "definition_extent": "2:3-2:4",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:3-2:4"] "uses": ["2:3-2:4"]
}, { }, {
"id": 1, "id": 1,
@ -35,6 +36,7 @@ OUTPUT:
"definition_extent": "3:3-3:9", "definition_extent": "3:3-3:9",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:3-3:4"] "uses": ["3:3-3:4"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"definition_extent": "2:3-2:4", "definition_extent": "2:3-2:4",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:3-2:4"] "uses": ["2:3-2:4"]
}, { }, {
"id": 1, "id": 1,
@ -35,6 +36,7 @@ OUTPUT:
"definition_extent": "3:3-3:9", "definition_extent": "3:3-3:9",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:3-3:4"] "uses": ["3:3-3:4"]
}] }]
} }

View File

@ -28,6 +28,7 @@ OUTPUT:
"definition_extent": "2:3-2:4", "definition_extent": "2:3-2:4",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:3-2:4", "6:14-6:15"] "uses": ["2:3-2:4", "6:14-6:15"]
}, { }, {
"id": 1, "id": 1,
@ -38,6 +39,7 @@ OUTPUT:
"definition_extent": "3:3-3:9", "definition_extent": "3:3-3:9",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:3-3:4"] "uses": ["3:3-3:4"]
}, { }, {
"id": 2, "id": 2,
@ -47,6 +49,7 @@ OUTPUT:
"definition_spelling": "6:5-6:6", "definition_spelling": "6:5-6:6",
"definition_extent": "6:1-6:15", "definition_extent": "6:1-6:15",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["6:5-6:6"] "uses": ["6:5-6:6"]
}] }]
} }

View File

@ -54,6 +54,7 @@ OUTPUT:
"definition_spelling": "9:15-9:16", "definition_spelling": "9:15-9:16",
"definition_extent": "9:1-9:16", "definition_extent": "9:1-9:16",
"variable_type": 3, "variable_type": 3,
"is_local": false,
"uses": ["9:15-9:16"] "uses": ["9:15-9:16"]
}, { }, {
"id": 1, "id": 1,
@ -63,6 +64,7 @@ OUTPUT:
"definition_spelling": "10:8-10:9", "definition_spelling": "10:8-10:9",
"definition_extent": "10:1-10:9", "definition_extent": "10:1-10:9",
"variable_type": 2, "variable_type": 2,
"is_local": false,
"uses": ["10:8-10:9"] "uses": ["10:8-10:9"]
}] }]
} }

View File

@ -22,6 +22,7 @@ OUTPUT: funky_enum.h
"definition_extent": "4:1-4:2", "definition_extent": "4:1-4:2",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["4:1-4:2"] "uses": ["4:1-4:2"]
}, { }, {
"id": 1, "id": 1,
@ -32,6 +33,7 @@ OUTPUT: funky_enum.h
"definition_extent": "5:1-5:2", "definition_extent": "5:1-5:2",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["5:1-5:2"] "uses": ["5:1-5:2"]
}, { }, {
"id": 2, "id": 2,
@ -42,6 +44,7 @@ OUTPUT: funky_enum.h
"definition_extent": "6:1-6:2", "definition_extent": "6:1-6:2",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["6:1-6:2"] "uses": ["6:1-6:2"]
}] }]
} }

View File

@ -69,6 +69,7 @@ OUTPUT: header.h
"definition_extent": "15:13-15:14", "definition_extent": "15:13-15:14",
"variable_type": 4, "variable_type": 4,
"declaring_type": 4, "declaring_type": 4,
"is_local": false,
"uses": ["15:13-15:14"] "uses": ["15:13-15:14"]
}, { }, {
"id": 1, "id": 1,
@ -79,6 +80,7 @@ OUTPUT: header.h
"definition_extent": "15:16-15:17", "definition_extent": "15:16-15:17",
"variable_type": 4, "variable_type": 4,
"declaring_type": 4, "declaring_type": 4,
"is_local": false,
"uses": ["15:16-15:17"] "uses": ["15:16-15:17"]
}, { }, {
"id": 2, "id": 2,
@ -89,6 +91,7 @@ OUTPUT: header.h
"definition_extent": "15:19-15:20", "definition_extent": "15:19-15:20",
"variable_type": 4, "variable_type": 4,
"declaring_type": 4, "declaring_type": 4,
"is_local": false,
"uses": ["15:19-15:20"] "uses": ["15:19-15:20"]
}, { }, {
"id": 3, "id": 3,
@ -97,6 +100,7 @@ OUTPUT: header.h
"detailed_name": "int Foo4", "detailed_name": "int Foo4",
"definition_spelling": "17:5-17:9", "definition_spelling": "17:5-17:9",
"definition_extent": "17:1-17:9", "definition_extent": "17:1-17:9",
"is_local": false,
"uses": ["17:5-17:9"] "uses": ["17:5-17:9"]
}, { }, {
"id": 4, "id": 4,
@ -105,6 +109,7 @@ OUTPUT: header.h
"detailed_name": "int Foo5", "detailed_name": "int Foo5",
"definition_spelling": "18:12-18:16", "definition_spelling": "18:12-18:16",
"definition_extent": "18:1-18:16", "definition_extent": "18:1-18:16",
"is_local": false,
"uses": ["18:12-18:16"] "uses": ["18:12-18:16"]
}] }]
} }

View File

@ -36,6 +36,7 @@ OUTPUT:
"detailed_name": "int ns::Foo", "detailed_name": "int ns::Foo",
"definition_spelling": "2:7-2:10", "definition_spelling": "2:7-2:10",
"definition_extent": "2:3-2:10", "definition_extent": "2:3-2:10",
"is_local": false,
"uses": ["2:7-2:10", "7:18-7:21", "9:10-9:13"] "uses": ["2:7-2:10", "7:18-7:21", "9:10-9:13"]
}, { }, {
"id": 1, "id": 1,
@ -44,6 +45,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "3:19-3:20", "definition_spelling": "3:19-3:20",
"definition_extent": "3:15-3:20", "definition_extent": "3:15-3:20",
"is_local": true,
"uses": ["3:19-3:20"] "uses": ["3:19-3:20"]
}] }]
} }

View File

@ -33,6 +33,7 @@ OUTPUT:
"definition_spelling": "4:7-4:8", "definition_spelling": "4:7-4:8",
"definition_extent": "4:3-4:8", "definition_extent": "4:3-4:8",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["4:7-4:8"] "uses": ["4:7-4:8"]
}, { }, {
"id": 1, "id": 1,
@ -42,6 +43,7 @@ OUTPUT:
"definition_spelling": "5:7-5:8", "definition_spelling": "5:7-5:8",
"definition_extent": "5:3-5:8", "definition_extent": "5:3-5:8",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["5:7-5:8"] "uses": ["5:7-5:8"]
}, { }, {
"id": 2, "id": 2,
@ -52,6 +54,7 @@ OUTPUT:
"definition_extent": "6:3-6:26", "definition_extent": "6:3-6:26",
"variable_type": 1, "variable_type": 1,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["6:20-6:26"] "uses": ["6:20-6:26"]
}] }]
} }

View File

@ -51,6 +51,7 @@ OUTPUT:
"definition_extent": "7:3-7:24", "definition_extent": "7:3-7:24",
"variable_type": 1, "variable_type": 1,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["7:15-7:24"] "uses": ["7:15-7:24"]
}, { }, {
"id": 1, "id": 1,
@ -61,6 +62,7 @@ OUTPUT:
"definition_extent": "8:3-8:23", "definition_extent": "8:3-8:23",
"variable_type": 1, "variable_type": 1,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["8:15-8:23"] "uses": ["8:15-8:23"]
}, { }, {
"id": 2, "id": 2,
@ -71,6 +73,7 @@ OUTPUT:
"definition_extent": "9:3-9:32", "definition_extent": "9:3-9:32",
"variable_type": 2, "variable_type": 2,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["9:28-9:32"] "uses": ["9:28-9:32"]
}] }]
} }

View File

@ -46,6 +46,7 @@ OUTPUT:
"definition_extent": "9:3-10:47", "definition_extent": "9:3-10:47",
"variable_type": 0, "variable_type": 0,
"declaring_type": 1, "declaring_type": 1,
"is_local": false,
"uses": ["6:30-6:40", "10:37-10:47", "13:26-13:36", "14:27-14:37"] "uses": ["6:30-6:40", "10:37-10:47", "13:26-13:36", "14:27-14:37"]
}, { }, {
"id": 1, "id": 1,
@ -54,6 +55,7 @@ OUTPUT:
"detailed_name": "int ns::Foo", "detailed_name": "int ns::Foo",
"definition_spelling": "13:7-13:10", "definition_spelling": "13:7-13:10",
"definition_extent": "13:3-13:36", "definition_extent": "13:3-13:36",
"is_local": false,
"uses": ["13:7-13:10"] "uses": ["13:7-13:10"]
}, { }, {
"id": 2, "id": 2,
@ -62,6 +64,7 @@ OUTPUT:
"detailed_name": "int ns::Foo2", "detailed_name": "int ns::Foo2",
"definition_spelling": "14:7-14:11", "definition_spelling": "14:7-14:11",
"definition_extent": "14:3-14:37", "definition_extent": "14:3-14:37",
"is_local": false,
"uses": ["14:7-14:11"] "uses": ["14:7-14:11"]
}] }]
} }

View File

@ -41,6 +41,7 @@ OUTPUT:
"detailed_name": "int ns::a", "detailed_name": "int ns::a",
"definition_spelling": "10:7-10:8", "definition_spelling": "10:7-10:8",
"definition_extent": "10:3-10:33", "definition_extent": "10:3-10:33",
"is_local": false,
"uses": ["10:7-10:8"] "uses": ["10:7-10:8"]
}, { }, {
"id": 1, "id": 1,
@ -49,6 +50,7 @@ OUTPUT:
"detailed_name": "int ns::b", "detailed_name": "int ns::b",
"definition_spelling": "11:7-11:8", "definition_spelling": "11:7-11:8",
"definition_extent": "11:3-11:35", "definition_extent": "11:3-11:35",
"is_local": false,
"uses": ["11:7-11:8"] "uses": ["11:7-11:8"]
}] }]
} }

View File

@ -27,6 +27,7 @@ OUTPUT:
"definition_spelling": "5:12-5:13", "definition_spelling": "5:12-5:13",
"definition_extent": "5:3-5:13", "definition_extent": "5:3-5:13",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["5:12-5:13"] "uses": ["5:12-5:13"]
}, { }, {
"id": 1, "id": 1,
@ -36,6 +37,7 @@ OUTPUT:
"definition_spelling": "6:13-6:14", "definition_spelling": "6:13-6:14",
"definition_extent": "6:3-6:14", "definition_extent": "6:3-6:14",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["6:13-6:14"] "uses": ["6:13-6:14"]
}] }]
} }

View File

@ -38,6 +38,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "8:5-8:6", "definition_spelling": "8:5-8:6",
"definition_extent": "8:1-8:24", "definition_extent": "8:1-8:24",
"is_local": false,
"uses": ["8:5-8:6"] "uses": ["8:5-8:6"]
}, { }, {
"id": 1, "id": 1,
@ -46,6 +47,7 @@ OUTPUT:
"detailed_name": "int b", "detailed_name": "int b",
"definition_spelling": "9:5-9:6", "definition_spelling": "9:5-9:6",
"definition_extent": "9:1-9:25", "definition_extent": "9:1-9:25",
"is_local": false,
"uses": ["9:5-9:6"] "uses": ["9:5-9:6"]
}] }]
} }

View File

@ -39,6 +39,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "9:5-9:6", "definition_spelling": "9:5-9:6",
"definition_extent": "9:1-9:31", "definition_extent": "9:1-9:31",
"is_local": false,
"uses": ["9:5-9:6"] "uses": ["9:5-9:6"]
}, { }, {
"id": 1, "id": 1,
@ -47,6 +48,7 @@ OUTPUT:
"detailed_name": "int b", "detailed_name": "int b",
"definition_spelling": "10:5-10:6", "definition_spelling": "10:5-10:6",
"definition_extent": "10:1-10:33", "definition_extent": "10:1-10:33",
"is_local": false,
"uses": ["10:5-10:6"] "uses": ["10:5-10:6"]
}] }]
} }

View File

@ -73,6 +73,7 @@ OUTPUT:
"definition_spelling": "9:15-9:16", "definition_spelling": "9:15-9:16",
"definition_extent": "9:1-9:16", "definition_extent": "9:1-9:16",
"variable_type": 3, "variable_type": 3,
"is_local": false,
"uses": ["9:15-9:16"] "uses": ["9:15-9:16"]
}, { }, {
"id": 1, "id": 1,
@ -82,6 +83,7 @@ OUTPUT:
"definition_spelling": "10:15-10:16", "definition_spelling": "10:15-10:16",
"definition_extent": "10:1-10:16", "definition_extent": "10:1-10:16",
"variable_type": 3, "variable_type": 3,
"is_local": false,
"uses": ["10:15-10:16"] "uses": ["10:15-10:16"]
}] }]
} }

View File

@ -24,6 +24,7 @@ OUTPUT:
"short_name": "var", "short_name": "var",
"detailed_name": "const int Foo::var", "detailed_name": "const int Foo::var",
"declaration": "3:24-3:27", "declaration": "3:24-3:27",
"is_local": false,
"uses": ["3:24-3:27", "6:19-6:22", "7:20-7:23"] "uses": ["3:24-3:27", "6:19-6:22", "7:20-7:23"]
}, { }, {
"id": 1, "id": 1,
@ -32,6 +33,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "6:5-6:6", "definition_spelling": "6:5-6:6",
"definition_extent": "6:1-6:22", "definition_extent": "6:1-6:22",
"is_local": false,
"uses": ["6:5-6:6"] "uses": ["6:5-6:6"]
}, { }, {
"id": 2, "id": 2,
@ -40,6 +42,7 @@ OUTPUT:
"detailed_name": "int b", "detailed_name": "int b",
"definition_spelling": "7:5-7:6", "definition_spelling": "7:5-7:6",
"definition_extent": "7:1-7:23", "definition_extent": "7:1-7:23",
"is_local": false,
"uses": ["7:5-7:6"] "uses": ["7:5-7:6"]
}] }]
} }

View File

@ -28,6 +28,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "6:5-6:6", "definition_spelling": "6:5-6:6",
"definition_extent": "6:1-6:19", "definition_extent": "6:1-6:19",
"is_local": false,
"uses": ["6:5-6:6"] "uses": ["6:5-6:6"]
}, { }, {
"id": 1, "id": 1,
@ -36,6 +37,7 @@ OUTPUT:
"detailed_name": "int b", "detailed_name": "int b",
"definition_spelling": "7:5-7:6", "definition_spelling": "7:5-7:6",
"definition_extent": "7:1-7:20", "definition_extent": "7:1-7:20",
"is_local": false,
"uses": ["7:5-7:6"] "uses": ["7:5-7:6"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"definition_spelling": "4:10-4:11", "definition_spelling": "4:10-4:11",
"definition_extent": "4:1-4:11", "definition_extent": "4:1-4:11",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["4:10-4:11"] "uses": ["4:10-4:11"]
}, { }, {
"id": 1, "id": 1,
@ -34,6 +35,7 @@ OUTPUT:
"definition_spelling": "5:11-5:12", "definition_spelling": "5:11-5:12",
"definition_extent": "5:1-5:12", "definition_extent": "5:1-5:12",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["5:11-5:12"] "uses": ["5:11-5:12"]
}] }]
} }

View File

@ -59,6 +59,7 @@ OUTPUT:
"detailed_name": "T var", "detailed_name": "T var",
"definition_spelling": "5:3-5:6", "definition_spelling": "5:3-5:6",
"definition_extent": "5:1-5:10", "definition_extent": "5:1-5:10",
"is_local": false,
"uses": ["5:3-5:6", "7:9-7:12", "8:9-8:12"] "uses": ["5:3-5:6", "7:9-7:12", "8:9-8:12"]
}, { }, {
"id": 1, "id": 1,
@ -67,6 +68,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "7:5-7:6", "definition_spelling": "7:5-7:6",
"definition_extent": "7:1-7:15", "definition_extent": "7:1-7:15",
"is_local": false,
"uses": ["7:5-7:6"] "uses": ["7:5-7:6"]
}, { }, {
"id": 2, "id": 2,
@ -75,6 +77,7 @@ OUTPUT:
"detailed_name": "int b", "detailed_name": "int b",
"definition_spelling": "8:5-8:6", "definition_spelling": "8:5-8:6",
"definition_extent": "8:1-8:15", "definition_extent": "8:1-8:15",
"is_local": false,
"uses": ["8:5-8:6"] "uses": ["8:5-8:6"]
}] }]
} }

View File

@ -33,6 +33,7 @@ OUTPUT:
"definition_spelling": "2:18-2:19", "definition_spelling": "2:18-2:19",
"definition_extent": "2:12-2:19", "definition_extent": "2:12-2:19",
"declaring_type": 1, "declaring_type": 1,
"is_local": false,
"uses": ["2:18-2:19"] "uses": ["2:18-2:19"]
}, { }, {
"id": 1, "id": 1,
@ -42,6 +43,7 @@ OUTPUT:
"definition_spelling": "2:21-2:22", "definition_spelling": "2:21-2:22",
"definition_extent": "2:12-2:22", "definition_extent": "2:12-2:22",
"declaring_type": 1, "declaring_type": 1,
"is_local": false,
"uses": ["2:21-2:22"] "uses": ["2:21-2:22"]
}, { }, {
"id": 2, "id": 2,
@ -51,6 +53,7 @@ OUTPUT:
"definition_spelling": "2:24-2:25", "definition_spelling": "2:24-2:25",
"definition_extent": "2:12-2:25", "definition_extent": "2:12-2:25",
"declaring_type": 1, "declaring_type": 1,
"is_local": false,
"uses": ["2:24-2:25"] "uses": ["2:24-2:25"]
}, { }, {
"id": 3, "id": 3,
@ -60,6 +63,7 @@ OUTPUT:
"definition_spelling": "3:9-3:10", "definition_spelling": "3:9-3:10",
"definition_extent": "3:3-3:13", "definition_extent": "3:3-3:13",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:9-3:10"] "uses": ["3:9-3:10"]
}] }]
} }

View File

@ -24,6 +24,7 @@ OUTPUT:
"definition_spelling": "2:7-2:8", "definition_spelling": "2:7-2:8",
"definition_extent": "2:3-2:8", "definition_extent": "2:3-2:8",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:7-2:8"] "uses": ["2:7-2:8"]
}, { }, {
"id": 1, "id": 1,
@ -33,6 +34,7 @@ OUTPUT:
"definition_spelling": "3:8-3:9", "definition_spelling": "3:8-3:9",
"definition_extent": "3:3-3:9", "definition_extent": "3:3-3:9",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:8-3:9"] "uses": ["3:8-3:9"]
}] }]
} }

View File

@ -41,6 +41,7 @@ OUTPUT:
"definition_spelling": "2:7-2:8", "definition_spelling": "2:7-2:8",
"definition_extent": "2:3-2:12", "definition_extent": "2:3-2:12",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:7-2:8", "9:5-9:6"] "uses": ["2:7-2:8", "9:5-9:6"]
}, { }, {
"id": 1, "id": 1,
@ -50,6 +51,7 @@ OUTPUT:
"definition_spelling": "3:8-3:9", "definition_spelling": "3:8-3:9",
"definition_extent": "3:3-3:13", "definition_extent": "3:3-3:13",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["3:8-3:9"] "uses": ["3:8-3:9"]
}, { }, {
"id": 2, "id": 2,
@ -59,6 +61,7 @@ OUTPUT:
"definition_spelling": "6:5-6:6", "definition_spelling": "6:5-6:6",
"definition_extent": "6:1-6:6", "definition_extent": "6:1-6:6",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["6:5-6:6", "9:3-9:4"] "uses": ["6:5-6:6", "9:3-9:4"]
}] }]
} }

View File

@ -42,6 +42,7 @@ OUTPUT:
"detailed_name": "void (*)() x", "detailed_name": "void (*)() x",
"definition_spelling": "6:8-6:9", "definition_spelling": "6:8-6:9",
"definition_extent": "6:3-6:17", "definition_extent": "6:3-6:17",
"is_local": true,
"uses": ["6:8-6:9"] "uses": ["6:8-6:9"]
}] }]
} }

View File

@ -44,6 +44,7 @@ OUTPUT:
"detailed_name": "void (Foo::*)() x", "detailed_name": "void (Foo::*)() x",
"definition_spelling": "6:8-6:9", "definition_spelling": "6:8-6:9",
"definition_extent": "6:3-6:22", "definition_extent": "6:3-6:22",
"is_local": true,
"uses": ["6:8-6:9"] "uses": ["6:8-6:9"]
}] }]
} }

View File

@ -46,6 +46,7 @@ OUTPUT:
"definition_spelling": "6:8-6:9", "definition_spelling": "6:8-6:9",
"definition_extent": "6:3-6:19", "definition_extent": "6:3-6:19",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["6:8-6:9", "7:3-7:4"] "uses": ["6:8-6:9", "7:3-7:4"]
}] }]
} }

View File

@ -36,6 +36,7 @@ OUTPUT:
"definition_spelling": "6:7-6:8", "definition_spelling": "6:7-6:8",
"definition_extent": "6:3-6:19", "definition_extent": "6:3-6:19",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["6:7-6:8"] "uses": ["6:7-6:8"]
}] }]
} }

View File

@ -45,6 +45,7 @@ OUTPUT:
"definition_spelling": "6:8-6:9", "definition_spelling": "6:8-6:9",
"definition_extent": "6:3-6:19", "definition_extent": "6:3-6:19",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["6:8-6:9", "7:3-7:4"] "uses": ["6:8-6:9", "7:3-7:4"]
}] }]
} }

View File

@ -43,6 +43,7 @@ OUTPUT:
"definition_spelling": "6:25-6:27", "definition_spelling": "6:25-6:27",
"definition_extent": "6:1-6:27", "definition_extent": "6:1-6:27",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["6:25-6:27"] "uses": ["6:25-6:27"]
}, { }, {
"id": 1, "id": 1,
@ -52,6 +53,7 @@ OUTPUT:
"definition_spelling": "7:22-7:24", "definition_spelling": "7:22-7:24",
"definition_extent": "7:1-7:24", "definition_extent": "7:1-7:24",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["7:22-7:24"] "uses": ["7:22-7:24"]
}, { }, {
"id": 2, "id": 2,
@ -61,6 +63,7 @@ OUTPUT:
"definition_spelling": "10:18-10:23", "definition_spelling": "10:18-10:23",
"definition_extent": "10:3-10:23", "definition_extent": "10:3-10:23",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["10:18-10:23"] "uses": ["10:18-10:23"]
}] }]
} }

View File

@ -143,6 +143,7 @@ OUTPUT:
"detailed_name": "unique_ptr<unique_ptr<S1, S2>, S2> f", "detailed_name": "unique_ptr<unique_ptr<S1, S2>, S2> f",
"declaration": "15:43-15:44", "declaration": "15:43-15:44",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["15:43-15:44"] "uses": ["15:43-15:44"]
}, { }, {
"id": 1, "id": 1,
@ -152,6 +153,7 @@ OUTPUT:
"definition_spelling": "54:39-54:44", "definition_spelling": "54:39-54:44",
"definition_extent": "54:3-54:44", "definition_extent": "54:3-54:44",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["54:39-54:44"] "uses": ["54:39-54:44"]
}] }]
} }

View File

@ -30,6 +30,7 @@ OUTPUT:
"definition_spelling": "6:22-6:25", "definition_spelling": "6:22-6:25",
"definition_extent": "6:1-6:25", "definition_extent": "6:1-6:25",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["6:22-6:25"] "uses": ["6:22-6:25"]
}] }]
} }

View File

@ -21,6 +21,7 @@ OUTPUT:
"detailed_name": "T t", "detailed_name": "T t",
"declaration": "3:10-3:11", "declaration": "3:10-3:11",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["3:10-3:11"] "uses": ["3:10-3:11"]
}] }]
} }

View File

@ -42,6 +42,7 @@ OUTPUT:
"definition_extent": "5:3-5:17", "definition_extent": "5:3-5:17",
"variable_type": 0, "variable_type": 0,
"declaring_type": 2, "declaring_type": 2,
"is_local": false,
"uses": ["5:16-5:17"] "uses": ["5:16-5:17"]
}, { }, {
"id": 1, "id": 1,
@ -52,6 +53,7 @@ OUTPUT:
"definition_extent": "6:3-6:20", "definition_extent": "6:3-6:20",
"variable_type": 1, "variable_type": 1,
"declaring_type": 2, "declaring_type": 2,
"is_local": false,
"uses": ["6:19-6:20"] "uses": ["6:19-6:20"]
}] }]
} }

View File

@ -40,6 +40,7 @@ OUTPUT:
"definition_spelling": "5:16-5:17", "definition_spelling": "5:16-5:17",
"definition_extent": "5:3-5:17", "definition_extent": "5:3-5:17",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["5:16-5:17"] "uses": ["5:16-5:17"]
}, { }, {
"id": 1, "id": 1,
@ -49,6 +50,7 @@ OUTPUT:
"definition_spelling": "6:19-6:20", "definition_spelling": "6:19-6:20",
"definition_extent": "6:3-6:20", "definition_extent": "6:3-6:20",
"variable_type": 1, "variable_type": 1,
"is_local": true,
"uses": ["6:19-6:20"] "uses": ["6:19-6:20"]
}] }]
} }

View File

@ -37,6 +37,7 @@ OUTPUT:
"definition_spelling": "4:23-4:24", "definition_spelling": "4:23-4:24",
"definition_extent": "4:10-4:24", "definition_extent": "4:10-4:24",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["4:23-4:24"] "uses": ["4:23-4:24"]
}, { }, {
"id": 1, "id": 1,
@ -46,6 +47,7 @@ OUTPUT:
"definition_spelling": "4:42-4:43", "definition_spelling": "4:42-4:43",
"definition_extent": "4:26-4:43", "definition_extent": "4:26-4:43",
"variable_type": 1, "variable_type": 1,
"is_local": true,
"uses": ["4:42-4:43"] "uses": ["4:42-4:43"]
}] }]
} }

View File

@ -34,6 +34,7 @@ OUTPUT:
"definition_spelling": "4:15-4:16", "definition_spelling": "4:15-4:16",
"definition_extent": "4:10-4:16", "definition_extent": "4:10-4:16",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["4:15-4:16"] "uses": ["4:15-4:16"]
}] }]
} }

View File

@ -35,6 +35,7 @@ OUTPUT:
"definition_spelling": "3:16-3:18", "definition_spelling": "3:16-3:18",
"definition_extent": "3:10-3:18", "definition_extent": "3:10-3:18",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["3:16-3:18"] "uses": ["3:16-3:18"]
}, { }, {
"id": 1, "id": 1,
@ -44,6 +45,7 @@ OUTPUT:
"definition_spelling": "3:32-3:34", "definition_spelling": "3:32-3:34",
"definition_extent": "3:20-3:34", "definition_extent": "3:20-3:34",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["3:32-3:34"] "uses": ["3:32-3:34"]
}, { }, {
"id": 2, "id": 2,
@ -53,6 +55,7 @@ OUTPUT:
"definition_spelling": "4:8-4:10", "definition_spelling": "4:8-4:10",
"definition_extent": "4:3-4:10", "definition_extent": "4:3-4:10",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["4:8-4:10"] "uses": ["4:8-4:10"]
}, { }, {
"id": 3, "id": 3,
@ -62,6 +65,7 @@ OUTPUT:
"definition_spelling": "5:9-5:11", "definition_spelling": "5:9-5:11",
"definition_extent": "5:3-5:11", "definition_extent": "5:3-5:11",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["5:9-5:11"] "uses": ["5:9-5:11"]
}, { }, {
"id": 4, "id": 4,
@ -71,6 +75,7 @@ OUTPUT:
"definition_spelling": "6:15-6:17", "definition_spelling": "6:15-6:17",
"definition_extent": "6:3-6:17", "definition_extent": "6:3-6:17",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["6:15-6:17"] "uses": ["6:15-6:17"]
}, { }, {
"id": 5, "id": 5,
@ -80,6 +85,7 @@ OUTPUT:
"definition_spelling": "7:21-7:23", "definition_spelling": "7:21-7:23",
"definition_extent": "7:3-7:23", "definition_extent": "7:3-7:23",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["7:21-7:23"] "uses": ["7:21-7:23"]
}] }]
} }

View File

@ -17,6 +17,7 @@ OUTPUT:
"definition_spelling": "2:13-2:14", "definition_spelling": "2:13-2:14",
"definition_extent": "2:1-2:14", "definition_extent": "2:1-2:14",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["2:13-2:14"] "uses": ["2:13-2:14"]
}] }]
} }

View File

@ -41,6 +41,7 @@ OUTPUT:
"definition_spelling": "6:7-6:8", "definition_spelling": "6:7-6:8",
"definition_extent": "6:3-6:8", "definition_extent": "6:3-6:8",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["6:7-6:8"] "uses": ["6:7-6:8"]
}, { }, {
"id": 1, "id": 1,
@ -49,6 +50,7 @@ OUTPUT:
"detailed_name": "Foo foo", "detailed_name": "Foo foo",
"declaration": "10:12-10:15", "declaration": "10:12-10:15",
"variable_type": 0, "variable_type": 0,
"is_local": false,
"uses": ["10:12-10:15"] "uses": ["10:12-10:15"]
}] }]
} }

View File

@ -59,6 +59,7 @@ OUTPUT:
"definition_spelling": "10:10-10:20", "definition_spelling": "10:10-10:20",
"definition_extent": "10:1-10:24", "definition_extent": "10:1-10:24",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["6:14-6:24", "10:10-10:20", "14:45-14:55"] "uses": ["6:14-6:24", "10:10-10:20", "14:45-14:55"]
}, { }, {
"id": 1, "id": 1,
@ -68,6 +69,7 @@ OUTPUT:
"definition_spelling": "7:7-7:16", "definition_spelling": "7:7-7:16",
"definition_extent": "7:3-7:16", "definition_extent": "7:3-7:16",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["7:7-7:16", "14:28-14:37"] "uses": ["7:7-7:16", "14:28-14:37"]
}, { }, {
"id": 2, "id": 2,
@ -76,6 +78,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "13:7-13:8", "definition_spelling": "13:7-13:8",
"definition_extent": "13:3-13:12", "definition_extent": "13:3-13:12",
"is_local": true,
"uses": ["13:7-13:8", "14:10-14:11"] "uses": ["13:7-13:8", "14:10-14:11"]
}] }]
} }

View File

@ -34,6 +34,7 @@ OUTPUT:
"detailed_name": "void (*)() x", "detailed_name": "void (*)() x",
"definition_spelling": "4:8-4:9", "definition_spelling": "4:8-4:9",
"definition_extent": "4:3-4:19", "definition_extent": "4:3-4:19",
"is_local": true,
"uses": ["4:8-4:9", "5:3-5:4"] "uses": ["4:8-4:9", "5:3-5:4"]
}] }]
} }

View File

@ -62,6 +62,7 @@ OUTPUT:
"definition_spelling": "3:7-3:8", "definition_spelling": "3:7-3:8",
"definition_extent": "3:3-3:8", "definition_extent": "3:3-3:8",
"declaring_type": 0, "declaring_type": 0,
"is_local": 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"] "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, "id": 1,
@ -71,6 +72,7 @@ OUTPUT:
"definition_spelling": "4:7-4:8", "definition_spelling": "4:7-4:8",
"definition_extent": "4:3-4:8", "definition_extent": "4:3-4:8",
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["4:7-4:8", "17:12-17:13"] "uses": ["4:7-4:8", "17:12-17:13"]
}, { }, {
"id": 2, "id": 2,
@ -80,6 +82,7 @@ OUTPUT:
"definition_spelling": "11:7-11:8", "definition_spelling": "11:7-11:8",
"definition_extent": "11:3-11:8", "definition_extent": "11:3-11:8",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"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"] "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

@ -42,6 +42,7 @@ OUTPUT:
"short_name": "x", "short_name": "x",
"detailed_name": "int Foo::x", "detailed_name": "int Foo::x",
"declaration": "2:14-2:15", "declaration": "2:14-2:15",
"is_local": false,
"uses": ["2:14-2:15", "8:15-8:16"] "uses": ["2:14-2:15", "8:15-8:16"]
}] }]
} }

View File

@ -39,6 +39,7 @@ OUTPUT:
"definition_extent": "7:1-7:33", "definition_extent": "7:1-7:33",
"variable_type": 0, "variable_type": 0,
"declaring_type": 1, "declaring_type": 1,
"is_local": false,
"uses": ["4:28-4:38", "7:23-7:33"] "uses": ["4:28-4:38", "7:23-7:33"]
}] }]
} }

View File

@ -20,6 +20,7 @@ OUTPUT:
"short_name": "a", "short_name": "a",
"detailed_name": "int a", "detailed_name": "int a",
"declaration": "1:12-1:13", "declaration": "1:12-1:13",
"is_local": false,
"uses": ["1:12-1:13", "4:3-4:4"] "uses": ["1:12-1:13", "4:3-4:4"]
}] }]
} }

View File

@ -19,6 +19,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "1:14-1:15", "definition_spelling": "1:14-1:15",
"definition_extent": "1:10-1:15", "definition_extent": "1:10-1:15",
"is_local": true,
"uses": ["1:14-1:15", "2:3-2:4"] "uses": ["1:14-1:15", "2:3-2:4"]
}] }]
} }

View File

@ -20,6 +20,7 @@ OUTPUT:
"detailed_name": "int x", "detailed_name": "int x",
"definition_spelling": "2:7-2:8", "definition_spelling": "2:7-2:8",
"definition_extent": "2:3-2:8", "definition_extent": "2:3-2:8",
"is_local": true,
"uses": ["2:7-2:8", "3:3-3:4"] "uses": ["2:7-2:8", "3:3-3:4"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "2:7-2:8", "definition_spelling": "2:7-2:8",
"definition_extent": "2:3-2:8", "definition_extent": "2:3-2:8",
"is_local": true,
"uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"] "uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"]
}, { }, {
"id": 1, "id": 1,
@ -33,6 +34,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "5:9-5:10", "definition_spelling": "5:9-5:10",
"definition_extent": "5:5-5:10", "definition_extent": "5:5-5:10",
"is_local": true,
"uses": ["5:9-5:10", "6:5-6:6"] "uses": ["5:9-5:10", "6:5-6:6"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "1:14-1:15", "definition_spelling": "1:14-1:15",
"definition_extent": "1:10-1:15", "definition_extent": "1:10-1:15",
"is_local": true,
"uses": ["1:14-1:15", "2:3-2:4", "7:3-7:4"] "uses": ["1:14-1:15", "2:3-2:4", "7:3-7:4"]
}, { }, {
"id": 1, "id": 1,
@ -33,6 +34,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "4:9-4:10", "definition_spelling": "4:9-4:10",
"definition_extent": "4:5-4:10", "definition_extent": "4:5-4:10",
"is_local": true,
"uses": ["4:9-4:10", "5:5-5:6"] "uses": ["4:9-4:10", "5:5-5:6"]
}] }]
} }

View File

@ -22,6 +22,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "1:12-1:13", "definition_spelling": "1:12-1:13",
"definition_extent": "1:1-1:13", "definition_extent": "1:1-1:13",
"is_local": false,
"uses": ["1:12-1:13", "4:3-4:4"] "uses": ["1:12-1:13", "4:3-4:4"]
}] }]
} }

View File

@ -24,6 +24,7 @@ OUTPUT:
"definition_extent": "2:3-2:14", "definition_extent": "2:3-2:14",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:8-2:14"] "uses": ["2:8-2:14"]
}] }]
} }

View File

@ -27,6 +27,7 @@ OUTPUT:
"definition_extent": "4:1-4:27", "definition_extent": "4:1-4:27",
"variable_type": 0, "variable_type": 0,
"declaring_type": 0, "declaring_type": 0,
"is_local": false,
"uses": ["2:15-2:21", "4:11-4:17"] "uses": ["2:15-2:21", "4:11-4:17"]
}] }]
} }

View File

@ -19,6 +19,7 @@ OUTPUT:
"short_name": "member", "short_name": "member",
"detailed_name": "int Foo::member", "detailed_name": "int Foo::member",
"declaration": "2:14-2:20", "declaration": "2:14-2:20",
"is_local": false,
"uses": ["2:14-2:20"] "uses": ["2:14-2:20"]
}] }]
} }

View File

@ -33,6 +33,7 @@ OUTPUT:
"definition_spelling": "3:8-3:9", "definition_spelling": "3:8-3:9",
"definition_extent": "3:3-3:21", "definition_extent": "3:3-3:21",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["3:8-3:9"] "uses": ["3:8-3:9"]
}, { }, {
"id": 1, "id": 1,
@ -42,6 +43,7 @@ OUTPUT:
"definition_spelling": "4:9-4:10", "definition_spelling": "4:9-4:10",
"definition_extent": "4:3-4:22", "definition_extent": "4:3-4:22",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["4:9-4:10"] "uses": ["4:9-4:10"]
}] }]
} }

View File

@ -29,6 +29,7 @@ OUTPUT:
"definition_spelling": "4:8-4:9", "definition_spelling": "4:8-4:9",
"definition_extent": "4:3-4:9", "definition_extent": "4:3-4:9",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["4:8-4:9"] "uses": ["4:8-4:9"]
}] }]
} }

View File

@ -27,6 +27,7 @@ OUTPUT:
"definition_spelling": "3:15-3:17", "definition_spelling": "3:15-3:17",
"definition_extent": "3:10-3:17", "definition_extent": "3:10-3:17",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["3:15-3:17"] "uses": ["3:15-3:17"]
}, { }, {
"id": 1, "id": 1,
@ -36,6 +37,7 @@ OUTPUT:
"definition_spelling": "3:24-3:26", "definition_spelling": "3:24-3:26",
"definition_extent": "3:19-3:26", "definition_extent": "3:19-3:26",
"variable_type": 0, "variable_type": 0,
"is_local": true,
"uses": ["3:24-3:26"] "uses": ["3:24-3:26"]
}] }]
} }

View File

@ -25,6 +25,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "2:7-2:8", "definition_spelling": "2:7-2:8",
"definition_extent": "2:3-2:8", "definition_extent": "2:3-2:8",
"is_local": true,
"uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"] "uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"]
}, { }, {
"id": 1, "id": 1,
@ -33,6 +34,7 @@ OUTPUT:
"detailed_name": "int a", "detailed_name": "int a",
"definition_spelling": "5:9-5:10", "definition_spelling": "5:9-5:10",
"definition_extent": "5:5-5:10", "definition_extent": "5:5-5:10",
"is_local": true,
"uses": ["5:9-5:10", "6:5-6:6"] "uses": ["5:9-5:10", "6:5-6:6"]
}] }]
} }

View File

@ -19,6 +19,7 @@ OUTPUT:
"detailed_name": "int p", "detailed_name": "int p",
"definition_spelling": "1:14-1:15", "definition_spelling": "1:14-1:15",
"definition_extent": "1:10-1:15", "definition_extent": "1:10-1:15",
"is_local": true,
"uses": ["1:14-1:15"] "uses": ["1:14-1:15"]
}, { }, {
"id": 1, "id": 1,
@ -27,6 +28,7 @@ OUTPUT:
"detailed_name": "int p", "detailed_name": "int p",
"definition_spelling": "2:7-2:8", "definition_spelling": "2:7-2:8",
"definition_extent": "2:3-2:8", "definition_extent": "2:3-2:8",
"is_local": true,
"uses": ["2:7-2:8"] "uses": ["2:7-2:8"]
}] }]
} }

View File

@ -9,6 +9,7 @@ OUTPUT:
"detailed_name": "int global", "detailed_name": "int global",
"definition_spelling": "1:12-1:18", "definition_spelling": "1:12-1:18",
"definition_extent": "1:1-1:22", "definition_extent": "1:1-1:22",
"is_local": false,
"uses": ["1:12-1:18"] "uses": ["1:12-1:18"]
}] }]
} }

View File

@ -8,6 +8,7 @@ OUTPUT:
"short_name": "global", "short_name": "global",
"detailed_name": "int global", "detailed_name": "int global",
"declaration": "1:12-1:18", "declaration": "1:12-1:18",
"is_local": false,
"uses": ["1:12-1:18"] "uses": ["1:12-1:18"]
}] }]
} }

View File

@ -44,6 +44,7 @@ OUTPUT:
"definition_spelling": "4:5-4:6", "definition_spelling": "4:5-4:6",
"definition_extent": "4:3-4:6", "definition_extent": "4:3-4:6",
"variable_type": 1, "variable_type": 1,
"is_local": true,
"uses": ["4:5-4:6"] "uses": ["4:5-4:6"]
}] }]
} }