[indexer] Make $cquery/base find correct overriden functions (#169)

This commit is contained in:
Fangrui Song 2017-12-20 23:18:48 -08:00 committed by GitHub
parent 6aefa9b114
commit ba1ca37326

View File

@ -1211,7 +1211,9 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) {
&num_overridden);
for (unsigned i = 0; i < num_overridden; ++i) {
ClangCursor parent = overridden[i];
ClangCursor parent =
ClangCursor(overridden[i])
.template_specialization_to_template_definition();
IndexFuncId parent_id = db->ToFuncId(parent.get_usr());
IndexFunc* parent_def = db->Resolve(parent_id);
func = db->Resolve(func_id); // ToFuncId invalidated func_def