[clang-tools-extra] b7ecf1c - NFC: Fix trivial typos in comments

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 4 07:29:08 PST 2020


Author: Kazuaki Ishizaki
Date: 2020-01-04T10:28:41-05:00
New Revision: b7ecf1c1c373c53183ef6ef66efbe4237ff7b96d

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

LOG: NFC: Fix trivial typos in comments

Added: 
    

Modified: 
    clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
    clang-tools-extra/clang-doc/BitcodeReader.h
    clang-tools-extra/clang-doc/Representation.h
    clang-tools-extra/clang-doc/Serialize.cpp
    clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
    clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp
    clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
    clang-tools-extra/clang-move/tool/ClangMove.cpp
    clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
    clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
    clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
    clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
    clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
    clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
    clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
    clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
    clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
    clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
    clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
    clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
    clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
    clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
    clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
    clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
    clang-tools-extra/clangd/AST.h
    clang-tools-extra/clangd/ClangdLSPServer.h
    clang-tools-extra/clangd/CodeComplete.cpp
    clang-tools-extra/clangd/Context.h
    clang-tools-extra/clangd/FindTarget.cpp
    clang-tools-extra/clangd/Hover.cpp
    clang-tools-extra/clangd/IncludeFixer.cpp
    clang-tools-extra/clangd/ParsedAST.h
    clang-tools-extra/clangd/Protocol.h
    clang-tools-extra/clangd/SemanticHighlighting.h
    clang-tools-extra/clangd/TUScheduler.h
    clang-tools-extra/clangd/Trace.h
    clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
    clang-tools-extra/clangd/index/CanonicalIncludes.cpp
    clang-tools-extra/clangd/index/Symbol.h
    clang-tools-extra/clangd/refactor/Rename.cpp
    clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
    clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    clang-tools-extra/clangd/unittests/HoverTests.cpp
    clang-tools-extra/clangd/unittests/RenameTests.cpp
    clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
    clang-tools-extra/clangd/unittests/SyncAPI.cpp
    clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
    clang-tools-extra/clangd/unittests/TweakTests.cpp
    clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
    clang-tools-extra/clangd/unittests/XRefsTests.cpp
    clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst
    clang-tools-extra/docs/clang-tidy/checks/cert-mem57-cpp.rst
    clang-tools-extra/docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
    clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst
    clang-tools-extra/modularize/Modularize.cpp
    clang-tools-extra/modularize/PreprocessorTracker.cpp
    clang-tools-extra/pp-trace/PPCallbacksTracker.cpp
    clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc-custom.cpp
    clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc.cpp
    clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-owning-memory-containers.cpp
    clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique.cpp
    clang-tools-extra/test/clang-tidy/checkers/modernize-use-nullptr-basic.cpp
    clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.m
    clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.mm
    clang-tools-extra/test/clang-tidy/checkers/readability-redundant-declaration.cpp
    clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/FindAllSymbolsTests.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp b/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
