From ba973ba1bfce1539c4d076905db454bbecfd0427 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Mon, 17 Jul 2017 10:41:59 -0700 Subject: [PATCH] Remove unused variables --- src/clang_complete.cc | 4 +--- src/clang_complete.h | 1 - src/command_line.cc | 2 -- src/working_files.cc | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/clang_complete.cc b/src/clang_complete.cc index 68268a58..447f4d26 100644 --- a/src/clang_complete.cc +++ b/src/clang_complete.cc @@ -328,6 +328,7 @@ void CompletionParseMain(ClangCompleteManager* completion_manager) { // tu_last_parsed_at is only read by this thread, so it doesn't need to be under the mutex. session->tu_last_parsed_at = std::chrono::high_resolution_clock::now(); std::lock_guard lock(session->tu_lock); + std::cerr << "[completion] Swapping completion session for " << request.path << std::endl; session->tu = std::move(parsing); } } @@ -349,9 +350,7 @@ void CompletionDiagnosticsDelayedRefreshMain(ClangCompleteManager* completion_ma // Get completion request info. if (!l.owns_lock()) l.lock(); - auto time = *completion_manager->delayed_diagnostic_last_completion_time_; lsTextDocumentPositionParams location = *completion_manager->delayed_diagnostic_last_completion_position_; - completion_manager->delayed_diagnostic_last_completion_time_.reset(); completion_manager->delayed_diagnostic_last_completion_position_.reset(); l.unlock(); @@ -472,7 +471,6 @@ void CompletionQueryMain(ClangCompleteManager* completion_manager) { { std::lock_guard lock(completion_manager->delayed_diagnostic_wakeup_mtx_); completion_manager->delayed_diagnostic_last_completion_position_ = request->location; - completion_manager->delayed_diagnostic_last_completion_time_ = std::chrono::high_resolution_clock::now(); } completion_manager->delayed_diagnostic_wakeup_cv_.notify_one(); } diff --git a/src/clang_complete.h b/src/clang_complete.h index e77765ea..c06f173e 100644 --- a/src/clang_complete.h +++ b/src/clang_complete.h @@ -109,5 +109,4 @@ struct ClangCompleteManager { std::condition_variable delayed_diagnostic_wakeup_cv_; // Access under |delayed_diagnostic_wakeup_mtx_|. optional delayed_diagnostic_last_completion_position_; - optional> delayed_diagnostic_last_completion_time_; }; diff --git a/src/command_line.cc b/src/command_line.cc index 3eabc908..507e16c7 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -1035,8 +1035,6 @@ bool IndexMain_DoCreateIndexUpdate( #define PRINT_SECTION(name) \ if (response->perf.name) {\ total += response->perf.name; \ - long long milliseconds = response->perf.name / 1000; \ - long long remaining = response->perf.name - milliseconds; \ output << " " << #name << ": " << FormatMicroseconds(response->perf.name); \ } std::stringstream output; diff --git a/src/working_files.cc b/src/working_files.cc index afef44e9..8fea96a4 100644 --- a/src/working_files.cc +++ b/src/working_files.cc @@ -435,4 +435,4 @@ TEST_CASE("existing completion underscore") { REQUIRE(existing_completion == "ABC_"); } -TEST_SUITE_END(); \ No newline at end of file +TEST_SUITE_END();