Remove unused variables

This commit is contained in:
Jacob Dufault 2017-07-17 10:41:59 -07:00
parent 22bb89fca1
commit ba973ba1bf
4 changed files with 2 additions and 7 deletions

View File

@ -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<std::mutex> 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<std::mutex> 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();
}

View File

@ -109,5 +109,4 @@ struct ClangCompleteManager {
std::condition_variable delayed_diagnostic_wakeup_cv_;
// Access under |delayed_diagnostic_wakeup_mtx_|.
optional<lsTextDocumentPositionParams> delayed_diagnostic_last_completion_position_;
optional<std::chrono::time_point<std::chrono::high_resolution_clock>> delayed_diagnostic_last_completion_time_;
};

View File

@ -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;

View File

@ -435,4 +435,4 @@ TEST_CASE("existing completion underscore") {
REQUIRE(existing_completion == "ABC_");
}
TEST_SUITE_END();
TEST_SUITE_END();