index 8d98ba01d1c7..33ece7f1b4e0 100644
--- a/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
+++ b/clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
@@ -207,7 +207,7 @@ bool mergeAndDeduplicate(const TUReplacements &TUs, const TUDiagnostics &TUDs,
         // FIXME: This will report conflicts by pair using a file+offset format
         // which is not so much human readable.
         // A first improvement could be to translate offset to line+col. For
-        // this and without loosing error message some modifications arround
+        // this and without loosing error message some modifications around
         // `tooling::ReplacementError` are need (access to
         // `getReplacementErrString`).
         // A better strategy could be to add a pretty printer methods for

diff  --git a/clang-tools-extra/clang-doc/BitcodeReader.h b/clang-tools-extra/clang-doc/BitcodeReader.h
index 18b9521c32ea..91251fba2999 100644
--- a/clang-tools-extra/clang-doc/BitcodeReader.h
+++ b/clang-tools-extra/clang-doc/BitcodeReader.h
@@ -61,7 +61,7 @@ class ClangDocBitcodeReader {
   // or block to be read.
   Cursor skipUntilRecordOrBlock(unsigned &BlockOrRecordID);
 
-  // Helper function to set up the approriate type of Info.
+  // Helper function to set up the appropriate type of Info.
   llvm::Expected<std::unique_ptr<Info>> readBlockToInfo(unsigned ID);
 
   llvm::BitstreamCursor &Stream;

diff  --git a/clang-tools-extra/clang-doc/Representation.h b/clang-tools-extra/clang-doc/Representation.h
index 676bf18766ad..de2993db0abc 100644
--- a/clang-tools-extra/clang-doc/Representation.h
+++ b/clang-tools-extra/clang-doc/Representation.h
@@ -135,7 +135,7 @@ struct Reference {
   bool mergeable(const Reference &Other);
   void merge(Reference &&I);
 
-  SymbolID USR = SymbolID(); // Unique identifer for referenced decl
+  SymbolID USR = SymbolID(); // Unique identifier for referenced decl
   SmallString<16> Name;      // Name of type (possibly unresolved).
   InfoType RefType = InfoType::IT_default; // Indicates the type of this
                                            // Reference (namespace, record,

diff  --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp
index 38ac576a1e1d..54ee58960b22 100644
--- a/clang-tools-extra/clang-doc/Serialize.cpp
+++ b/clang-tools-extra/clang-doc/Serialize.cpp
@@ -32,7 +32,7 @@ populateParentNamespaces(llvm::SmallVector<Reference, 4> &Namespaces,
 // A function to extract the appropriate relative path for a given info's
 // documentation. The path returned is a composite of the parent namespaces.
 //
-// Example: Given the below, the diretory path for class C info will be
+// Example: Given the below, the directory path for class C info will be
 // <root>/A/B
 //
 // namespace A {

diff  --git a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
index 38b781ed39f4..ed349d34dcb6 100644
--- a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+++ b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This tool for generating C and C++ documenation from source code
+// This tool for generating C and C++ documentation from source code
 // and comments. Generally, it runs a LibTooling FrontendAction on source files,
 // mapping each declaration in those files to its USR and serializing relevant
 // information into LLVM bitcode. It then runs a pass over the collected

diff  --git a/clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp b/clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp
index a9fef45c46cc..9bc20f1bc541 100644
--- a/clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp
+++ b/clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp
@@ -26,7 +26,7 @@ std::string createQualifiedNameForReplacement(
     llvm::StringRef RawSymbolName,
     llvm::StringRef SymbolScopedQualifiersName,
     const find_all_symbols::SymbolInfo &MatchedSymbol) {
-  // No need to add missing qualifiers if SymbolIndentifer has a global scope
+  // No need to add missing qualifiers if SymbolIdentifier has a global scope
   // operator "::".
   if (RawSymbolName.startswith("::"))
     return RawSymbolName;

diff  --git a/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el b/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
index 84fff6246921..c8e74d113ce9 100644
--- a/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
+++ b/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.el
@@ -110,7 +110,7 @@ buffer as only argument."
   nil)
 
 (defun clang-include-fixer--make-process (callback args)
-  "Start a new clang-incude-fixer process using `make-process'.
+  "Start a new clang-include-fixer process using `make-process'.
 CALLBACK is called after the process finishes successfully; it is
 called with a single argument, the buffer where standard output
 has been inserted.  ARGS is a list of additional command line
@@ -129,7 +129,7 @@ arguments.  Return the new process object."
                   :stderr stderr)))
 
 (defun clang-include-fixer--start-process (callback args)
-  "Start a new clang-incude-fixer process using `start-file-process'.
+  "Start a new clang-include-fixer process using `start-file-process'.
 CALLBACK is called after the process finishes successfully; it is
 called with a single argument, the buffer where standard output
 has been inserted.  ARGS is a list of additional command line

diff  --git a/clang-tools-extra/clang-move/tool/ClangMove.cpp b/clang-tools-extra/clang-move/tool/ClangMove.cpp
index 2df7df7fe3a7..214c4f616ba6 100644
--- a/clang-tools-extra/clang-move/tool/ClangMove.cpp
+++ b/clang-tools-extra/clang-move/tool/ClangMove.cpp
@@ -1,4 +1,4 @@
-//===-- ClangMove.cpp - move defintion to new file --------------*- C++ -*-===//
+//===-- ClangMove.cpp - move definition to new file -------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.

diff  --git a/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp b/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
index a6748e9d9f84..ef44b23331d7 100644
--- a/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
@@ -65,7 +65,7 @@ void FasterStrsplitDelimiterCheck::registerMatchers(MatchFinder *Finder) {
       expr(ignoringParenCasts(stringLiteral(lengthIsOne()).bind("Literal")));
 
   // Binds to a string_view (either absl or std) that was passed by value and
-  // contructed from string literal.
+  // constructed from string literal.
   auto StringViewArg = ignoringElidableConstructorCall(ignoringImpCasts(
       cxxConstructExpr(hasType(recordDecl(hasName("::absl::string_view"))),
                        hasArgument(0, ignoringParenImpCasts(SingleChar)))));

diff  --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
index fee1d556eb93..a3866651dced 100644
--- a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
@@ -168,7 +168,7 @@ void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
         !InsideMacroDefinition(Result, MaybeCallArg->getSourceRange())) {
       // Handle the case where the matched expression is inside a call which
       // converts it from the inverse to a Duration.  In this case, we replace
-      // the outer with just the subtraction expresison, which gives the right
+      // the outer with just the subtraction expression, which gives the right
       // type and scale, taking care again about parenthesis.
       bool NeedParens = parensRequired(Result, MaybeCallArg);
 

diff  --git a/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
index a03f8609ea60..7f851f0ba023 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
@@ -63,7 +63,7 @@ void ForwardDeclarationNamespaceCheck::check(
     const auto *Decl = Result.Nodes.getNodeAs<FriendDecl>("friend_decl");
     assert(Decl && "Decl is neither record_decl nor friend decl!");
 
-    // Classes used in friend delarations are not marked referenced in AST,
+    // Classes used in friend declarations are not marked referenced in AST,
     // so we need to check classes used in friend declarations manually to
     // reduce the rate of false positive.
     // For example, in

diff  --git a/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
index 0fbd93e847e3..815062618a97 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
@@ -27,7 +27,7 @@ AST_MATCHER(StringLiteral, containsNul) {
 
 void StringLiteralWithEmbeddedNulCheck::registerMatchers(MatchFinder *Finder) {
   // Match a string that contains embedded NUL character. Extra-checks are
-  // applied in |check| to find incorectly escaped characters.
+  // applied in |check| to find incorrectly escaped characters.
   Finder->addMatcher(stringLiteral(containsNul()).bind("strlit"), this);
 
   // The remaining checks only apply to C++.

diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
index fc334fb5b3ba..96e9d3edc016 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -31,7 +31,7 @@ AST_MATCHER(CXXRecordDecl, hasDefaultConstructor) {
 }
 
 // Iterate over all the fields in a record type, both direct and indirect (e.g.
-// if the record contains an anonmyous struct).
+// if the record contains an anonymous struct).
 template <typename T, typename Func>
 void forEachField(const RecordDecl &Record, const T &Fields, Func &&Fn) {
   for (const FieldDecl *F : Fields) {
@@ -424,7 +424,7 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
   }
 
   // Collect all fields in order, both direct fields and indirect fields from
-  // anonmyous record types.
+  // anonymous record types.
   SmallVector<const FieldDecl *, 16> OrderedFields;
   forEachField(ClassDecl, ClassDecl.fields(),
                [&](const FieldDecl *F) { OrderedFields.push_back(F); });

diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
index 62c4c768e840..6f0afe989d41 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
@@ -45,7 +45,7 @@ void SlicingCheck::registerMatchers(MatchFinder *Finder) {
   const auto IsWithinDerivedCtor =
       hasParent(cxxConstructorDecl(ofClass(equalsBoundNode("DerivedDecl"))));
 
-  // Assignement slicing: "a = b;" and "a = std::move(b);" variants.
+  // Assignment slicing: "a = b;" and "a = std::move(b);" variants.
   const auto SlicesObjectInAssignment =
       callExpr(callee(cxxMethodDecl(anyOf(isCopyAssignmentOperator(),
                                           isMoveAssignmentOperator()),

diff  --git a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
index a83e636a4335..c6d72494243c 100644
--- a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
@@ -61,7 +61,7 @@ void GlobalNamesInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
 
   if (const auto *UsingDirective = dyn_cast<UsingDirectiveDecl>(D)) {
     if (UsingDirective->getNominatedNamespace()->isAnonymousNamespace()) {
-      // Anynoumous namespaces inject a using directive into the AST to import
+      // Anonymous namespaces inject a using directive into the AST to import
       // the names into the containing namespace.
       // We should not have them in headers, but there is another warning for
       // that.

diff  --git a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
index 518e31ef434e..b161b824f220 100644
--- a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
+++ b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
@@ -24,7 +24,7 @@ namespace runtime {
 /// Finds uses of `short`, `long` and `long long` and suggest replacing them
 /// with `u?intXX(_t)?`.
 ///
-/// Correspondig cpplint.py check: 'runtime/int'.
+/// Corresponding cpplint.py check: 'runtime/int'.
 class IntegerTypesCheck : public ClangTidyCheck {
 public:
   IntegerTypesCheck(StringRef Name, ClangTidyContext *Context);

diff  --git a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
index e3dffd0698f5..1874d8ef35cf 100644
--- a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
@@ -43,7 +43,7 @@ namespace tidy {
 namespace modernize {
 
 void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) {
-  // std::array<> is avaliable since C++11.
+  // std::array<> is available since C++11.
   if (!getLangOpts().CPlusPlus11)
     return;
 

diff  --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
index 44ff0641fd2c..12d3f6290394 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
@@ -376,7 +376,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
         //   struct S { S(std::initializer_list<int>); };
         //   struct S2 { S2(S, int); };
         //   smart_ptr<S>(new S{1, 2, 3});  // C++11 direct list-initialization
-        //   smart_ptr<S>(new S{});  // use initializer-list consturctor
+        //   smart_ptr<S>(new S{});  // use initializer-list constructor
         //   smart_ptr<S2>()new S2{ {1,2}, 3 }; // have a list-initialized arg
         // The above cases have to be replaced with:
         //   std::make_smart_ptr<S>(std::initializer_list<int>({1, 2, 3}));

diff  --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
index 5cab62946d18..86545d3714ac 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
@@ -359,7 +359,7 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) {
     }
 
     if (const auto *NestedConstruct = dyn_cast<CXXConstructExpr>(E)) {
-      // If we ran into an implicit conversion contructor, can't convert.
+      // If we ran into an implicit conversion constructor, can't convert.
       //
       // FIXME: The following only checks if the constructor can be used
       // implicitly, not if it actually was. Cases where the converting

diff  --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
index 27e85968722a..6efa9822c6c4 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -33,7 +33,7 @@ AST_MATCHER(Type, sugaredNullptrType) {
 /// Create a matcher that finds implicit casts as well as the head of a
 /// sequence of zero or more nested explicit casts that have an implicit cast
 /// to null within.
-/// Finding sequences of explict casts is necessary so that an entire sequence
+/// Finding sequences of explicit casts is necessary so that an entire sequence
 /// can be replaced instead of just the inner-most implicit cast.
 StatementMatcher makeCastSequenceMatcher() {
   StatementMatcher ImplicitCastToNull = implicitCastExpr(

diff  --git a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
index b8a6d49e2347..eba6207ed740 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
@@ -19,7 +19,7 @@ namespace performance {
 ///
 /// Associative containers implements some of the algorithms as methods which
 /// should be preferred to the algorithms in the algorithm header. The methods
-/// can take advanatage of the order of the elements.
+/// can take advantage of the order of the elements.
 class InefficientAlgorithmCheck : public ClangTidyCheck {
 public:
   InefficientAlgorithmCheck(StringRef Name, ClangTidyContext *Context)

diff  --git a/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp b/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
index e93ed7e3a33b..e985fe805087 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
@@ -165,7 +165,7 @@ void InefficientVectorOperationCheck::registerMatchers(MatchFinder *Finder) {
 
     // A method's name starts with "add_" might not mean it's an add field
     // call; it could be the getter for a proto field of which the name starts
-    // with "add_". So we exlude const methods.
+    // with "add_". So we exclude const methods.
     const auto AddFieldMethodDecl =
         cxxMethodDecl(matchesName("::add_"), unless(isConst()));
     AddMatcher(ProtoDecl, ProtoVarDeclName, ProtoVarDeclStmtName,

diff  --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
index e72ae4e29d43..f4130972a6ea 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
@@ -84,7 +84,7 @@ class IdentifierNamingCheck : public ClangTidyCheck {
   };
 
   /// Holds an identifier name check failure, tracking the kind of the
-  /// identifer, its possible fixup and the starting locations of all the
+  /// identifier, its possible fixup and the starting locations of all the
   /// identifier usages.
   struct NamingCheckFailure {
     std::string KindName;

diff  --git a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
index 64a955f68030..f95b1c9cb2ad 100644
--- a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
@@ -73,7 +73,7 @@ bool checkIfFixItHintIsApplicable(
   if (!ParameterSourceDeclaration->isThisDeclarationADefinition())
     return false;
 
-  // Assumption: if parameter is not referenced in function defintion body, it
+  // Assumption: if parameter is not referenced in function definition body, it
   // may indicate that it's outdated, so don't touch it.
   if (!SourceParam->isReferenced())
     return false;

diff  --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
index 2caa1aad8524..2ae08c83f524 100644
--- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
+++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
@@ -24,7 +24,7 @@ namespace utils {
 class ExceptionAnalyzer {
 public:
   enum class State : std::int8_t {
-    Throwing = 0,    ///< The function can definitly throw given an AST.
+    Throwing = 0,    ///< The function can definitely throw given an AST.
     NotThrowing = 1, ///< This function can not throw, given an AST.
     Unknown = 2,     ///< This can happen for extern functions without available
                      ///< definition.

diff  --git a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
index fe99e684e1d2..d1fc9bda77d3 100644
--- a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
+++ b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
@@ -38,7 +38,7 @@ NamespaceAliaser::createAlias(ASTContext &Context, const Stmt &Statement,
     return None;
 
   // FIXME: Doesn't consider the order of declarations.
-  // If we accidentially pick an alias defined later in the function,
+  // If we accidentally pick an alias defined later in the function,
   // the output won't compile.
   // FIXME: Also doesn't consider file or class-scope aliases.
 

diff  --git a/clang-tools-extra/clangd/AST.h b/clang-tools-extra/clangd/AST.h
index f65c42869b74..6cae719986a0 100644
--- a/clang-tools-extra/clangd/AST.h
+++ b/clang-tools-extra/clangd/AST.h
@@ -79,7 +79,7 @@ llvm::Optional<SymbolID> getSymbolID(const llvm::StringRef MacroName,
                                      const SourceManager &SM);
 
 /// Returns a QualType as string. The result doesn't contain unwritten scopes
-/// like annoymous/inline namespace.
+/// like anonymous/inline namespace.
 std::string printType(const QualType QT, const DeclContext &CurContext);
 
 /// Indicates if \p D is a template instantiation implicitly generated by the

diff  --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h
index 9650b6a7dbb2..6f6d017b7f51 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.h
+++ b/clang-tools-extra/clangd/ClangdLSPServer.h
@@ -212,7 +212,7 @@ class ClangdLSPServer : private DiagnosticsConsumer {
   bool UseDirBasedCDB;                     // FIXME: make this a capability.
   llvm::Optional<Path> CompileCommandsDir; // FIXME: merge with capability?
   std::unique_ptr<GlobalCompilationDatabase> BaseCDB;
-  // CDB is BaseCDB plus any comands overridden via LSP extensions.
+  // CDB is BaseCDB plus any commands overridden via LSP extensions.
   llvm::Optional<OverlayCDB> CDB;
   ClangdServer::Options ClangdServerOpts;
   llvm::Optional<OffsetEncoding> NegotiatedOffsetEncoding;

diff  --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index 4e54b1a43e55..045b78d0779f 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -1510,7 +1510,7 @@ class CodeCompleteFlow {
   }
 
   // Merges Sema and Index results where possible, to form CompletionCandidates.
-  // \p Identifiers is raw idenfiers that can also be completion candidates.
+  // \p Identifiers is raw identifiers that can also be completion candidates.
   // Identifiers are not merged with results from index or sema.
   // Groups overloads if desired, to form CompletionCandidate::Bundles. The
   // bundles are scored and top results are returned, best to worst.

diff  --git a/clang-tools-extra/clangd/Context.h b/clang-tools-extra/clangd/Context.h
index 01b592fb00f9..71aeaba95254 100644
--- a/clang-tools-extra/clangd/Context.h
+++ b/clang-tools-extra/clangd/Context.h
@@ -83,7 +83,7 @@ class Context {
 public:
   /// Same as Context::empty(), please use Context::empty() instead.
   /// Constructor is defined to workaround a bug in MSVC's version of STL.
-  /// (arguments of std::future<> must be default-construcitble in MSVC).
+  /// (arguments of std::future<> must be default-constructible in MSVC).
   Context() = default;
 
   /// Copy operations for this class are deleted, use an explicit clone() method

diff  --git a/clang-tools-extra/clangd/FindTarget.cpp b/clang-tools-extra/clangd/FindTarget.cpp
index f5d7f4a9326b..75ea78c44a4e 100644
--- a/clang-tools-extra/clangd/FindTarget.cpp
+++ b/clang-tools-extra/clangd/FindTarget.cpp
@@ -485,7 +485,7 @@ llvm::SmallVector<ReferenceLoc, 2> refInDecl(const Decl *D) {
     }
 
     void VisitUsingDecl(const UsingDecl *D) {
-      // "using ns::identifer;" is a non-declaration reference.
+      // "using ns::identifier;" is a non-declaration reference.
       Refs.push_back(
           ReferenceLoc{D->getQualifierLoc(), D->getLocation(), /*IsDecl=*/false,
                        explicitReferenceTargets(DynTypedNode::create(*D),

diff  --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp
index 95ebe08a9281..b1a2e289eed7 100644
--- a/clang-tools-extra/clangd/Hover.cpp
+++ b/clang-tools-extra/clangd/Hover.cpp
@@ -295,7 +295,7 @@ llvm::Optional<std::string> printExprValue(const Expr *E,
 llvm::Optional<std::string> printExprValue(const SelectionTree::Node *N,
                                            const ASTContext &Ctx) {
   for (; N; N = N->Parent) {
-    // Try to evaluate the first evaluable enclosing expression.
+    // Try to evaluate the first evaluatable enclosing expression.
     if (const Expr *E = N->ASTNode.get<Expr>()) {
       if (auto Val = printExprValue(E, Ctx))
         return Val;

diff  --git a/clang-tools-extra/clangd/IncludeFixer.cpp b/clang-tools-extra/clangd/IncludeFixer.cpp
index 93dee2eabfc6..17280d682bd5 100644
--- a/clang-tools-extra/clangd/IncludeFixer.cpp
+++ b/clang-tools-extra/clangd/IncludeFixer.cpp
@@ -95,7 +95,7 @@ std::vector<Fix> IncludeFixer::fix(DiagnosticsEngine::Level DiagLevel,
   case diag::err_no_member: // Could be no member in namespace.
   case diag::err_no_member_suggest:
     if (LastUnresolvedName) {
-      // Try to fix unresolved name caused by missing declaraion.
+      // Try to fix unresolved name caused by missing declaration.
       // E.g.
       //   clang::SourceManager SM;
       //          ~~~~~~~~~~~~~
@@ -161,7 +161,7 @@ std::vector<Fix> IncludeFixer::fixesForSymbols(const SymbolSlab &Syms) const {
   };
 
   std::vector<Fix> Fixes;
-  // Deduplicate fixes by include headers. This doesn't distiguish symbols in
+  // Deduplicate fixes by include headers. This doesn't distinguish symbols in
   // 
diff erent scopes from the same header, but this case should be rare and is
   // thus ignored.
   llvm::StringSet<> InsertedHeaders;

diff  --git a/clang-tools-extra/clangd/ParsedAST.h b/clang-tools-extra/clangd/ParsedAST.h
index f2afc264e23a..6142891482d1 100644
--- a/clang-tools-extra/clangd/ParsedAST.h
+++ b/clang-tools-extra/clangd/ParsedAST.h
@@ -88,7 +88,7 @@ class ParsedAST {
 
   const std::vector<Diag> &getDiagnostics() const;
 
-  /// Returns the esitmated size of the AST and the accessory structures, in
+  /// Returns the estimated size of the AST and the accessory structures, in
   /// bytes. Does not include the size of the preamble.
   std::size_t getUsedBytes() const;
   const IncludeStructure &getIncludeStructure() const;

diff  --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h
index 1ccfa587bf87..1b999f1131d4 100644
--- a/clang-tools-extra/clangd/Protocol.h
+++ b/clang-tools-extra/clangd/Protocol.h
@@ -681,7 +681,7 @@ llvm::json::Value toJSON(const Diagnostic &);
 
 /// A LSP-specific comparator used to find diagnostic in a container like
 /// std:map.
-/// We only use the required fields of Diagnostic to do the comparsion to avoid
+/// We only use the required fields of Diagnostic to do the comparison to avoid
 /// any regression issues from LSP clients (e.g. VScode), see
 /// https://git.io/vbr29
 struct LSPDiagnosticCompare {

diff  --git a/clang-tools-extra/clangd/SemanticHighlighting.h b/clang-tools-extra/clangd/SemanticHighlighting.h
index bc57d1ceed93..7a25ce5da060 100644
--- a/clang-tools-extra/clangd/SemanticHighlighting.h
+++ b/clang-tools-extra/clangd/SemanticHighlighting.h
@@ -83,7 +83,7 @@ std::vector<SemanticHighlightingInformation>
 toSemanticHighlightingInformation(llvm::ArrayRef<LineHighlightings> Tokens);
 
 /// Return a line-by-line 
diff  between two highlightings.
-///  - if the tokens on a line are the same in both hightlightings, this line is
+///  - if the tokens on a line are the same in both highlightings, this line is
 ///  omitted.
 ///  - if a line exists in New but not in Old, the tokens on this line are
 ///  emitted.

diff  --git a/clang-tools-extra/clangd/TUScheduler.h b/clang-tools-extra/clangd/TUScheduler.h
index de3b89549983..65d87df5a939 100644
--- a/clang-tools-extra/clangd/TUScheduler.h
+++ b/clang-tools-extra/clangd/TUScheduler.h
@@ -39,7 +39,7 @@ struct InputsAndAST {
 struct InputsAndPreamble {
   llvm::StringRef Contents;
   const tooling::CompileCommand &Command;
-  // This can be nullptr if no preamble is availble.
+  // This can be nullptr if no preamble is available.
   const PreambleData *Preamble;
 };
 

diff  --git a/clang-tools-extra/clangd/Trace.h b/clang-tools-extra/clangd/Trace.h
index 4d253e0e2021..55dc0ef0580c 100644
--- a/clang-tools-extra/clangd/Trace.h
+++ b/clang-tools-extra/clangd/Trace.h
@@ -27,7 +27,7 @@ namespace clangd {
 namespace trace {
 
 /// A consumer of trace events. The events are produced by Spans and trace::log.
-/// Implmentations of this interface must be thread-safe.
+/// Implementations of this interface must be thread-safe.
 class EventTracer {
 public:
   virtual ~EventTracer() = default;

diff  --git a/clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts b/clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
index 1f96cffef255..4d2e04bce26a 100644
--- a/clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
+++ b/clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
@@ -94,7 +94,7 @@ export function activate(context: vscode.ExtensionContext) {
             { scheme: 'file', language: 'objective-cpp'}
         ],
         synchronize: !syncFileEvents ? undefined : {
-        // FIXME: send sync file events when clangd provides implemenatations.
+        // FIXME: send sync file events when clangd provides implementations.
         },
         initializationOptions: { clangdFileStatus: true },
         // Do not switch to output window when clangd returns output

diff  --git a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
index 4f9d2f253d4a..0025a7cd4080 100644
--- a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
+++ b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
@@ -1,4 +1,4 @@
-//===-- CanonicalIncludes.h - remap #inclue headers--------------*- C++ -*-===//
+//===-- CanonicalIncludes.h - remap #include headers-------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.

diff  --git a/clang-tools-extra/clangd/index/Symbol.h b/clang-tools-extra/clangd/index/Symbol.h
index 65ca82698d48..00cf496b6d53 100644
--- a/clang-tools-extra/clangd/index/Symbol.h
+++ b/clang-tools-extra/clangd/index/Symbol.h
@@ -103,7 +103,7 @@ struct Symbol {
     /// this header. This number is only meaningful if aggregated in an index.
     unsigned References = 0;
   };
-  /// One Symbol can potentially be incuded via 
diff erent headers.
+  /// One Symbol can potentially be included via 
diff erent headers.
   ///   - If we haven't seen a definition, this covers all declarations.
   ///   - If we have seen a definition, this covers declarations visible from
   ///   any definition.
@@ -115,7 +115,7 @@ struct Symbol {
     /// Whether or not this symbol is meant to be used for the code completion.
     /// See also isIndexedForCodeCompletion().
     /// Note that we don't store completion information (signature, snippet,
-    /// type, inclues) if the symbol is not indexed for code completion.
+    /// type, includes) if the symbol is not indexed for code completion.
     IndexedForCodeCompletion = 1 << 0,
     /// Indicates if the symbol is deprecated.
     Deprecated = 1 << 1,

diff  --git a/clang-tools-extra/clangd/refactor/Rename.cpp b/clang-tools-extra/clangd/refactor/Rename.cpp
index 0241c00ef8b4..9984891f0f5b 100644
--- a/clang-tools-extra/clangd/refactor/Rename.cpp
+++ b/clang-tools-extra/clangd/refactor/Rename.cpp
@@ -667,7 +667,7 @@ size_t renameRangeAdjustmentCost(ArrayRef<Range> Indexed, ArrayRef<Range> Lexed,
         Indexed[I].start.character - Lexed[MappedIndex[I]].start.character;
     int Line = Indexed[I].start.line;
     if (Line != LastLine)
-      LastDColumn = 0; // colmun offsets don't carry cross lines.
+      LastDColumn = 0; // column offsets don't carry cross lines.
     Cost += abs(DLine - LastDLine) + abs(DColumn - LastDColumn);
     std::tie(LastLine, LastDLine, LastDColumn) = std::tie(Line, DLine, DColumn);
   }

diff  --git a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
index 9db7e302ce6c..3d345cdaa545 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
@@ -96,7 +96,7 @@ const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) {
 }
 
 // Checks the decls mentioned in Source are visible in the context of Target.
-// Achives that by checking declaraions occur before target location in
+// Achieves that by checking declarations occur before target location in
 // translation unit or declared in the same class.
 bool checkDeclsAreVisible(const llvm::DenseSet<const Decl *> &DeclRefs,
                           const FunctionDecl *Target, const SourceManager &SM) {

diff  --git a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
index 28f18e73d7a8..8017fc98b8ef 100644
--- a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
+++ b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
@@ -676,7 +676,7 @@ TEST(CompletionTest, IncludeInsertionPreprocessorIntegrationTests) {
   Symbol Sym = cls("ns::X");
   Sym.CanonicalDeclaration.FileURI = BarURI.c_str();
   Sym.IncludeHeaders.emplace_back(BarURI, 1);
-  // Shoten include path based on search dirctory and insert.
+  // Shoten include path based on search directory and insert.
   auto Results = completions(Server,
                              R"cpp(
           int main() { ns::^ }
@@ -719,7 +719,7 @@ TEST(CompletionTest, NoIncludeInsertionWhenDeclFoundInFile) {
   SymY.CanonicalDeclaration.FileURI = BarURI.c_str();
   SymX.IncludeHeaders.emplace_back("<bar>", 1);
   SymY.IncludeHeaders.emplace_back("<bar>", 1);
-  // Shoten include path based on search dirctory and insert.
+  // Shoten include path based on search directory and insert.
   auto Results = completions(Server,
                              R"cpp(
           namespace ns {

diff  --git a/clang-tools-extra/clangd/unittests/HoverTests.cpp b/clang-tools-extra/clangd/unittests/HoverTests.cpp
index 69e65c98cbdf..4c6d2abbd24a 100644
--- a/clang-tools-extra/clangd/unittests/HoverTests.cpp
+++ b/clang-tools-extra/clangd/unittests/HoverTests.cpp
@@ -1411,7 +1411,7 @@ TEST(Hover, All) {
           )cpp",
           [](HoverInfo &HI) { HI.Name = "int"; }},
       {
-          R"cpp(// More compilcated structured types.
+          R"cpp(// More complicated structured types.
             int bar();
             ^[[auto]] (*foo)() = bar;
           )cpp",

diff  --git a/clang-tools-extra/clangd/unittests/RenameTests.cpp b/clang-tools-extra/clangd/unittests/RenameTests.cpp
index e98bf78323b9..be491546aca8 100644
--- a/clang-tools-extra/clangd/unittests/RenameTests.cpp
+++ b/clang-tools-extra/clangd/unittests/RenameTests.cpp
@@ -30,7 +30,7 @@ using testing::IsEmpty;
 using testing::UnorderedElementsAre;
 using testing::UnorderedElementsAreArray;
 
-// Covnert a Range to a Ref.
+// Convert a Range to a Ref.
 Ref refWithRange(const clangd::Range &Range, const std::string &URI) {
   Ref Result;
   Result.Kind = RefKind::Reference;
@@ -460,14 +460,14 @@ TEST(RenameTest, Renameable) {
       )cpp",
        "used outside main file", HeaderFile, Index},
 
-      {R"cpp(// disallow -- symbol in annonymous namespace in header is not indexable.
+      {R"cpp(// disallow -- symbol in anonymous namespace in header is not indexable.
         namespace {
         class Unin^dexable {};
         }
       )cpp",
        "not eligible for indexing", HeaderFile, Index},
 
-      {R"cpp(// allow -- symbol in annonymous namespace in non-header file is indexable.
+      {R"cpp(// allow -- symbol in anonymous namespace in non-header file is indexable.
         namespace {
         class [[F^oo]] {};
         }

diff  --git a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
index 1f9976b51ed0..c25fbcd93149 100644
--- a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
@@ -305,7 +305,7 @@ TEST(SymbolInfoTests, All) {
               {CreateExpectedSymbolDetails("bar", "foo",
                                            "c:TestTU.cpp at 50@F at foo#I#@bar")}},
           {
-              R"cpp( // Type inferrence with auto keyword
+              R"cpp( // Type inference with auto keyword
           struct foo {};
           foo getfoo() { return foo{}; }
           void f() {

diff  --git a/clang-tools-extra/clangd/unittests/SyncAPI.cpp b/clang-tools-extra/clangd/unittests/SyncAPI.cpp
index 5c7949ab41ba..130a76bc070f 100644
--- a/clang-tools-extra/clangd/unittests/SyncAPI.cpp
+++ b/clang-tools-extra/clangd/unittests/SyncAPI.cpp
@@ -56,7 +56,7 @@ template <typename T> struct CaptureProxy {
 private:
   llvm::Optional<T> *Target;
   // Using shared_ptr to workaround compilation errors with MSVC.
-  // MSVC only allows default-construcitble and copyable objects as future<>
+  // MSVC only allows default-constructible and copyable objects as future<>
   // arguments.
   std::promise<std::shared_ptr<T>> Promise;
   std::future<std::shared_ptr<T>> Future;

diff  --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
index e34ce0bcd3c5..1203f3e6e5c7 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -176,7 +176,7 @@ TEST_F(TUSchedulerTests, MissingFiles) {
 TEST_F(TUSchedulerTests, WantDiagnostics) {
   std::atomic<int> CallbackCount(0);
   {
-    // To avoid a racy test, don't allow tasks to actualy run on the worker
+    // To avoid a racy test, don't allow tasks to actually run on the worker
     // thread until we've scheduled them all.
     Notification Ready;
     TUScheduler S(

diff  --git a/clang-tools-extra/clangd/unittests/TweakTests.cpp b/clang-tools-extra/clangd/unittests/TweakTests.cpp
index 88decb6a04ef..38f958c96173 100644
--- a/clang-tools-extra/clangd/unittests/TweakTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TweakTests.cpp
@@ -270,7 +270,7 @@ TEST_F(ExtractVariableTest, Test) {
         a = [[a + 1]];
       // lambda
       auto lamb = [&[[a]], &[[b]]](int r = [[1]]) {return 1;}
-      // assigment
+      // assignment
       xyz([[a = 5]]);
       xyz([[a *= 5]]);
       // Variable DeclRefExpr

diff  --git a/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp b/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
index 0247e1e9fed7..76137850b91f 100644
--- a/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
@@ -50,7 +50,7 @@ ::testing::Matcher<TypeHierarchyItem> Children(ChildMatchers... ChildrenM) {
   return Field(&TypeHierarchyItem::children,
                HasValue(UnorderedElementsAre(ChildrenM...)));
 }
-// Note: "not resolved" is 
diff ernt from "resolved but empty"!
+// Note: "not resolved" is 
diff erent from "resolved but empty"!
 MATCHER(ParentsNotResolved, "") { return !arg.parents; }
 MATCHER(ChildrenNotResolved, "") { return !arg.children; }
 

diff  --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
index 51a7f81dcb5a..a08d117fc2f8 100644
--- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp
+++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
@@ -187,7 +187,7 @@ TEST(LocateSymbol, WithIndex) {
   EXPECT_THAT(LocateWithIndex(Test),
               ElementsAre(Sym("Foo", Test.range(), SymbolHeader.range("foo"))));
 
-  Test = Annotations(R"cpp(// defintion in AST.
+  Test = Annotations(R"cpp(// definition in AST.
         class [[Forward]] {};
         F^orward create();
       )cpp");

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst
index 9bcbcabf6ed8..18a7d4ef3dbf 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-branch-clone.rst
@@ -57,7 +57,7 @@ the code. For example:
 
 Here the check reports that the ``'a'`` and ``'A'`` branches are identical
 (and that the ``'b'`` and ``'B'`` branches are also identical), but does not
-report that the ``default:`` branch is also idenical to the first two branches.
+report that the ``default:`` branch is also identical to the first two branches.
 If this is indeed the correct behavior, then it could be implemented as:
 
 .. code-block:: c++

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/cert-mem57-cpp.rst b/clang-tools-extra/docs/clang-tidy/checks/cert-mem57-cpp.rst
index 5a5c343e50b1..135cfb86f3d5 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cert-mem57-cpp.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cert-mem57-cpp.rst
@@ -5,7 +5,7 @@ cert-mem57-cpp
 
 This check flags uses of default ``operator new`` where the type has extended
 alignment (an alignment greater than the fundamental alignment). (The default
-``operator new`` is guaranteed to provide the correct alignmment if the
+``operator new`` is guaranteed to provide the correct alignment if the
 requested alignment is less or equal to the fundamental alignment).
 Only cases are detected (by design) where the ``operator new`` is not
 user-defined and is not a placement new (the reason is that in these cases we

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp-undelegated-constructor.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
index db521c5838c6..38fba423bb11 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/hicpp-undelegated-constructor.rst
@@ -1,4 +1,4 @@
-.. title:: clang-tidy - hicpp-undelegated-construtor
+.. title:: clang-tidy - hicpp-undelegated-constructor
 .. meta::
    :http-equiv=refresh: 5;URL=bugprone-undelegated-constructor.html
 

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst
index b9b4a5e05084..c419b0304d4b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst
@@ -9,7 +9,7 @@ This check will try to enforce coding guidelines on the identifiers naming. It
 supports one of the following casing types and tries to convert from one to
 another if a mismatch is detected
 
-Casing types inclde:
+Casing types include:
 
  - ``lower_case``,
  - ``UPPER_CASE``,

diff  --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index 1905fdf4e2aa..749afdfd18ef 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -20,7 +20,7 @@
 // map.
 //
 // Modularize takes as input either one or more module maps (by default,
-// "module.modulemap") or one or more text files contatining lists of headers
+// "module.modulemap") or one or more text files containing lists of headers
 // to check.
 //
 // In the case of a module map, the module map must be well-formed in

diff  --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp
index d54d76cbc675..c5e08246c28d 100644
--- a/clang-tools-extra/modularize/PreprocessorTracker.cpp
+++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp
@@ -54,7 +54,7 @@
 // To check for '#include' directives nested inside 'Extern "C/C++" {}'
 // or 'namespace {}' blocks, we keep track of the '#include' directives
 // while running the preprocessor, and later during a walk of the AST
-// we call a function to check for any '#include' directies inside
+// we call a function to check for any '#include' directives inside
 // an 'Extern "C/C++" {}' or 'namespace {}' block, given its source
 // range.
 //
@@ -1271,7 +1271,7 @@ class PreprocessorTrackerImpl : public PreprocessorTracker {
 
 // PreprocessorTracker functions.
 
-// PreprocessorTracker desctructor.
+// PreprocessorTracker destructor.
 PreprocessorTracker::~PreprocessorTracker() {}
 
 // Create instance of PreprocessorTracker.

diff  --git a/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp b/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp
index 6000dcb3a87e..afc3f8b3604d 100644
--- a/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp
+++ b/clang-tools-extra/pp-trace/PPCallbacksTracker.cpp
@@ -221,7 +221,7 @@ void PPCallbacksTracker::PragmaMessage(SourceLocation Loc,
   appendArgument("Str", Str);
 }
 
-// Callback invoked when a #pragma gcc dianostic push directive
+// Callback invoked when a #pragma gcc diagnostic push directive
 // is read.
 void PPCallbacksTracker::PragmaDiagnosticPush(SourceLocation Loc,
                                               llvm::StringRef Namespace) {
@@ -230,7 +230,7 @@ void PPCallbacksTracker::PragmaDiagnosticPush(SourceLocation Loc,
   appendArgument("Namespace", Namespace);
 }
 
-// Callback invoked when a #pragma gcc dianostic pop directive
+// Callback invoked when a #pragma gcc diagnostic pop directive
 // is read.
 void PPCallbacksTracker::PragmaDiagnosticPop(SourceLocation Loc,
                                              llvm::StringRef Namespace) {
@@ -239,7 +239,7 @@ void PPCallbacksTracker::PragmaDiagnosticPop(SourceLocation Loc,
   appendArgument("Namespace", Namespace);
 }
 
-// Callback invoked when a #pragma gcc dianostic directive is read.
+// Callback invoked when a #pragma gcc diagnostic directive is read.
 void PPCallbacksTracker::PragmaDiagnostic(SourceLocation Loc,
                                           llvm::StringRef Namespace,
                                           diag::Severity Mapping,

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc-custom.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc-custom.cpp
index 89142fbd5130..ebf37fa35995 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc-custom.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc-custom.cpp
@@ -54,6 +54,6 @@ void arbitrary_call() {
   // we dont want every function to raise the warning even if malloc is in the name
   malloced_array(); // OK(2)
 
-  // completly unrelated function call to malloc
+  // completely unrelated function call to malloc
   newed_array(); // OK(3)
 }

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc.cpp
index 7b7ccf3b05e9..ccbe0efa9963 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc.cpp
@@ -37,6 +37,6 @@ void arbitrary_call() {
   // we dont want every function to raise the warning even if malloc is in the name
   malloced_array(); // OK(2)
 
-  // completly unrelated function call to malloc
+  // completely unrelated function call to malloc
   newed_array(); // OK(3)
 }

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-owning-memory-containers.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-owning-memory-containers.cpp
index d39e697c6bdf..d7650b1c87f4 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-owning-memory-containers.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-owning-memory-containers.cpp
@@ -29,7 +29,7 @@ class vector {
 
 } // namespace std
 
-// All of the following codesnippets should be valid with appropriate 'owner<>' anaylsis,
+// All of the following codesnippets should be valid with appropriate 'owner<>' analysis,
 // but currently the type information of 'gsl::owner<>' gets lost in typededuction.
 int main() {
   std::vector<gsl::owner<int *>> OwnerStdVector(100, nullptr);

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique.cpp
index 4cc195dabdde..35a6dd0b7d00 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique.cpp
@@ -451,7 +451,7 @@ void initialization(int T, Base b) {
   // CHECK-FIXES: FI = std::make_unique<int[]>(5);
 
   // The check doesn't give warnings and fixes for cases where the original new
-  // expresion doesn't do any initialization.
+  // expression doesn't do any initialization.
   FI.reset(new int[5]);
   FI.reset(new int[Num]);
   FI.reset(new int[Num2]);

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/modernize-use-nullptr-basic.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize-use-nullptr-basic.cpp
index 5fd823b754e6..2579099148e3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize-use-nullptr-basic.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize-use-nullptr-basic.cpp
@@ -304,8 +304,8 @@ void test_const_pointers_abiguous() {
   // CHECK-FIXES: const_ambiguous_function((int*)nullptr);
 }
 
-// Test where the implicit cast to null is surrounded by another implict cast
-// with possible explict casts in-between.
+// Test where the implicit cast to null is surrounded by another implicit cast
+// with possible explicit casts in-between.
 void test_const_pointers() {
   const int *const_p1 = 0;
   // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: use nullptr

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.m b/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.m
index 0a9ea0639ecd..f315e6883088 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.m
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.m
@@ -9,7 +9,7 @@
 // not raise performance-unnecessary-value-param.
 void foo(id object) { }
 
-// Same for explcitly non-ARC-managed Objective-C objects.
+// Same for explicitly non-ARC-managed Objective-C objects.
 void bar(__unsafe_unretained id object) { }
 
 // Same for Objective-c classes.

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.mm b/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.mm
index 4ed05069a4b5..8e07cedb7d7c 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.mm
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-value-param-arc.mm
@@ -9,7 +9,7 @@
 // not raise performance-unnecessary-value-param.
 void foo(id object) { }
 
-// Same for explcitly non-ARC-managed Objective-C objects.
+// Same for explicitly non-ARC-managed Objective-C objects.
 void bar(__unsafe_unretained id object) { }
 
 // Same for Objective-c classes.

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-declaration.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-declaration.cpp
index 47c9584311b9..d86a456971e1 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-declaration.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability-redundant-declaration.cpp
@@ -10,7 +10,7 @@
 // RUN:             [{key: readability-redundant-declaration.IgnoreMacros, \
 // RUN:               value: 0}]}" -- -fms-compatibility -DEXTERNINLINE
 //
-// With -fno-ms-compatiblity, DEXTERNINLINE causes additional output.
+// With -fno-ms-compatibility, DEXTERNINLINE causes additional output.
 // (The leading ',' means "default checks in addition to NOMSCOMPAT checks.)
 // RUN: %check_clang_tidy -check-suffix=,NOMSCOMPAT \
 // RUN:   %s readability-redundant-declaration %t -- \

diff  --git a/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/FindAllSymbolsTests.cpp b/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
index 179ad2587739..8f75db8355a9 100644
--- a/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
+++ b/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
@@ -198,8 +198,8 @@ TEST_F(FindAllSymbolsTest, ExternCSymbols) {
 TEST_F(FindAllSymbolsTest, CXXRecordSymbols) {
   static const char Header[] = R"(
       struct Glob {};
-      struct A; // Not a defintion, ignored.
-      class NOP; // Not a defintion, ignored
+      struct A; // Not a definition, ignored.
+      class NOP; // Not a definition, ignored
       namespace na {
       struct A {
         struct AAAA {};


        


More information about the cfe-commits mailing list