From c6dead848e044077dac9ad9f314bd7c7450ab79b Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Sun, 16 Apr 2017 16:57:31 -0700 Subject: [PATCH] Remove some TODOs, reduce output sleep from 10ms to 2ms --- src/command_line.cc | 95 ++++++++++++++++++++++----------------------- src/indexer.cc | 2 - 2 files changed, 47 insertions(+), 50 deletions(-) diff --git a/src/command_line.cc b/src/command_line.cc index 6488e655..6bfbd79e 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -1749,6 +1749,52 @@ void LanguageServerStdinLoop() { } } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + void LanguageServerMainLoop() { IpcManager* ipc = IpcManager::instance(); @@ -1778,53 +1824,6 @@ void LanguageServerMainLoop() { } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool IsQueryDbProcessRunning() { if (!kUseMultipleProcesses) return false; @@ -1875,7 +1874,7 @@ void LanguageServerMain() { new std::thread(&LanguageServerStdinLoop); while (true) { LanguageServerMainLoop(); - std::this_thread::sleep_for(std::chrono::milliseconds(10)); + std::this_thread::sleep_for(std::chrono::milliseconds(2)); } } diff --git a/src/indexer.cc b/src/indexer.cc index 0a1503cf..89243454 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -724,13 +724,11 @@ bool AreEqualLocations(CXIdxLoc loc, CXCursor cursor) { void indexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { - // TODO: allow user to configure if they want STL index. if (!kIndexStdDeclarations && clang_Location_isInSystemHeader(clang_indexLoc_getCXSourceLocation(decl->loc))) return; assert(AreEqualLocations(decl->loc, decl->cursor)); - // TODO: Use clang_getFileUniqueID CXFile file; clang_getSpellingLocation(clang_indexLoc_getCXSourceLocation(decl->loc), &file, nullptr, nullptr, nullptr); IndexParam* param = static_cast(client_data);