From: Fangrui Song Date: Fri, 14 Sep 2018 00:56:11 +0000 (+0000) Subject: [clangd] Fix TUScheduler typos X-Git-Tag: llvmorg-8.0.0-rc1~8745 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=847bd3316640a07dbef20029accc7905d836ecf8;p=platform%2Fupstream%2Fllvm.git [clangd] Fix TUScheduler typos llvm-svn: 342198 --- diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 0ae2a3c..6ac2134 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -18,7 +18,7 @@ // preamble. However, unlike AST, the same preamble can be read concurrently, so // we run each of async preamble reads on its own thread. // -// To limit the concurrent load that clangd produces we mantain a semaphore that +// To limit the concurrent load that clangd produces we maintain a semaphore that // keeps more than a fixed number of threads from running concurrently. // // Rationale for cancelling updates. @@ -165,7 +165,7 @@ public: /// The processing thread is spawned using \p Tasks. However, when \p Tasks /// is null, all requests will be processed on the calling thread /// synchronously instead. \p Barrier is acquired when processing each - /// request, it is be used to limit the number of actively running threads. + /// request, it is used to limit the number of actively running threads. static ASTWorkerHandle create(PathRef FileName, TUScheduler::ASTCache &IdleASTs, AsyncTaskRunner *Tasks, Semaphore &Barrier, @@ -188,7 +188,7 @@ public: void getCurrentPreamble( llvm::unique_function)>); /// Wait for the first build of preamble to finish. Preamble itself can be - /// accessed via getPossibleStalePreamble(). Note that this function will + /// accessed via getPossiblyStalePreamble(). Note that this function will /// return after an unsuccessful build of the preamble too, i.e. result of /// getPossiblyStalePreamble() can be null even after this function returns. void waitForFirstPreamble() const; @@ -207,7 +207,7 @@ private: void startTask(llvm::StringRef Name, llvm::unique_function Task, llvm::Optional UpdateType); /// Determines the next action to perform. - /// All actions that should never run are disarded. + /// All actions that should never run are discarded. /// Returns a deadline for the next action. If it's expired, run now. /// scheduleLocked() is called again at the deadline, or if requests arrive. Deadline scheduleLocked(); @@ -227,7 +227,7 @@ private: const bool RunSync; /// Time to wait after an update to see whether another update obsoletes it. const steady_clock::duration UpdateDebounce; - /// File that ASTWorker is reponsible for. + /// File that ASTWorker is responsible for. const Path FileName; /// Whether to keep the built preambles in memory or on disk. const bool StorePreambleInMemory; @@ -417,7 +417,7 @@ void ASTWorker::update( // We want to report the diagnostics even if this update was cancelled. // It seems more useful than making the clients wait indefinitely if they // spam us with updates. - // Note *AST can be still be null if buildAST fails. + // Note *AST can still be null if buildAST fails. if (*AST) { OnUpdated((*AST)->getDiagnostics()); trace::Span Span("Running main AST callback"); diff --git a/clang-tools-extra/clangd/TUScheduler.h b/clang-tools-extra/clangd/TUScheduler.h index e049d3d..bfe495e 100644 --- a/clang-tools-extra/clangd/TUScheduler.h +++ b/clang-tools-extra/clangd/TUScheduler.h @@ -176,7 +176,7 @@ private: }; /// Runs \p Action asynchronously with a new std::thread. The context will be -/// propogated. +/// propagated. template std::future runAsync(llvm::unique_function Action) { return std::async(std::launch::async,