diff --git a/src/indexer.cc b/src/indexer.cc index 5f0dcaed..b1166a73 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1066,6 +1066,15 @@ ClangCursor::VisitResult TemplateVisitor(ClangCursor cursor, } break; } + case CXCursor_TypeRef: { + ClangCursor ref_cursor = clang_getCursorReferenced(cursor.cx_cursor); + if (ref_cursor.get_kind() == CXCursor_TemplateTypeParameter) { + IndexType* ref_index = + data->db->Resolve(data->db->ToTypeId(ref_cursor.get_usr())); + UniqueAdd(ref_index->uses, ResolveSpelling(cursor.cx_cursor)); + } + break; + } } return ClangCursor::VisitResult::Continue; }