diff options
author | Fangrui Song <maskray@google.com> | 2018-09-14 00:56:11 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-09-14 00:56:11 +0000 |
commit | 847bd3316640a07dbef20029accc7905d836ecf8 (patch) | |
tree | c4636d260be56308503b76b97dcaf2387d63b50c | |
parent | ea7f3035a01786e7d69bb1ce1e038cefb6657a2e (diff) | |
download | bcm5719-llvm-847bd3316640a07dbef20029accc7905d836ecf8.tar.gz bcm5719-llvm-847bd3316640a07dbef20029accc7905d836ecf8.zip |
[clangd] Fix TUScheduler typos
llvm-svn: 342198
-rw-r--r-- | clang-tools-extra/clangd/TUScheduler.cpp | 12 | ||||
-rw-r--r-- | clang-tools-extra/clangd/TUScheduler.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 0ae2a3c9cd9..6ac21341f9e 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<void(std::shared_ptr<const PreambleData>)>); /// 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<void()> Task, llvm::Optional<WantDiagnostics> 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 e049d3d8dd1..bfe495e2d4a 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 <typename T> std::future<T> runAsync(llvm::unique_function<T()> Action) { return std::async(std::launch::async, |