From dced34dd5865c58540ddcf4dcbf29fb0d331c8c9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 24 Dec 2017 13:28:53 -0800 Subject: [PATCH] Reopen #174 --- src/indexer.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/indexer.cc b/src/indexer.cc index 2d6fc9f5..6ba06935 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1043,8 +1043,10 @@ ClangCursor::VisitResult TemplateVisitor(ClangCursor cursor, /* fallthrough */ // TODO Add other containers not covered by IsFunctionCallContext case CXCursor_ClassTemplate: - return ClangCursor::VisitResult::Continue; + break; case CXCursor_OverloadedDeclRef: { + break; // TODO data->db seems to be incorrect and may cause deadlock + unsigned num_overloaded = clang_getNumOverloadedDecls(cursor.cx_cursor); for (unsigned i = 0; i != num_overloaded; i++) { ClangCursor overloaded = clang_getOverloadedDecl(cursor.cx_cursor, i); @@ -1066,9 +1068,10 @@ ClangCursor::VisitResult TemplateVisitor(ClangCursor cursor, } } } - return ClangCursor::VisitResult::Continue; + break; } } + return ClangCursor::VisitResult::Continue; } } // namespace