[clangd] Fix some typos, NFC
authorHaojian Wu <hokein.wu@gmail.com>
Wed, 28 Jun 2023 12:04:22 +0000 (14:04 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Wed, 28 Jun 2023 12:05:21 +0000 (14:05 +0200)
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/Config.h
clang-tools-extra/clangd/ParsedAST.cpp
clang-tools-extra/clangd/Preamble.h
clang-tools-extra/clangd/TUScheduler.cpp
clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp

index bf4c1a9..64489f7 100644 (file)
@@ -1720,7 +1720,7 @@ std::vector<CodeAction> ClangdLSPServer::getFixes(llvm::StringRef File,
 }
 
 // A completion request is sent when the user types '>' or ':', but we only
-// want to trigger on '->' and '::'. We check the preceeding text to make
+// want to trigger on '->' and '::'. We check the preceding text to make
 // sure it matches what we expected.
 // Running the lexer here would be more robust (e.g. we can detect comments
 // and avoid triggering completion there), but we choose to err on the side
index 502dd01..b46feda 100644 (file)
@@ -100,7 +100,7 @@ struct Config {
 
     /// Configures what clang-tidy checks to run and options to use with them.
     struct {
-      // A comma-seperated list of globs specify which clang-tidy checks to run.
+      // A comma-separated list of globs specify which clang-tidy checks to run.
       std::string Checks;
       llvm::StringMap<std::string> CheckOptions;
     } ClangTidy;
index b810fea..02c8597 100644 (file)
@@ -706,7 +706,7 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
   ASTDiags.EndSourceFile();
 
   std::vector<Diag> Diags = CompilerInvocationDiags;
-  // FIXME: Also skip generation of diagnostics alltogether to speed up ast
+  // FIXME: Also skip generation of diagnostics altogether to speed up ast
   // builds when we are patching a stale preamble.
   // Add diagnostics from the preamble, if any.
   if (Preamble)
index b3e5390..cbadae3 100644 (file)
@@ -48,7 +48,7 @@
 namespace clang {
 namespace clangd {
 
-/// The captured AST conext.
+/// The captured AST context.
 /// Keeps necessary structs for an ASTContext and Preprocessor alive.
 /// This enables consuming them after context that produced the AST is gone.
 /// (e.g. indexing a preamble ast on a separate thread). ASTContext stored
@@ -186,7 +186,7 @@ public:
                                         const SourceManager &SM);
 
   /// Adjusts CI (which compiles the modified inputs) to be used with the
-  /// baseline preamble. This is done by inserting an artifical include to the
+  /// baseline preamble. This is done by inserting an artificial include to the
   /// \p CI that contains new directives calculated in create.
   void apply(CompilerInvocation &CI) const;
 
index 968f445..46c469f 100644 (file)
@@ -943,7 +943,7 @@ void ASTWorker::update(ParseInputs Inputs, WantDiagnostics WantDiags,
     // Emit diagnostics from (possibly) stale preamble while waiting for a
     // rebuild. Newly built preamble cannot emit diagnostics before this call
     // finishes (ast callbacks are called from astpeer thread), hence we
-    // gurantee eventual consistency.
+    // guarantee eventual consistency.
     if (LatestPreamble && WantDiags != WantDiagnostics::No)
       generateDiagnostics(std::move(Invocation), std::move(Inputs),
                           std::move(CompilerInvocationDiags));
index 4e2f0b6..ef05715 100644 (file)
@@ -1629,7 +1629,7 @@ TEST_F(TUSchedulerTests, PreambleThrottle) {
     // We haven't released anything yet, we're still waiting.
     EXPECT_THAT(Throttler.Releases, testing::IsEmpty());
 
-    // FIXME: This is flaky, becaues the request can be destroyed after shutdown
+    // FIXME: This is flaky, because the request can be destroyed after shutdown
     // if it hasn't been dequeued yet (stop() resets NextRequest).
 #if 0
     // Now close file A, which will shut down its AST worker.