Author: Haojian Wu
Date: 2023-06-28T14:05:21+02:00
New Revision: 8ceb4190fe9baa617bc65e99f0296531c88a5a79

URL: 
https://github.com/llvm/llvm-project/commit/8ceb4190fe9baa617bc65e99f0296531c88a5a79
DIFF: 
https://github.com/llvm/llvm-project/commit/8ceb4190fe9baa617bc65e99f0296531c88a5a79.diff

LOG: [clangd] Fix some typos, NFC

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp 
b/clang-tools-extra/clangd/ClangdLSPServer.cpp
index bf4c1a982834b..64489f78d843d 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -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

diff  --git a/clang-tools-extra/clangd/Config.h 
b/clang-tools-extra/clangd/Config.h
index 502dd01df1483..b46fedac3f88e 100644
--- a/clang-tools-extra/clangd/Config.h
+++ b/clang-tools-extra/clangd/Config.h
@@ -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;

diff  --git a/clang-tools-extra/clangd/ParsedAST.cpp 
b/clang-tools-extra/clangd/ParsedAST.cpp
index b810feab07581..02c8597c79613 100644
--- a/clang-tools-extra/clangd/ParsedAST.cpp
+++ b/clang-tools-extra/clangd/ParsedAST.cpp
@@ -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)

diff  --git a/clang-tools-extra/clangd/Preamble.h 
b/clang-tools-extra/clangd/Preamble.h
index b3e53909ac73c..cbadae31dd02e 100644
--- a/clang-tools-extra/clangd/Preamble.h
+++ b/clang-tools-extra/clangd/Preamble.h
@@ -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 @@ class PreamblePatch {
                                         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;
 

diff  --git a/clang-tools-extra/clangd/TUScheduler.cpp 
b/clang-tools-extra/clangd/TUScheduler.cpp
index 968f4452e020e..46c469ff3f411 100644
--- a/clang-tools-extra/clangd/TUScheduler.cpp
+++ b/clang-tools-extra/clangd/TUScheduler.cpp
@@ -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));

diff  --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp 
b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
index 4e2f0b6434c34..ef057158965d5 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -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.


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to