[clang-tools-extra] dd5571d - [clang-tools-extra] NFC: Fix trivial typo in documents and comments

Kazuaki Ishizaki via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 4 23:28:56 PDT 2020


Author: Kazuaki Ishizaki
Date: 2020-04-05T15:28:40+09:00
New Revision: dd5571d51a0f6164cb66d02c8cd0e7032e42abe4

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

LOG: [clang-tools-extra] NFC: Fix trivial typo in documents and comments

Differential Revision: https://reviews.llvm.org/D77458

Added: 
    

Modified: 
    clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
    clang-tools-extra/clang-change-namespace/ChangeNamespace.h
    clang-tools-extra/clang-doc/Generators.cpp
    clang-tools-extra/clang-doc/Serialize.cpp
    clang-tools-extra/clang-include-fixer/IncludeFixer.h
    clang-tools-extra/clang-include-fixer/IncludeFixerContext.h
    clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
    clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
    clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
    clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
    clang-tools-extra/clang-move/Move.cpp
    clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
    clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp
    clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp
    clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
    clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
    clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
    clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
    clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
    clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
    clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
    clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp
    clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.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/modernize/UseTrailingReturnTypeCheck.cpp
    clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
    clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
    clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
    clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp
    clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
    clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
    clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
    clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
    clang-tools-extra/clangd/AST.cpp
    clang-tools-extra/clangd/ClangdLSPServer.h
    clang-tools-extra/clangd/Diagnostics.cpp
    clang-tools-extra/clangd/FindSymbols.h
    clang-tools-extra/clangd/FindTarget.cpp
    clang-tools-extra/clangd/FindTarget.h
    clang-tools-extra/clangd/FormattedString.cpp
    clang-tools-extra/clangd/Hover.cpp
    clang-tools-extra/clangd/Hover.h
    clang-tools-extra/clangd/ParsedAST.cpp
    clang-tools-extra/clangd/PathMapping.cpp
    clang-tools-extra/clangd/Preamble.cpp
    clang-tools-extra/clangd/Quality.cpp
    clang-tools-extra/clangd/QueryDriverDatabase.cpp
    clang-tools-extra/clangd/index/Background.cpp
    clang-tools-extra/clangd/index/Serialization.cpp
    clang-tools-extra/clangd/index/SymbolOrigin.h
    clang-tools-extra/clangd/index/dex/Trigram.cpp
    clang-tools-extra/clangd/refactor/Rename.cpp
    clang-tools-extra/clangd/refactor/Rename.h
    clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
    clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
    clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
    clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
    clang-tools-extra/clangd/tool/ClangdMain.cpp
    clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
    clang-tools-extra/clangd/unittests/FindTargetTests.cpp
    clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp
    clang-tools-extra/clangd/unittests/PathMappingTests.cpp
    clang-tools-extra/clangd/unittests/RenameTests.cpp
    clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
    clang-tools-extra/clangd/unittests/TweakTests.cpp
    clang-tools-extra/docs/clang-tidy/checks/bugprone-misplaced-pointer-arithmetic-in-alloc.rst
    clang-tools-extra/docs/clang-tidy/checks/bugprone-virtual-near-miss.rst
    clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
    clang-tools-extra/docs/clang-tidy/checks/portability-restrict-system-includes.rst
    clang-tools-extra/docs/clang-tidy/checks/readability-convert-member-functions-to-static.rst
    clang-tools-extra/docs/clang-tidy/checks/readability-make-member-function-const.rst
    clang-tools-extra/docs/doxygen.cfg.in
    clang-tools-extra/docs/pp-trace.rst
    clang-tools-extra/modularize/CoverageChecker.cpp
    clang-tools-extra/modularize/CoverageChecker.h
    clang-tools-extra/modularize/Modularize.cpp
    clang-tools-extra/modularize/PreprocessorTracker.cpp
    clang-tools-extra/pp-trace/PPCallbacksTracker.h
    clang-tools-extra/test/clang-move/move-used-helper-decls.cpp
    clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header-fixed.h
    clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header.h
    clang-tools-extra/test/clang-tidy/checkers/abseil-duration-subtraction.cpp
    clang-tools-extra/test/clang-tidy/checkers/bugprone-branch-clone.cpp
    clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp
    clang-tools-extra/test/clang-tidy/checkers/cert-throw-exception-type.cpp
    clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-no-malloc-custom.cpp
    clang-tools-extra/test/clang-tidy/checkers/fuchsia-multiple-inheritance.cpp
    clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-bug34747.cpp
    clang-tools-extra/test/clang-tidy/checkers/modernize-make-unique.cpp
    clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp
    clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
    clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
    clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
index a25e3e5bcd00..5f4a889cab9e 100644
--- a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
+++ b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
@@ -832,7 +832,7 @@ void ChangeNamespaceTool::replaceQualifiedSymbolInDeclContext(
       std::string AliasName = NamespaceAlias->getNameAsString();
       std::string AliasQualifiedName =
           NamespaceAlias->getQualifiedNameAsString();
-      // We only consider namespace aliases define in the global namepspace or
+      // We only consider namespace aliases define in the global namespace or
       // in namespaces that are directly visible from the reference, i.e.
       // ancestor of the `OldNs`. Note that declarations in ancestor namespaces
       // but not visible in the new namespace is filtered out by

diff  --git a/clang-tools-extra/clang-change-namespace/ChangeNamespace.h b/clang-tools-extra/clang-change-namespace/ChangeNamespace.h
index 293d5ce83433..147675911941 100644
--- a/clang-tools-extra/clang-change-namespace/ChangeNamespace.h
+++ b/clang-tools-extra/clang-change-namespace/ChangeNamespace.h
@@ -27,7 +27,7 @@ namespace change_namespace {
 // reference needs to be fully-qualified, this adds a "::" prefix to the
 // namespace specifiers unless the new namespace is the global namespace.
 // For classes, only classes that are declared/defined in the given namespace in
-// speficifed files will be moved: forward declarations will remain in the old
+// specified files will be moved: forward declarations will remain in the old
 // namespace.
 // For example, changing "a" to "x":
 // Old code:
@@ -138,7 +138,7 @@ class ChangeNamespaceTool : public ast_matchers::MatchFinder::MatchCallback {
   llvm::Regex FilePatternRE;
   // Information about moved namespaces grouped by file.
   // Since we are modifying code in old namespaces (e.g. add namespace
-  // spedifiers) as well as moving them, we store information about namespaces
+  // specifiers) as well as moving them, we store information about namespaces
   // to be moved and only move them after all modifications are finished (i.e.
   // in `onEndOfTranslationUnit`).
   std::map<std::string, std::vector<MoveNamespace>> MoveNamespaces;

diff  --git a/clang-tools-extra/clang-doc/Generators.cpp b/clang-tools-extra/clang-doc/Generators.cpp
index fda5ab503bed..ec7133466f2e 100644
--- a/clang-tools-extra/clang-doc/Generators.cpp
+++ b/clang-tools-extra/clang-doc/Generators.cpp
@@ -82,7 +82,7 @@ void Generator::addInfoToIndex(Index &Idx, const doc::Info *Info) {
     // pointing.
     auto It = std::find(I->Children.begin(), I->Children.end(), R.USR);
     if (It != I->Children.end()) {
-      // If it is found, just change I to point the namespace refererence found.
+      // If it is found, just change I to point the namespace reference found.
       I = &*It;
     } else {
       // If it is not found a new reference is created

diff  --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp
index 54ee58960b22..e132c56cb000 100644
--- a/clang-tools-extra/clang-doc/Serialize.cpp
+++ b/clang-tools-extra/clang-doc/Serialize.cpp
@@ -36,7 +36,7 @@ populateParentNamespaces(llvm::SmallVector<Reference, 4> &Namespaces,
 // <root>/A/B
 //
 // namespace A {
-// namesapce B {
+// namespace B {
 //
 // class C {};
 //

diff  --git a/clang-tools-extra/clang-include-fixer/IncludeFixer.h b/clang-tools-extra/clang-include-fixer/IncludeFixer.h
index 1ec1c50275a4..c941509fe6e2 100644
--- a/clang-tools-extra/clang-include-fixer/IncludeFixer.h
+++ b/clang-tools-extra/clang-include-fixer/IncludeFixer.h
@@ -62,7 +62,7 @@ class IncludeFixerActionFactory : public clang::tooling::ToolAction {
 };
 
 /// Create replacements, which are generated by clang-format, for the
-/// missing header and mising qualifiers insertions. The function uses the
+/// missing header and missing qualifiers insertions. The function uses the
 /// first header for insertion.
 ///
 /// \param Code The source code.

diff  --git a/clang-tools-extra/clang-include-fixer/IncludeFixerContext.h b/clang-tools-extra/clang-include-fixer/IncludeFixerContext.h
index e55597f90ed5..e819d30b2915 100644
--- a/clang-tools-extra/clang-include-fixer/IncludeFixerContext.h
+++ b/clang-tools-extra/clang-include-fixer/IncludeFixerContext.h
@@ -37,7 +37,7 @@ class IncludeFixerContext {
 
     /// The qualifiers of the scope in which SymbolIdentifier lookup
     /// occurs. It is represented as a sequence of names and scope resolution
-    /// operatiors ::, ending with a scope resolution operator (e.g. a::b::).
+    /// operators ::, ending with a scope resolution operator (e.g. a::b::).
     /// Empty if SymbolIdentifier is not in a specific scope.
     std::string ScopedQualifiers;
 

diff  --git a/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp b/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
index 7b827536e0ae..97015f2468e9 100644
--- a/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
+++ b/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp
@@ -25,7 +25,7 @@ using find_all_symbols::SymbolAndSignals;
 // related to the given source file.
 static double similarityScore(llvm::StringRef FileName,
                               llvm::StringRef Header) {
-  // Compute the maximum number of common path segements between Header and
+  // Compute the maximum number of common path segments between Header and
   // a suffix of FileName.
   // We do not do a full longest common substring computation, as Header
   // specifies the path we would directly #include, so we assume it is rooted

diff  --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp b/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
index a2a98a261c02..7d540d83037b 100644
--- a/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
+++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
@@ -128,7 +128,7 @@ void FindAllSymbols::registerMatchers(MatchFinder *MatchFinder) {
   auto HasNSOrTUCtxMatcher =
       hasDeclContext(anyOf(namespaceDecl(), translationUnitDecl()));
 
-  // We need seperate rules for C record types and C++ record types since some
+  // We need separate rules for C record types and C++ record types since some
   // template related matchers are inapplicable on C record declarations.
   //
   // Matchers specific to C++ code.

diff  --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
index 02b100bd849b..8655af137bb2 100755
--- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
@@ -46,7 +46,7 @@ def find_compilation_database(path):
 
 
 def MergeSymbols(directory, args):
-  """Merge all symbol files (yaml) in a given directaory into a single file."""
+  """Merge all symbol files (yaml) in a given directory into a single file."""
   invocation = [args.binary, '-merge-dir='+directory, args.saving_path]
   subprocess.call(invocation)
   print 'Merge is finished. Saving results in ' + args.saving_path

diff  --git a/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py b/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
index e3a52f094f66..62bd07365a99 100644
--- a/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
+++ b/clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
@@ -146,7 +146,7 @@ def main():
                       help='clang-include-fixer input format.')
   parser.add_argument('-input', default='',
                       help='String to initialize the database.')
-  # Don't throw exception when parsing unknown arguements to make the script
+  # Don't throw exception when parsing unknown arguments to make the script
   # work in neovim.
   # Neovim (at least v0.2.1) somehow mangles the sys.argv in a weird way: it
   # will pass additional arguments (e.g. "-c script_host.py") to sys.argv,

diff  --git a/clang-tools-extra/clang-move/Move.cpp b/clang-tools-extra/clang-move/Move.cpp
index ebeb5d001920..28184a0dce0c 100644
--- a/clang-tools-extra/clang-move/Move.cpp
+++ b/clang-tools-extra/clang-move/Move.cpp
@@ -145,7 +145,7 @@ class FindAllIncludes : public PPCallbacks {
   ClangMoveTool *const MoveTool;
 };
 
-/// Add a declatration being moved to new.h/cc. Note that the declaration will
+/// Add a declaration being moved to new.h/cc. Note that the declaration will
 /// also be deleted in old.h/cc.
 void MoveDeclFromOldFileToNewFile(ClangMoveTool *MoveTool, const NamedDecl *D) {
   MoveTool->getMovedDecls().push_back(D);
@@ -453,7 +453,7 @@ createInsertedReplacements(const std::vector<std::string> &Includes,
 }
 
 // Return a set of all decls which are used/referenced by the given Decls.
-// Specically, given a class member declaration, this method will return all
+// Specifically, given a class member declaration, this method will return all
 // decls which are used by the whole class.
 llvm::DenseSet<const Decl *>
 getUsedDecls(const HelperDeclRefGraph *RG,
@@ -767,7 +767,7 @@ void ClangMoveTool::removeDeclsInOldFiles() {
       // FIXME: Minimize the include path like clang-include-fixer.
       std::string IncludeNewH =
           "#include \"" + Context->Spec.NewHeader + "\"\n";
-      // This replacment for inserting header will be cleaned up at the end.
+      // This replacement for inserting header will be cleaned up at the end.
       auto Err = FileAndReplacements.second.add(
           tooling::Replacement(FilePath, UINT_MAX, 0, IncludeNewH));
       if (Err)
@@ -810,7 +810,7 @@ void ClangMoveTool::moveDeclsToNewFiles() {
   std::vector<const NamedDecl *> ActualNewCCDecls;
 
   // Filter out all unused helpers in NewCCDecls.
-  // We only move the used helpers (including transively used helpers) and the
+  // We only move the used helpers (including transitively used helpers) and the
   // given symbols being moved.
   for (const auto *D : NewCCDecls) {
     if (llvm::is_contained(HelperDeclarations, D) &&

diff  --git a/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp b/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
index 4bcb46b39032..c17a43c73f95 100644
--- a/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
+++ b/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
@@ -116,7 +116,7 @@ findMembersUsedInInitExpr(const CXXCtorInitializer *Initializer,
 
 /// Reorders fields in the definition of a struct/class.
 ///
-/// At the moment reodering of fields with
+/// At the moment reordering of fields with
 /// 
diff erent accesses (public/protected/private) is not supported.
 /// \returns true on success.
 static bool reorderFieldsInDefinition(
@@ -133,7 +133,7 @@ static bool reorderFieldsInDefinition(
   for (const auto *Field : Definition->fields()) {
     const auto FieldIndex = Field->getFieldIndex();
     if (Field->getAccess() != Fields[NewFieldsOrder[FieldIndex]]->getAccess()) {
-      llvm::errs() << "Currently reodering of fields with 
diff erent accesses "
+      llvm::errs() << "Currently reordering of fields with 
diff erent accesses "
                       "is not supported\n";
       return false;
     }

diff  --git a/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp b/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp
index 6e678c9f6010..b58288500dcf 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp
@@ -51,7 +51,7 @@ static double GetValue(const IntegerLiteral *IntLit,
 
 // Given the scale of a duration and a `Multiplier`, determine if `Multiplier`
 // would produce a new scale.  If so, return a tuple containing the new scale
-// and a suitable Multipler for that scale, otherwise `None`.
+// and a suitable Multiplier for that scale, otherwise `None`.
 static llvm::Optional<std::tuple<DurationScale, double>>
 GetNewScaleSingleStep(DurationScale OldScale, double Multiplier) {
   switch (OldScale) {

diff  --git a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp
index 3466cdbbdcff..39ee86b34f3f 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp
@@ -41,7 +41,7 @@ getDurationInverseForScale(DurationScale Scale) {
   static const llvm::IndexedMap<std::pair<llvm::StringRef, llvm::StringRef>,
                                 DurationScale2IndexFunctor>
       InverseMap = []() {
-        // TODO: Revisit the immediately invoked lamba technique when
+        // TODO: Revisit the immediately invoked lambda technique when
         // IndexedMap gets an initializer list constructor.
         llvm::IndexedMap<std::pair<llvm::StringRef, llvm::StringRef>,
                          DurationScale2IndexFunctor>

diff  --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
index a3866651dced..368aa576c5f4 100644
--- a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
@@ -96,7 +96,7 @@ void TimeSubtractionCheck::registerMatchers(MatchFinder *Finder) {
        {"Hours", "Minutes", "Seconds", "Millis", "Micros", "Nanos"}) {
     std::string TimeInverse = (llvm::Twine("ToUnix") + ScaleName).str();
     llvm::Optional<DurationScale> Scale = getScaleForTimeInverse(TimeInverse);
-    assert(Scale && "Unknow scale encountered");
+    assert(Scale && "Unknown scale encountered");
 
     auto TimeInverseMatcher = callExpr(callee(
         functionDecl(hasName((llvm::Twine("::absl::") + TimeInverse).str()))

diff  --git a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
index e40b27585d3d..e5f9ebd48626 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
@@ -130,7 +130,7 @@ void BranchCloneCheck::check(const MatchFinder::MatchResult &Result) {
         KnownAsClone[j] = true;
 
         if (NumCopies == 2) {
-          // We report the first occurence only when we find the second one.
+          // We report the first occurrence only when we find the second one.
           diag(Branches[i]->getBeginLoc(),
                "repeated branch in conditional chain");
           SourceLocation End =
@@ -204,7 +204,7 @@ void BranchCloneCheck::check(const MatchFinder::MatchResult &Result) {
 
         SourceLocation EndLoc = (EndCurrent - 1)->back()->getEndLoc();
         // If the case statement is generated from a macro, it's SourceLocation
-        // may be invalid, resuling in an assertation failure down the line.
+        // may be invalid, resulting in an assertion failure down the line.
         // While not optimal, try the begin location in this case, it's still
         // better then nothing.
         if (EndLoc.isInvalid())

diff  --git a/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp
index e77c981c4ca5..d3bcdb23959a 100644
--- a/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp
@@ -115,7 +115,7 @@ void FoldInitTypeCheck::doCheck(const BuiltinType &IterValueType,
 }
 
 void FoldInitTypeCheck::check(const MatchFinder::MatchResult &Result) {
-  // Given the iterator and init value type retreived by the matchers,
+  // Given the iterator and init value type retrieved by the matchers,
   // we check that the ::value_type of the iterator is compatible with
   // the init value type.
   const auto *InitType = Result.Nodes.getNodeAs<BuiltinType>("InitType");

diff  --git a/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
index 3e6f9fde1b97..10bbcb85420f 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
@@ -74,7 +74,7 @@ void MisplacedOperatorInStrlenInAllocCheck::check(
   const Expr *Alloc = Result.Nodes.getNodeAs<CallExpr>("Alloc");
   if (!Alloc)
     Alloc = Result.Nodes.getNodeAs<CXXNewExpr>("Alloc");
-  assert(Alloc && "Matched node bound by 'Alloc' shoud be either 'CallExpr'"
+  assert(Alloc && "Matched node bound by 'Alloc' should be either 'CallExpr'"
          " or 'CXXNewExpr'");
 
   const auto *StrLen = Result.Nodes.getNodeAs<CallExpr>("StrLen");

diff  --git a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
index fb0d435a20dc..1eb5a2fa35e7 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
@@ -220,7 +220,7 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
           .bind("sizeof-sizeof-expr"),
       this);
 
-  // Detect sizeof in pointer aritmetic like: N * sizeof(S) == P1 - P2 or
+  // Detect sizeof in pointer arithmetic like: N * sizeof(S) == P1 - P2 or
   // (P1 - P2) / sizeof(S) where P1 and P2 are pointers to type S.
   const auto PtrDiffExpr = binaryOperator(
       hasOperatorName("-"),

diff  --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
index 192403789472..ec088ec8de32 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
@@ -156,7 +156,7 @@ void SuspiciousEnumUsageCheck::checkSuspiciousBitmaskUsage(
   const auto *EnumConst =
       EnumExpr ? dyn_cast<EnumConstantDecl>(EnumExpr->getDecl()) : nullptr;
 
-  // Report the parameter if neccessary.
+  // Report the parameter if necessary.
   if (!EnumConst) {
     diag(EnumDec->getInnerLocStart(), BitmaskVarErrorMessage)
         << countNonPowOfTwoLiteralNum(EnumDec);

diff  --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp
index 09409d87020c..b21fea185e21 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp
@@ -104,7 +104,7 @@ void SuspiciousMissingCommaCheck::check(
   if (Size < SizeThreshold)
     return;
 
-  // Count the number of occurence of concatenated string literal.
+  // Count the number of occurrence of concatenated string literal.
   unsigned int Count = 0;
   for (unsigned int i = 0; i < Size; ++i) {
     const Expr *Child = InitializerList->getInit(i)->IgnoreImpCasts();

diff  --git a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp
index 40008797207e..409950834c40 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp
@@ -49,7 +49,7 @@ void UnusedRaiiCheck::check(const MatchFinder::MatchResult &Result) {
   if (E->getBeginLoc().isMacroID())
     return;
 
-  // Don't emit a warning for the last statement in the surrounding compund
+  // Don't emit a warning for the last statement in the surrounding compound
   // statement.
   const auto *CS = Result.Nodes.getNodeAs<CompoundStmt>("compound");
   if (E == CS->body_back())

diff  --git a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
index daefc9eed314..c9722a2f1b24 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
@@ -110,7 +110,7 @@ bool UseAfterMoveFinder::find(Stmt *FunctionBody, const Expr *MovingCall,
                               UseAfterMove *TheUseAfterMove) {
   // Generate the CFG manually instead of through an AnalysisDeclContext because
   // it seems the latter can't be used to generate a CFG for the body of a
-  // labmda.
+  // lambda.
   //
   // We include implicit and temporary destructors in the CFG so that
   // destructors marked [[noreturn]] are handled correctly in the control flow

diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
index 905aee916d67..27ee0e48bb59 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
@@ -215,7 +215,7 @@ bool OwningMemoryCheck::handleLegacyConsumers(const BoundNodes &Nodes) {
   // Result of matching for legacy consumer-functions like `::free()`.
   const auto *LegacyConsumer = Nodes.getNodeAs<CallExpr>("legacy_consumer");
 
-  // FIXME: `freopen` should be handled seperately because it takes the filename
+  // FIXME: `freopen` should be handled separately because it takes the filename
   // as a pointer, which should not be an owner. The argument that is an owner
   // is known and the false positive coming from the filename can be avoided.
   if (LegacyConsumer) {

diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
index 485a07c5e375..da0794ade65e 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -189,7 +189,7 @@ computeInsertions(const CXXConstructorDecl::init_const_range &Inits,
               ? static_cast<const NamedDecl *>(Init->getAnyMember())
               : Init->getBaseClass()->getAsCXXRecordDecl();
 
-      // Add all fields between current field up until the next intializer.
+      // Add all fields between current field up until the next initializer.
       for (; Decl != std::end(OrderedDecls) && *Decl != InitDecl; ++Decl) {
         if (const auto *D = dyn_cast<T>(*Decl)) {
           if (DeclsToInit.count(D) > 0)

diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
index 9e5491cd5071..338fc1402388 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
@@ -69,7 +69,7 @@ class ProTypeMemberInitCheck : public ClangTidyCheck {
   bool IgnoreArrays;
 
   // Whether fix-its for initialization of fundamental type use assignment
-  // instead of brace initalization. Only effective in C++11 mode. Default is
+  // instead of brace initialization. Only effective in C++11 mode. Default is
   // false.
   bool UseAssignment;
 };

diff  --git a/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
index 7ac70dabf9ba..801124cd5f67 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
@@ -15,7 +15,7 @@ namespace clang {
 namespace tidy {
 namespace fuchsia {
 
-/// Mulitple implementation inheritance is discouraged.
+/// Multiple implementation inheritance is discouraged.
 ///
 /// For the user-facing documentation see:
 /// http://clang.llvm.org/extra/clang-tidy/checks/fuchsia-multiple-inheritance.html

diff  --git a/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp b/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
index 7416eb5f1031..1555201f0fa1 100644
--- a/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
+++ b/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
@@ -30,7 +30,7 @@ void ExceptionBaseclassCheck::registerMatchers(MatchFinder *Finder) {
                     hasType(substTemplateTypeParmType().bind("templ_type")))),
                 anything()),
           // Bind to the declaration of the type of the value that
-          // is thrown. 'anything()' is necessary to always suceed
+          // is thrown. 'anything()' is necessary to always succeed
           // in the 'eachOf' because builtin types are not
           // 'namedDecl'.
           eachOf(has(expr(hasType(namedDecl().bind("decl")))), anything()))

diff  --git a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
index e30b4f12902f..91e2cda0c24f 100644
--- a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
+++ b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
@@ -65,7 +65,7 @@ static std::pair<std::size_t, bool> countCaseLabels(const SwitchStmt *Switch) {
 }
 
 /// This function calculate 2 ** Bits and returns
-/// numeric_limits<std::size_t>::max() if an overflow occured.
+/// numeric_limits<std::size_t>::max() if an overflow occurred.
 static std::size_t twoPow(std::size_t Bits) {
   return Bits >= std::numeric_limits<std::size_t>::digits
              ? std::numeric_limits<std::size_t>::max()
@@ -153,7 +153,7 @@ void MultiwayPathsCoveredCheck::handleSwitchWithoutDefault(
   // matcher used for here does not match on degenerate 'switch'.
   assert(CaseCount > 0 && "Switch statement without any case found. This case "
                           "should be excluded by the matcher and is handled "
-                          "separatly.");
+                          "separately.");
   std::size_t MaxPathsPossible = [&]() {
     if (const auto *GeneralCondition =
             Result.Nodes.getNodeAs<DeclRefExpr>("non-enum-condition")) {

diff  --git a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp
index 05007e5d85a3..5b1dbf3ac33e 100644
--- a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp
@@ -202,7 +202,7 @@ void NoRecursionCheck::registerMatchers(MatchFinder *Finder) {
 void NoRecursionCheck::handleSCC(ArrayRef<CallGraphNode *> SCC) {
   assert(!SCC.empty() && "Empty SCC does not make sense.");
 
-  // First of all, call out every stongly connected function.
+  // First of all, call out every strongly connected function.
   for (CallGraphNode *N : SCC) {
     FunctionDecl *D = N->getDefinition();
     diag(D->getLocation(), "function %0 is within a recursive call chain") << D;
@@ -216,7 +216,7 @@ void NoRecursionCheck::handleSCC(ArrayRef<CallGraphNode *> SCC) {
   assert(!EventuallyCyclicCallStack.empty() && "We should've found the cycle");
 
   // While last node of the call stack does cause a loop, due to the way we
-  // pathfind the cycle, the loop does not nessesairly begin at the first node
+  // pathfind the cycle, the loop does not necessarily begin at the first node
   // of the call stack, so drop front nodes of the call stack until it does.
   const auto CyclicCallStack =
       ArrayRef<CallGraphNode::CallRecord>(EventuallyCyclicCallStack)
@@ -260,7 +260,7 @@ void NoRecursionCheck::check(const MatchFinder::MatchResult &Result) {
   CG.addToCallGraph(const_cast<TranslationUnitDecl *>(TU));
 
   // Look for cycles in call graph,
-  // by looking for Strongly Connected Comonents (SCC's)
+  // by looking for Strongly Connected Components (SCC's)
   for (llvm::scc_iterator<CallGraph *> SCCI = llvm::scc_begin(&CG),
                                        SCCE = llvm::scc_end(&CG);
        SCCI != SCCE; ++SCCI) {

diff  --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
index 237b2bdb36a9..08f817a4eeab 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
@@ -668,7 +668,7 @@ bool ForLoopIndexUseVisitor::TraverseCXXOperatorCallExpr(
 }
 
 /// If we encounter an array with IndexVar as the index of an
-/// ArraySubsriptExpression, note it as a consistent usage and prune the
+/// ArraySubscriptExpression, note it as a consistent usage and prune the
 /// AST traversal.
 ///
 /// For example, given

diff  --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
index 3466a8a17998..39410d6d0c14 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
@@ -123,7 +123,7 @@ void MakeSmartPtrCheck::check(const MatchFinder::MatchResult &Result) {
     return;
 
   // Be conservative for cases where we construct an array without any
-  // initalization.
+  // initialization.
   // For example,
   //    P.reset(new int[5]) // check fix: P = std::make_unique<int []>(5)
   //

diff  --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
index d0f1370a244e..b4d920f5d7df 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
@@ -333,7 +333,7 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) {
     const auto *V = cast<VarDecl>(Dec);
     const Expr *ExprInit = V->getInit();
 
-    // Skip expressions with cleanups from the intializer expression.
+    // Skip expressions with cleanups from the initializer expression.
     if (const auto *E = dyn_cast<ExprWithCleanups>(ExprInit))
       ExprInit = E->getSubExpr();
 

diff  --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
index 307297f249c6..37e4d24e9898 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -307,7 +307,7 @@ class CastSequenceVisitor : public RecursiveASTVisitor<CastSequenceVisitor> {
   /// SourceLocation pointing within the definition of another macro.
   bool getMacroAndArgLocations(SourceLocation Loc, SourceLocation &ArgLoc,
                                SourceLocation &MacroLoc) {
-    assert(Loc.isMacroID() && "Only reasonble to call this on macros");
+    assert(Loc.isMacroID() && "Only reasonable to call this on macros");
 
     ArgLoc = Loc;
 

diff  --git a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
index f9205920ecd5..87be93252227 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
@@ -442,7 +442,7 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
   // FIXME: this could be done better, by performing a lookup of all
   // unqualified names in the return type in the scope of the function. If the
   // lookup finds a 
diff erent entity than the original entity identified by the
-  // name, then we can either not perform a rewrite or explicitely qualify the
+  // name, then we can either not perform a rewrite or explicitly qualify the
   // entity. Such entities could be function parameter names, (inherited) class
   // members, template parameters, etc.
   UnqualNameVisitor UNV{*F};

diff  --git a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
index d987886b62b5..1647cb1f4c94 100644
--- a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
@@ -79,7 +79,7 @@ static CheckResult checkDef(const clang::FunctionDecl *Def,
   Result.Hints.push_back(FixItHint::CreateRemoval(Result.ConstRange));
 
   // Fix the definition and any visible declarations, but don't warn
-  // seperately for each declaration. Instead, associate all fixes with the
+  // separately for each declaration. Instead, associate all fixes with the
   // single warning at the definition.
   for (const FunctionDecl *Decl = Def->getPreviousDecl(); Decl != nullptr;
        Decl = Decl->getPreviousDecl()) {

diff  --git a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
index b9573747f636..22fce443a3e0 100644
--- a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
@@ -285,7 +285,7 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) {
               hasParent(stmt(anyOf(ifStmt(), whileStmt()), has(declStmt())))),
           // Exclude cases common to implicit cast to and from bool.
           unless(exceptionCases), unless(has(boolXor)),
-          // Retrive also parent statement, to check if we need additional
+          // Retrieve also parent statement, to check if we need additional
           // parens in replacement.
           anyOf(hasParent(stmt().bind("parentStmt")), anything()),
           unless(isInTemplateInstantiation()),

diff  --git a/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp b/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
index 32177adfe483..38e427238864 100644
--- a/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
@@ -137,7 +137,7 @@ declRanges(const DeclStmt *DS, const SourceManager &SM,
   // Consider the following case: 'int * pointer, value = 42;'
   // Created slices (inclusive)    [  ][       ] [         ]
   // Because 'getBeginLoc' points to the start of the variable *name*, the
-  // location of the pointer must be determined separatly.
+  // location of the pointer must be determined separately.
   SourceLocation Start = findStartOfIndirection(
       FirstDecl->getLocation(),
       countIndirections(FirstDecl->getType().IgnoreParens().getTypePtr()), SM,
@@ -150,7 +150,7 @@ declRanges(const DeclStmt *DS, const SourceManager &SM,
   if (FirstDecl->getType()->isFunctionPointerType())
     Start = findPreviousTokenKind(Start, SM, LangOpts, tok::l_paren);
 
-  // It is popssible that a declarator is wrapped with parens.
+  // It is possible that a declarator is wrapped with parens.
   // Example: 'float (((*f_ptr2)))[42], *f_ptr3, ((f_value2)) = 42.f;'
   // The slice for the type-part must not contain these parens. Consequently
   // 'Start' is moved to the most left paren if there are parens.

diff  --git a/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp b/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp
index 3f096c22ac00..cf31ad00d95c 100644
--- a/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp
@@ -125,7 +125,7 @@ class FindUsageOfThis : public RecursiveASTVisitor<FindUsageOfThis> {
     if (Member->isBoundMemberFunction(Ctxt)) {
       if (!OnConstObject || Member->getFoundDecl().getAccess() != AS_public) {
         // Non-public non-static member functions might not preserve the
-        // logical costness. E.g. in
+        // logical constness. E.g. in
         // class C {
         //   int &data() const;
         // public:

diff  --git a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
index 6b5569085f71..2de4ccd1b4ef 100644
--- a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
@@ -102,7 +102,7 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) {
   SourceLocation Loc = AfterRBrace;
   SourceLocation LBraceLoc = ND->getBeginLoc();
 
-  // Currently for nested namepsace (n1::n2::...) the AST matcher will match foo
+  // Currently for nested namespace (n1::n2::...) the AST matcher will match foo
   // then bar instead of a single match. So if we got a nested namespace we have
   // to skip the next ones.
   for (const auto &EndOfNameLocation : Ends) {

diff  --git a/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp b/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
index eef63b7e1956..f99a8b9cb62f 100644
--- a/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
@@ -193,7 +193,7 @@ void UppercaseLiteralSuffixCheck::storeOptions(
 }
 
 void UppercaseLiteralSuffixCheck::registerMatchers(MatchFinder *Finder) {
-  // Sadly, we can't check whether the literal has sufix or not.
+  // Sadly, we can't check whether the literal has suffix or not.
   // E.g. i32 suffix still results in 'BuiltinType::Kind::Int'.
   // And such an info is not stored in the *Literal itself.
   Finder->addMatcher(

diff  --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
index e8bccd7d6bfd..1e544f4f1b33 100644
--- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
+++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
@@ -131,7 +131,7 @@ ExceptionAnalyzer::ExceptionInfo ExceptionAnalyzer::throwsException(
   return Result;
 }
 
-/// Analyzes a single statment on it's throwing behaviour. This is in principle
+/// Analyzes a single statement on it's throwing behaviour. This is in principle
 /// possible except some 'Unknown' functions are called.
 ExceptionAnalyzer::ExceptionInfo ExceptionAnalyzer::throwsException(
     const Stmt *St, const ExceptionInfo::Throwables &Caught,

diff  --git a/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h b/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
index e5dfae1ba24c..26184a573783 100644
--- a/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
@@ -37,7 +37,7 @@ bool isSpellingLocInHeaderFile(SourceLocation Loc, SourceManager &SM,
 /// extensions.
 inline StringRef defaultHeaderFileExtensions() { return ";h;hh;hpp;hxx"; }
 
-/// Returns recommended default value for the list of implementaiton file
+/// Returns recommended default value for the list of implementation file
 /// extensions.
 inline StringRef defaultImplementationFileExtensions() {
   return "c;cc;cpp;cxx";

diff  --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp
index 021080c301f7..ce1254f6693c 100644
--- a/clang-tools-extra/clangd/AST.cpp
+++ b/clang-tools-extra/clangd/AST.cpp
@@ -95,7 +95,7 @@ getUsingNamespaceDirectives(const DeclContext *DestContext,
   return VisibleNamespaceDecls;
 }
 
-// Goes over all parents of SourceContext until we find a comman ancestor for
+// Goes over all parents of SourceContext until we find a common ancestor for
 // DestContext and SourceContext. Any qualifier including and above common
 // ancestor is redundant, therefore we stop at lowest common ancestor.
 // In addition to that stops early whenever IsVisible returns true. This can be

diff  --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h
index e259ad04a8e9..294fe0ef6415 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.h
+++ b/clang-tools-extra/clangd/ClangdLSPServer.h
@@ -188,7 +188,7 @@ class ClangdLSPServer : private ClangdServer::Callbacks {
             CB(std::move(Rsp));
           } else {
             elog("Failed to decode {0} response", *RawResponse);
-            CB(llvm::make_error<LSPError>("failed to decode reponse",
+            CB(llvm::make_error<LSPError>("failed to decode response",
                                           ErrorCode::InvalidParams));
           }
         };

diff  --git a/clang-tools-extra/clangd/Diagnostics.cpp b/clang-tools-extra/clangd/Diagnostics.cpp
index 380ce25cd27a..32f6a9bf776c 100644
--- a/clang-tools-extra/clangd/Diagnostics.cpp
+++ b/clang-tools-extra/clangd/Diagnostics.cpp
@@ -597,7 +597,7 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
         std::replace(Message.begin(), Message.end(), '\n', ' ');
       }
     }
-    if (Message.empty()) // either !SytheticMessage, or we failed to make one.
+    if (Message.empty()) // either !SyntheticMessage, or we failed to make one.
       Info.FormatDiagnostic(Message);
     LastDiag->Fixes.push_back(
         Fix{std::string(Message.str()), std::move(Edits)});

diff  --git a/clang-tools-extra/clangd/FindSymbols.h b/clang-tools-extra/clangd/FindSymbols.h
index 5110e8bdd3a9..5fb116b13d11 100644
--- a/clang-tools-extra/clangd/FindSymbols.h
+++ b/clang-tools-extra/clangd/FindSymbols.h
@@ -32,7 +32,7 @@ llvm::Expected<Location> symbolToLocation(const Symbol &Sym,
 /// Searches for the symbols matching \p Query. The syntax of \p Query can be
 /// the non-qualified name or fully qualified of a symbol. For example,
 /// "vector" will match the symbol std::vector and "std::vector" would also
-/// match it. Direct children of scopes (namepaces, etc) can be listed with a
+/// match it. Direct children of scopes (namespaces, etc) can be listed with a
 /// trailing
 /// "::". For example, "std::" will list all children of the std namespace and
 /// "::" alone will list all children of the global namespace.

diff  --git a/clang-tools-extra/clangd/FindTarget.cpp b/clang-tools-extra/clangd/FindTarget.cpp
index 3757f4da97f9..9a397a5a4383 100644
--- a/clang-tools-extra/clangd/FindTarget.cpp
+++ b/clang-tools-extra/clangd/FindTarget.cpp
@@ -547,7 +547,7 @@ llvm::SmallVector<const NamedDecl *, 1>
 explicitReferenceTargets(DynTypedNode N, DeclRelationSet Mask) {
   assert(!(Mask & (DeclRelation::TemplatePattern |
                    DeclRelation::TemplateInstantiation)) &&
-         "explicitRefenceTargets handles templates on its own");
+         "explicitReferenceTargets handles templates on its own");
   auto Decls = allTargetDecls(N);
 
   // We prefer to return template instantiation, but fallback to template

diff  --git a/clang-tools-extra/clangd/FindTarget.h b/clang-tools-extra/clangd/FindTarget.h
index eeb063b5f00e..48ad9e6513bb 100644
--- a/clang-tools-extra/clangd/FindTarget.h
+++ b/clang-tools-extra/clangd/FindTarget.h
@@ -149,7 +149,7 @@ void findExplicitReferences(const ASTContext &AST,
 /// For templates, will prefer to return a template instantiation whenever
 /// possible. However, can also return a template pattern if the specialization
 /// cannot be picked, e.g. in dependent code or when there is no corresponding
-/// Decl for a template instantitation, e.g. for templated using decls:
+/// Decl for a template instantiation, e.g. for templated using decls:
 ///    template <class T> using Ptr = T*;
 ///    Ptr<int> x;
 ///    ^~~ there is no Decl for 'Ptr<int>', so we return the template pattern.

diff  --git a/clang-tools-extra/clangd/FormattedString.cpp b/clang-tools-extra/clangd/FormattedString.cpp
index ecbc060a870a..d3dbdbba17bc 100644
--- a/clang-tools-extra/clangd/FormattedString.cpp
+++ b/clang-tools-extra/clangd/FormattedString.cpp
@@ -273,7 +273,7 @@ std::string renderBlocks(llvm::ArrayRef<std::unique_ptr<Block>> Children,
   return AdjustedResult;
 }
 
-// Seperates two blocks with extra spacing. Note that it might render strangely
+// Separates two blocks with extra spacing. Note that it might render strangely
 // in vscode if the trailing block is a codeblock, see
 // https://github.com/microsoft/vscode/issues/88416 for details.
 class Ruler : public Block {

diff  --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp
index 71ab985affa2..d94c528a8fa5 100644
--- a/clang-tools-extra/clangd/Hover.cpp
+++ b/clang-tools-extra/clangd/Hover.cpp
@@ -279,7 +279,7 @@ void enhanceFromIndex(HoverInfo &Hover, const NamedDecl &ND,
 // arguments for example. This function returns the default argument if it is
 // available.
 const Expr *getDefaultArg(const ParmVarDecl *PVD) {
-  // Default argument can be unparsed or uninstatiated. For the former we
+  // Default argument can be unparsed or uninstantiated. For the former we
   // can't do much, as token information is only stored in Sema and not
   // attached to the AST node. For the latter though, it is safe to proceed as
   // the expression is still valid.
@@ -550,7 +550,7 @@ HoverInfo getHoverContents(const DefinedMacro &Macro, ParsedAST &AST) {
   HI.Name = std::string(Macro.Name);
   HI.Kind = index::SymbolKind::Macro;
   // FIXME: Populate documentation
-  // FIXME: Pupulate parameters
+  // FIXME: Populate parameters
 
   // Try to get the full definition, not just the name
   SourceLocation StartLoc = Macro.Info->getDefinitionLoc();
@@ -791,7 +791,7 @@ markup::Document HoverInfo::present() const {
     // Drop trailing "::".
     if (!LocalScope.empty()) {
       // Container name, e.g. class, method, function.
-      // We might want to propogate some info about container type to print
+      // We might want to propagate some info about container type to print
       // function foo, class X, method X::bar, etc.
       ScopeComment =
           "// In " + llvm::StringRef(LocalScope).rtrim(':').str() + '\n';

diff  --git a/clang-tools-extra/clangd/Hover.h b/clang-tools-extra/clangd/Hover.h
index ef3bd9f22d95..8fd2e6de51e9 100644
--- a/clang-tools-extra/clangd/Hover.h
+++ b/clang-tools-extra/clangd/Hover.h
@@ -62,7 +62,7 @@ struct HoverInfo {
   /// Pretty-printed variable type.
   /// Set only for variables.
   llvm::Optional<std::string> Type;
-  /// Set for functions and lambadas.
+  /// Set for functions and lambdas.
   llvm::Optional<std::string> ReturnType;
   /// Set for functions, lambdas and macros with parameters.
   llvm::Optional<std::vector<Param>> Parameters;

diff  --git a/clang-tools-extra/clangd/ParsedAST.cpp b/clang-tools-extra/clangd/ParsedAST.cpp
index f6205879aa29..fc631da3a317 100644
--- a/clang-tools-extra/clangd/ParsedAST.cpp
+++ b/clang-tools-extra/clangd/ParsedAST.cpp
@@ -276,7 +276,7 @@ ParsedAST::build(llvm::StringRef Version,
   }
 
   // Set up ClangTidy. Must happen after BeginSourceFile() so ASTContext exists.
-  // Clang-tidy has some limitiations to ensure reasonable performance:
+  // Clang-tidy has some limitations to ensure reasonable performance:
   //  - checks don't see all preprocessor events in the preamble
   //  - matchers run only over the main-file top-level decls (and can't see
   //    ancestors outside this scope).
@@ -486,7 +486,7 @@ std::size_t ParsedAST::getUsedBytes() const {
   // FIXME: the rest of the function is almost a direct copy-paste from
   // libclang's clang_getCXTUResourceUsage. We could share the implementation.
 
-  // Sum up variaous allocators inside the ast context and the preprocessor.
+  // Sum up various allocators inside the ast context and the preprocessor.
   Total += AST.getASTAllocatedMemory();
   Total += AST.getSideTableAllocatedMemory();
   Total += AST.Idents.getAllocator().getTotalMemory();

diff  --git a/clang-tools-extra/clangd/PathMapping.cpp b/clang-tools-extra/clangd/PathMapping.cpp
index 8740d582a403..eb568b917966 100644
--- a/clang-tools-extra/clangd/PathMapping.cpp
+++ b/clang-tools-extra/clangd/PathMapping.cpp
@@ -21,7 +21,7 @@ namespace clangd {
 llvm::Optional<std::string> doPathMapping(llvm::StringRef S,
                                           PathMapping::Direction Dir,
                                           const PathMappings &Mappings) {
-  // Retrun early to optimize for the common case, wherein S is not a file URI
+  // Return early to optimize for the common case, wherein S is not a file URI
   if (!S.startswith("file://"))
     return llvm::None;
   auto Uri = URI::parse(S);

diff  --git a/clang-tools-extra/clangd/Preamble.cpp b/clang-tools-extra/clangd/Preamble.cpp
index 48f15420032f..5040aa552103 100644
--- a/clang-tools-extra/clangd/Preamble.cpp
+++ b/clang-tools-extra/clangd/Preamble.cpp
@@ -114,7 +114,7 @@ buildPreamble(PathRef FileName, CompilerInvocation &CI,
          "(previous was version {2})",
          FileName, Inputs.Version, OldPreamble->Version);
   else
-    vlog("Building first preamble for {0} verson {1}", FileName,
+    vlog("Building first preamble for {0} version {1}", FileName,
          Inputs.Version);
 
   trace::Span Tracer("BuildPreamble");

diff  --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp
index 2261ff61e499..956253ecf183 100644
--- a/clang-tools-extra/clangd/Quality.cpp
+++ b/clang-tools-extra/clangd/Quality.cpp
@@ -207,7 +207,7 @@ float SymbolQualitySignals::evaluate() const {
   // question of whether 0 references means a bad symbol or missing data.
   if (References >= 10) {
     // Use a sigmoid style boosting function, which flats out nicely for large
-    // numbers (e.g. 2.58 for 1M refererences).
+    // numbers (e.g. 2.58 for 1M references).
     // The following boosting function is equivalent to:
     //   m = 0.06
     //   f = 12.0

diff  --git a/clang-tools-extra/clangd/QueryDriverDatabase.cpp b/clang-tools-extra/clangd/QueryDriverDatabase.cpp
index 20eb4f8a28e0..d6502c6b84ba 100644
--- a/clang-tools-extra/clangd/QueryDriverDatabase.cpp
+++ b/clang-tools-extra/clangd/QueryDriverDatabase.cpp
@@ -169,7 +169,7 @@ extractSystemIncludes(PathRef Driver, llvm::StringRef Lang,
   }
 
   auto Includes = parseDriverOutput(BufOrError->get()->getBuffer());
-  log("System include extractor: succesfully executed {0}, got includes: "
+  log("System include extractor: successfully executed {0}, got includes: "
       "\"{1}\"",
       Driver, llvm::join(Includes, ", "));
   return Includes;

diff  --git a/clang-tools-extra/clangd/index/Background.cpp b/clang-tools-extra/clangd/index/Background.cpp
index c2541237c3c9..1c26dd48093e 100644
--- a/clang-tools-extra/clangd/index/Background.cpp
+++ b/clang-tools-extra/clangd/index/Background.cpp
@@ -234,7 +234,7 @@ void BackgroundIndex::update(
     // headers, since we don't even know what absolute path they should fall in.
     const auto AbsPath = URICache.resolve(IGN.URI);
     const auto DigestIt = ShardVersionsSnapshot.find(AbsPath);
-    // File has 
diff erent contents, or indexing was successfull this time.
+    // File has 
diff erent contents, or indexing was successful this time.
     if (DigestIt == ShardVersionsSnapshot.end() ||
         DigestIt->getValue().Digest != IGN.Digest ||
         (DigestIt->getValue().HadErrors && !HadErrors))

diff  --git a/clang-tools-extra/clangd/index/Serialization.cpp b/clang-tools-extra/clangd/index/Serialization.cpp
index 91e946ca9f2f..6ba4e046189c 100644
--- a/clang-tools-extra/clangd/index/Serialization.cpp
+++ b/clang-tools-extra/clangd/index/Serialization.cpp
@@ -699,7 +699,7 @@ std::unique_ptr<SymbolIndex> loadIndex(llvm::StringRef SymbolFilename,
   vlog("Loaded {0} from {1} with estimated memory usage {2} bytes\n"
        "  - number of symbols: {3}\n"
        "  - number of refs: {4}\n"
-       "  - numnber of relations: {5}",
+       "  - number of relations: {5}",
        UseDex ? "Dex" : "MemIndex", SymbolFilename,
        Index->estimateMemoryUsage(), NumSym, NumRefs, NumRelations);
   return Index;

diff  --git a/clang-tools-extra/clangd/index/SymbolOrigin.h b/clang-tools-extra/clangd/index/SymbolOrigin.h
index 953f871d5ea6..8af113c75564 100644
--- a/clang-tools-extra/clangd/index/SymbolOrigin.h
+++ b/clang-tools-extra/clangd/index/SymbolOrigin.h
@@ -16,7 +16,7 @@ namespace clang {
 namespace clangd {
 
 // Describes the source of information about a symbol.
-// Mainly useful for debugging, e.g. understanding code completion reuslts.
+// Mainly useful for debugging, e.g. understanding code completion results.
 // This is a bitfield as information can be combined from several sources.
 enum class SymbolOrigin : uint8_t {
   Unknown = 0,

diff  --git a/clang-tools-extra/clangd/index/dex/Trigram.cpp b/clang-tools-extra/clangd/index/dex/Trigram.cpp
index 24ae72bf1d1a..725c9c409df1 100644
--- a/clang-tools-extra/clangd/index/dex/Trigram.cpp
+++ b/clang-tools-extra/clangd/index/dex/Trigram.cpp
@@ -52,7 +52,7 @@ std::vector<Token> generateIdentifierTrigrams(llvm::StringRef Identifier) {
     UniqueTrigrams.insert(Token(Token::Kind::Trigram, Chars));
   };
 
-  // Iterate through valid sequneces of three characters Fuzzy Matcher can
+  // Iterate through valid sequences of three characters Fuzzy Matcher can
   // process.
   for (size_t I = 0; I < LowercaseIdentifier.size(); ++I) {
     // Skip delimiters.

diff  --git a/clang-tools-extra/clangd/refactor/Rename.cpp b/clang-tools-extra/clangd/refactor/Rename.cpp
index 91620920c6ac..0585897947df 100644
--- a/clang-tools-extra/clangd/refactor/Rename.cpp
+++ b/clang-tools-extra/clangd/refactor/Rename.cpp
@@ -224,7 +224,7 @@ std::vector<SourceLocation> findOccurrencesWithinFile(ParsedAST &AST,
   trace::Span Tracer("FindOccurrenceeWithinFile");
   // If the cursor is at the underlying CXXRecordDecl of the
   // ClassTemplateDecl, ND will be the CXXRecordDecl. In this case, we need to
-  // get the primary template maunally.
+  // get the primary template manually.
   // getUSRsForDeclaration will find other related symbols, e.g. virtual and its
   // overriddens, primary template and all explicit specializations.
   // FIXME: Get rid of the remaining tooling APIs.
@@ -411,7 +411,7 @@ bool impliesSimpleEdit(const Position &LHS, const Position &RHS) {
 //     *subset* of lexed occurrences (we allow a single name refers to more
 //     than one symbol)
 //   - all indexed occurrences must be mapped, and Result must be distinct and
-//     preseve order (only support detecting simple edits to ensure a
+//     preserve order (only support detecting simple edits to ensure a
 //     robust mapping)
 //   - each indexed -> lexed occurrences mapping correspondence may change the
 //     *line* or *column*, but not both (increases chance of a robust mapping)

diff  --git a/clang-tools-extra/clangd/refactor/Rename.h b/clang-tools-extra/clangd/refactor/Rename.h
index cfa4135e995d..5c53ba633fa2 100644
--- a/clang-tools-extra/clangd/refactor/Rename.h
+++ b/clang-tools-extra/clangd/refactor/Rename.h
@@ -30,7 +30,7 @@ struct RenameOptions {
   /// If true, enable cross-file rename; otherwise, only allows to rename a
   /// symbol that's only used in the current file.
   bool AllowCrossFile = false;
-  /// The mamimum number of affected files (0 means no limit), only meaningful
+  /// The maximum number of affected files (0 means no limit), only meaningful
   /// when AllowCrossFile = true.
   /// If the actual number exceeds the limit, rename is forbidden.
   size_t LimitFiles = 50;

diff  --git a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
index 1ecec6674b02..411c685e2b7d 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
@@ -28,7 +28,7 @@ namespace {
 // top level decl.
 //
 // Currently this only removes qualifier from under the cursor. In the future,
-// we should improve this to remove qualifier from all occurences of this
+// we should improve this to remove qualifier from all occurrences of this
 // symbol.
 class AddUsing : public Tweak {
 public:

diff  --git a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
index 8f396e3706b6..b1057d8b80e7 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
@@ -151,7 +151,7 @@ llvm::Expected<std::string> qualifyAllDecls(const FunctionDecl *FD,
   //
   // Go over all references inside a function body to generate replacements that
   // will qualify those. So that body can be moved into an arbitrary file.
-  // We perform the qualification by qualyfying the first type/decl in a
+  // We perform the qualification by qualifying the first type/decl in a
   // (un)qualified name. e.g:
   //    namespace a { namespace b { class Bar{}; void foo(); } }
   //    b::Bar x; -> a::b::Bar x;
@@ -305,7 +305,7 @@ renameParameters(const FunctionDecl *Dest, const FunctionDecl *Source) {
         ReplaceRange = CharSourceRange::getCharRange(RefLoc, RefLoc);
       else
         ReplaceRange = CharSourceRange::getTokenRange(RefLoc, RefLoc);
-      // If occurence is coming from a macro expansion, try to get back to the
+      // If occurrence is coming from a macro expansion, try to get back to the
       // file range.
       if (RefLoc.isMacroID()) {
         ReplaceRange = Lexer::makeFileCharRange(ReplaceRange, SM, LangOpts);
@@ -352,7 +352,7 @@ const FunctionDecl *findTarget(const FunctionDecl *FD) {
   return PrevDecl;
 }
 
-// Returns the begining location for a FunctionDecl. Returns location of
+// Returns the beginning location for a FunctionDecl. Returns location of
 // template keyword for templated functions.
 const SourceLocation getBeginLoc(const FunctionDecl *FD) {
   // Include template parameter list.

diff  --git a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
index 9b483bbf05ee..d9e07a001d23 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
@@ -244,7 +244,7 @@ getFunctionSourceCode(const FunctionDecl *FD, llvm::StringRef TargetNamespace,
     bool HasErrors = true;
 
     // Clang allows duplicating virtual specifiers so check for multiple
-    // occurances.
+    // occurrences.
     for (const auto &Tok : TokBuf.expandedTokens(SpecRange)) {
       if (Tok.kind() != tok::kw_virtual)
         continue;
@@ -291,7 +291,7 @@ llvm::Expected<InsertionPoint> getInsertionPoint(llvm::StringRef Contents,
 
   assert(!Region.EligiblePoints.empty());
   // FIXME: This selection can be made smarter by looking at the definition
-  // locations for adjacent decls to Source. Unfortunately psudeo parsing in
+  // locations for adjacent decls to Source. Unfortunately pseudo parsing in
   // getEligibleRegions only knows about namespace begin/end events so we
   // can't match function start/end positions yet.
   auto Offset = positionToOffset(Contents, Region.EligiblePoints.back());

diff  --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
index 52905c3cafb4..a22b5ab60cd5 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
@@ -119,7 +119,7 @@ const Node *getParentOfRootStmts(const Node *CommonAnc) {
   const Node *Parent = nullptr;
   switch (CommonAnc->Selected) {
   case SelectionTree::Selection::Unselected:
-    // Typicaly a block, with the { and } unselected, could also be ForStmt etc
+    // Typically a block, with the { and } unselected, could also be ForStmt etc
     // Ensure all Children are RootStmts.
     Parent = CommonAnc;
     break;
@@ -497,7 +497,7 @@ CapturedZoneInfo captureZoneInfo(const ExtractionZone &ExtZone) {
     }
 
     bool VisitDeclRefExpr(DeclRefExpr *DRE) {
-      // Find the corresponding Decl and mark it's occurence.
+      // Find the corresponding Decl and mark it's occurrence.
       const Decl *D = DRE->getDecl();
       auto *DeclInfo = Info.getDeclInfoFor(D);
       // If no Decl was found, the Decl must be outside the enclosingFunc.

diff  --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index 4b3b565ac2b6..a8d8f95ce805 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -744,7 +744,7 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
     OffsetEncodingFromFlag = ForceOffsetEncoding;
 
   clangd::RenameOptions RenameOpts;
-  // Shall we allow to custimize the file limit?
+  // Shall we allow to customize the file limit?
   RenameOpts.AllowCrossFile = CrossFileRename;
 
   ClangdLSPServer LSPServer(

diff  --git a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
index 1084b1550579..b873f91d3a4b 100644
--- a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
+++ b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
@@ -597,7 +597,7 @@ TEST(CompletionTest, ContextWords) {
   auto Finish = Color::^
   )cpp");
   // Yellow would normally sort last (alphabetic).
-  // But the recent mention shuold bump it up.
+  // But the recent mention should bump it up.
   ASSERT_THAT(Results.Completions,
               HasSubsequence(Named("YELLOW"), Named("BLUE")));
 }
@@ -663,7 +663,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 directory and insert.
+  // Shorten include path based on search directory and insert.
   Annotations Test("int main() { ns::^ }");
   TU.Code = Test.code().str();
   auto Results = completions(TU, Test.point(), {Sym});
@@ -695,7 +695,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 directory and insert.
+  // Shorten include path based on search directory and insert.
   auto Results = completions(R"cpp(
           namespace ns {
             class X;
@@ -976,7 +976,7 @@ TEST(CompletionTest, IgnoreCompleteInExcludedPPBranchWithRecoveryContext) {
 
     int foo(int param_in_foo) {
 #if 0
-  // In recorvery mode, "param_in_foo" will also be suggested among many other
+  // In recovery mode, "param_in_foo" will also be suggested among many other
   // unrelated symbols; however, this is really a special case where this works.
   // If the #if block is outside of the function, "param_in_foo" is still
   // suggested, but "bar" and "foo" are missing. So the recovery mode doesn't

diff  --git a/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp b/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
index 7a439c3b484b..aa4c0190b03d 100644
--- a/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
+++ b/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
@@ -100,7 +100,7 @@ TEST(CollectMainFileMacros, SelectedMacros) {
           << "Annotation=" << I << ", MacroName=" << Macro->Name
           << ", Test = " << Test;
     }
-    // Unkown macros.
+    // Unknown macros.
     EXPECT_THAT(AST.getMacros().UnknownMacros,
                 UnorderedElementsAreArray(T.ranges("Unknown")))
         << "Unknown macros doesn't match in " << Test;

diff  --git a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp
index 7b6fff292e66..e0def88845a8 100644
--- a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp
+++ b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp
@@ -604,7 +604,7 @@ class FindExplicitReferencesTest : public ::testing::Test {
   };
 
   /// Parses \p Code, finds function or namespace '::foo' and annotates its body
-  /// with results of findExplicitReferecnces.
+  /// with results of findExplicitReferences.
   /// See actual tests for examples of annotation format.
   AllRefs annotateReferencesInFoo(llvm::StringRef Code) {
     TestTU TU;

diff  --git a/clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp b/clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp
index 44ef40f9c99d..63f18e4f9214 100644
--- a/clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp
+++ b/clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp
@@ -136,7 +136,7 @@ TEST(HeaderSourceSwitchTest, FromHeaderToSource) {
     AllSymbols.insert(Sym);
   auto Index = MemIndex::build(std::move(AllSymbols).build(), {}, {});
 
-  // Test for swtich from .h header to .cc source
+  // Test for switch from .h header to .cc source
   struct {
     llvm::StringRef HeaderCode;
     llvm::Optional<std::string> ExpectedSource;

diff  --git a/clang-tools-extra/clangd/unittests/PathMappingTests.cpp b/clang-tools-extra/clangd/unittests/PathMappingTests.cpp
index 3811776bed01..2da38de10276 100644
--- a/clang-tools-extra/clangd/unittests/PathMappingTests.cpp
+++ b/clang-tools-extra/clangd/unittests/PathMappingTests.cpp
@@ -52,7 +52,7 @@ TEST(ParsePathMappingTests, UnixPath) {
   llvm::Expected<PathMappings> ParsedMappings = parsePathMappings("/A/b=/root");
   ASSERT_TRUE(bool(ParsedMappings));
   EXPECT_THAT(*ParsedMappings, ElementsAre(Mapping("/A/b", "/root")));
-  // Aboslute unix path w/ backslash
+  // Absolute unix path w/ backslash
   ParsedMappings = parsePathMappings(R"(/a/b\\ar=/root)");
   ASSERT_TRUE(bool(ParsedMappings));
   EXPECT_THAT(*ParsedMappings, ElementsAre(Mapping(R"(/a/b\\ar)", "/root")));

diff  --git a/clang-tools-extra/clangd/unittests/RenameTests.cpp b/clang-tools-extra/clangd/unittests/RenameTests.cpp
index 55d78a82ab56..eaf74cf062af 100644
--- a/clang-tools-extra/clangd/unittests/RenameTests.cpp
+++ b/clang-tools-extra/clangd/unittests/RenameTests.cpp
@@ -882,7 +882,7 @@ TEST(CrossFileRenameTests, WithUpToDateIndex) {
           R"cpp(
         template <typename T>
         class [[Foo]] {};
-        // FIXME: explicit template specilizations are not supported due the
+        // FIXME: explicit template specializations are not supported due the
         // clangd index limitations.
         template <>
         class Foo<double> {};

diff  --git a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
index 023de023d620..6c32502775bf 100644
--- a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
@@ -199,7 +199,7 @@ TEST(SymbolInfoTests, All) {
         )cpp",
               {CreateExpectedSymbolDetails("foo", "", "c:@S at foo")}},
           {
-              R"cpp( // Type Reference - template argumen
+              R"cpp( // Type Reference - template argument
           struct foo {};
           template<class T> struct bar {};
           void baz() {

diff  --git a/clang-tools-extra/clangd/unittests/TweakTests.cpp b/clang-tools-extra/clangd/unittests/TweakTests.cpp
index b5d6117217b6..e91ff22d3533 100644
--- a/clang-tools-extra/clangd/unittests/TweakTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TweakTests.cpp
@@ -588,7 +588,7 @@ TEST_F(ExtractFunctionTest, FunctionTest) {
   // lead to break being included in the extraction zone.
   EXPECT_THAT(apply("for(;;) { [[int x;]]break; }"), HasSubstr("extracted"));
   // FIXME: ExtractFunction should be unavailable inside loop construct
-  // initalizer/condition.
+  // initializer/condition.
   EXPECT_THAT(apply(" for([[int i = 0;]];);"), HasSubstr("extracted"));
   // Don't extract because needs hoisting.
   EXPECT_THAT(apply(" [[int a = 5;]] a++; "), StartsWith("fail"));

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-misplaced-pointer-arithmetic-in-alloc.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-misplaced-pointer-arithmetic-in-alloc.rst
index 4a3606da0250..8e0191a57aaf 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-misplaced-pointer-arithmetic-in-alloc.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-misplaced-pointer-arithmetic-in-alloc.rst
@@ -1,6 +1,6 @@
 .. title:: clang-tidy - bugprone-misplaced-pointer-arithmetic-in-alloc
 
-bugprone-misplaced-pointer-artithmetic-in-alloc
+bugprone-misplaced-pointer-arithmetic-in-alloc
 ===============================================
 
 Finds cases where an integer expression is added to or subtracted from the

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-virtual-near-miss.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-virtual-near-miss.rst
index ac27479713c2..2b2498f6f358 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-virtual-near-miss.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-virtual-near-miss.rst
@@ -4,7 +4,7 @@ bugprone-virtual-near-miss
 ==========================
 
 Warn if a function is a near miss (ie. the name is very similar and the function
-signiture is the same) to a virtual function from a base class.
+signature is the same) to a virtual function from a base class.
 
 Example:
 

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
index f327ac27e8f0..463356ec186e 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
@@ -29,7 +29,7 @@ statement body:
   for (int i = 0; i < n; ++i) {
     p.add_xxx(n);
     // This will trigger the warning since the add_xxx may cause multiple memory
-    // relloacations. This can be avoid by inserting a
+    // reallocations. This can be avoid by inserting a
     // 'p.mutable_xxx().Reserve(n)' statement before the for statement.
   }
 

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/portability-restrict-system-includes.rst b/clang-tools-extra/docs/clang-tidy/checks/portability-restrict-system-includes.rst
index 934550660223..26d4e0d3fcc5 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/portability-restrict-system-includes.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/portability-restrict-system-includes.rst
@@ -27,7 +27,7 @@ the options to `*,-zlib.h`.
   #include <zlib.h>         // Bad: disallowed system header.
   #include "src/myfile.h"   // Good: non-system header always allowed.
 
-Since the opions support globbing you can use wildcarding to allow groups of
+Since the options support globbing you can use wildcarding to allow groups of
 headers.
 
 `-*,openssl/*.h` will allow all openssl headers but disallow any others.

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/readability-convert-member-functions-to-static.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-convert-member-functions-to-static.rst
index c2f05cf589ea..4a9b80fd7874 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-convert-member-functions-to-static.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-convert-member-functions-to-static.rst
@@ -6,7 +6,7 @@ readability-convert-member-functions-to-static
 Finds non-static member functions that can be made ``static``
 because the functions don't use ``this``.
 
-After applying modifications as suggested by the check, runnnig the check again
+After applying modifications as suggested by the check, running the check again
 might find more opportunities to mark member functions ``static``.
 
 After making a member function ``static``, you might want to run the check

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/readability-make-member-function-const.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-make-member-function-const.rst
index 2d1de5fdeb7e..60a828c8741b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-make-member-function-const.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-make-member-function-const.rst
@@ -63,5 +63,5 @@ The following real-world examples will be preserved by the check:
     ...
   };
 
-After applying modifications as suggested by the check, runnnig the check again
+After applying modifications as suggested by the check, running the check again
 might find more opportunities to mark member functions ``const``.

diff  --git a/clang-tools-extra/docs/doxygen.cfg.in b/clang-tools-extra/docs/doxygen.cfg.in
index 56c7b74298e3..d778be30b63e 100644
--- a/clang-tools-extra/docs/doxygen.cfg.in
+++ b/clang-tools-extra/docs/doxygen.cfg.in
@@ -1400,7 +1400,7 @@ EXT_LINKS_IN_WINDOW    = NO
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
 # generated for formulas are transparent PNGs. Transparent PNGs are not
 # supported properly for IE 6.0, but are supported on all modern browsers.
 #

diff  --git a/clang-tools-extra/docs/pp-trace.rst b/clang-tools-extra/docs/pp-trace.rst
index 60e4de461253..77bc6d0af0ad 100644
--- a/clang-tools-extra/docs/pp-trace.rst
+++ b/clang-tools-extra/docs/pp-trace.rst
@@ -123,7 +123,7 @@ name as the argument in the corresponding PPCallbacks callback function.
 Callback Details
 ----------------
 
-The following sections describe the pupose and output format for each callback.
+The following sections describe the purpose and output format for each callback.
 
 Click on the callback name in the section heading to see the Doxygen
 documentation for the callback.

diff  --git a/clang-tools-extra/modularize/CoverageChecker.cpp b/clang-tools-extra/modularize/CoverageChecker.cpp
index 4246df9483d0..b115d59aaba8 100644
--- a/clang-tools-extra/modularize/CoverageChecker.cpp
+++ b/clang-tools-extra/modularize/CoverageChecker.cpp
@@ -267,7 +267,7 @@ bool CoverageChecker::collectUmbrellaHeaders(StringRef UmbrellaDirName) {
   return true;
 }
 
-// Collect headers rferenced from an umbrella file.
+// Collect headers referenced from an umbrella file.
 bool
 CoverageChecker::collectUmbrellaHeaderHeaders(StringRef UmbrellaHeaderName) {
 

diff  --git a/clang-tools-extra/modularize/CoverageChecker.h b/clang-tools-extra/modularize/CoverageChecker.h
index 185cf954ace1..3033a471f43b 100644
--- a/clang-tools-extra/modularize/CoverageChecker.h
+++ b/clang-tools-extra/modularize/CoverageChecker.h
@@ -124,7 +124,7 @@ class CoverageChecker {
   /// \return True if no errors.
   bool collectUmbrellaHeaders(llvm::StringRef UmbrellaDirName);
 
-  /// Collect headers rferenced from an umbrella file.
+  /// Collect headers referenced from an umbrella file.
   /// \param UmbrellaHeaderName The umbrella file path.
   /// \return True if no errors.
   bool collectUmbrellaHeaderHeaders(llvm::StringRef UmbrellaHeaderName);

diff  --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index b1efb0e7996a..73c78cff14b2 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -184,7 +184,7 @@
 //      headerlist.txt
 //
 // Note that if the headers in the header list have partial paths, sub-modules
-// will be created for the subdirectires involved, assuming that the
+// will be created for the subdirectories involved, assuming that the
 // subdirectories contain headers to be grouped into a module, but still with
 // individual modules for the headers in the subdirectory.
 //

diff  --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp
index c5e08246c28d..26c2923c2983 100644
--- a/clang-tools-extra/modularize/PreprocessorTracker.cpp
+++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp
@@ -147,7 +147,7 @@
 // handleNewPreprocessorExit function handles cleaning up with respect
 // to the preprocessing instance.
 //
-// The PreprocessorCallbacks object uses an overidden FileChanged callback
+// The PreprocessorCallbacks object uses an overridden FileChanged callback
 // to determine when a header is entered and exited (including exiting the
 // header during #include directives). It calls PreprocessorTracker's
 // handleHeaderEntry and handleHeaderExit functions upon entering and
@@ -174,7 +174,7 @@
 // MacroExpansionTracker object, one that matches the macro expanded value
 // and the macro definition location. If a matching MacroExpansionInstance
 // object is found, it just adds the current HeaderInclusionPath object to
-// it. If not found, it creates and stores a new MacroExpantionInstance
+// it. If not found, it creates and stores a new MacroExpansionInstance
 // object. The addMacroExpansionInstance function calls a couple of helper
 // functions to get the pre-formatted location and source line strings for
 // the macro reference and the macro definition stored as string handles.
@@ -369,7 +369,7 @@ static std::string getSourceLine(clang::Preprocessor &PP, clang::FileID FileID,
 }
 
 // Get the string for the Unexpanded macro instance.
-// The soureRange is expected to end at the last token
+// The sourceRange is expected to end at the last token
 // for the macro instance, which in the case of a function-style
 // macro will be a ')', but for an object-style macro, it
 // will be the macro name itself.

diff  --git a/clang-tools-extra/pp-trace/PPCallbacksTracker.h b/clang-tools-extra/pp-trace/PPCallbacksTracker.h
index da5d1b68889f..5bd334ee83f4 100644
--- a/clang-tools-extra/pp-trace/PPCallbacksTracker.h
+++ b/clang-tools-extra/pp-trace/PPCallbacksTracker.h
@@ -68,7 +68,7 @@ using FilterType = std::vector<std::pair<llvm::GlobPattern, bool>>;
 /// callbacks of no interest that might clutter the output.
 ///
 /// Following the constructor and destructor function declarations, the
-/// overidden callback functions are defined.  The remaining functions are
+/// overridden callback functions are defined.  The remaining functions are
 /// helpers for recording the trace data, to reduce the coupling between it
 /// and the recorded data structure.
 class PPCallbacksTracker : public PPCallbacks {
@@ -84,7 +84,7 @@ class PPCallbacksTracker : public PPCallbacks {
 
   ~PPCallbacksTracker() override;
 
-  // Overidden callback functions.
+  // Overridden callback functions.
 
   void FileChanged(SourceLocation Loc, PPCallbacks::FileChangeReason Reason,
                    SrcMgr::CharacteristicKind FileType,

diff  --git a/clang-tools-extra/test/clang-move/move-used-helper-decls.cpp b/clang-tools-extra/test/clang-move/move-used-helper-decls.cpp
index 45bd4be7676c..b4aed2c73e80 100644
--- a/clang-tools-extra/test/clang-move/move-used-helper-decls.cpp
+++ b/clang-tools-extra/test/clang-move/move-used-helper-decls.cpp
@@ -3,7 +3,7 @@
 // RUN: cd %T/used-helper-decls
 
 // ----------------------------------------------------------------------------
-// Test moving used helper function and its transively used functions.
+// Test moving used helper function and its transitively used functions.
 // ----------------------------------------------------------------------------
 // RUN: clang-move -names="a::Class1" -new_cc=%T/used-helper-decls/new_helper_decls_test.cpp -new_header=%T/used-helper-decls/new_helper_decls_test.h -old_cc=%T/used-helper-decls/helper_decls_test.cpp -old_header=../used-helper-decls/helper_decls_test.h %T/used-helper-decls/helper_decls_test.cpp -- -std=c++11
 // RUN: FileCheck -input-file=%T/used-helper-decls/new_helper_decls_test.cpp -check-prefix=CHECK-NEW-CLASS1-CPP %s
@@ -29,7 +29,7 @@
 
 
 // ----------------------------------------------------------------------------
-// Test moving used helper function and its transively used static variables.
+// Test moving used helper function and its transitively used static variables.
 // ----------------------------------------------------------------------------
 // RUN: cp %S/Inputs/helper_decls_test*  %T/used-helper-decls/
 // RUN: clang-move -names="a::Class2" -new_cc=%T/used-helper-decls/new_helper_decls_test.cpp -new_header=%T/used-helper-decls/new_helper_decls_test.h -old_cc=%T/used-helper-decls/helper_decls_test.cpp -old_header=../used-helper-decls/helper_decls_test.h %T/used-helper-decls/helper_decls_test.cpp -- -std=c++11
@@ -151,7 +151,7 @@
 
 
 // ----------------------------------------------------------------------------
-// Test moving helper variables and their transively used helper classes.
+// Test moving helper variables and their transitively used helper classes.
 // ----------------------------------------------------------------------------
 // RUN: cp %S/Inputs/helper_decls_test*  %T/used-helper-decls/
 // RUN: clang-move -names="a::Class6" -new_cc=%T/used-helper-decls/new_helper_decls_test.cpp -new_header=%T/used-helper-decls/new_helper_decls_test.h -old_cc=%T/used-helper-decls/helper_decls_test.cpp -old_header=../used-helper-decls/helper_decls_test.h %T/used-helper-decls/helper_decls_test.cpp -- -std=c++11
@@ -216,7 +216,7 @@
 
 
 // ----------------------------------------------------------------------------
-// Test moving helper function and its transively used helper variables.
+// Test moving helper function and its transitively used helper variables.
 // ----------------------------------------------------------------------------
 // RUN: cp %S/Inputs/helper_decls_test*  %T/used-helper-decls/
 // RUN: clang-move -names="a::Fun1" -new_cc=%T/used-helper-decls/new_helper_decls_test.cpp -new_header=%T/used-helper-decls/new_helper_decls_test.h -old_cc=%T/used-helper-decls/helper_decls_test.cpp -old_header=../used-helper-decls/helper_decls_test.h %T/used-helper-decls/helper_decls_test.cpp -- -std=c++11
@@ -260,7 +260,7 @@
 // CHECK-OLD-FUN2-H-NOT: inline void Fun2() {}
 
 // ----------------------------------------------------------------------------
-// Test moving used helper function and its transively used functions.
+// Test moving used helper function and its transitively used functions.
 // ----------------------------------------------------------------------------
 // RUN: cp %S/Inputs/helper_decls_test*  %T/used-helper-decls/
 // RUN: clang-move -names="b::Fun3" -new_cc=%T/used-helper-decls/new_helper_decls_test.cpp -new_header=%T/used-helper-decls/new_helper_decls_test.h -old_cc=%T/used-helper-decls/helper_decls_test.cpp -old_header=../used-helper-decls/helper_decls_test.h %T/used-helper-decls/helper_decls_test.cpp -- -std=c++11

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header-fixed.h b/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header-fixed.h
index f3e9e7241d25..a40b2b2ece52 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header-fixed.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header-fixed.h
@@ -1,5 +1,5 @@
 // struct ABC is expensive to copy and should be
-// passed as a const referece.
+// passed as a const reference.
 struct ABC {
   ABC(const ABC&);
   int get(int) const;

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header.h b/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header.h
index 3f55c79a2684..94916755ddaf 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/Inputs/performance-unnecessary-value-param/header.h
@@ -1,5 +1,5 @@
 // struct ABC is expensive to copy and should be
-// passed as a const referece.
+// passed as a const reference.
 struct ABC {
   ABC(const ABC&);
   int get(int) const;

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/abseil-duration-subtraction.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil-duration-subtraction.cpp
index 154b7d4ba76d..bd6f3172d777 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil-duration-subtraction.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil-duration-subtraction.cpp
@@ -43,7 +43,7 @@ void f() {
   // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the duration domain [abseil-duration-subtraction]
   // CHECK-FIXES: if (absl::ToDoubleSeconds(d - absl::Seconds(1)) > 10) {}
 
-  // A nested occurance
+  // A nested occurrence
   x = absl::ToDoubleSeconds(d) - absl::ToDoubleSeconds(absl::Seconds(5));
   // CHECK-MESSAGES: [[@LINE-1]]:7: warning: perform subtraction in the duration domain [abseil-duration-subtraction]
   // CHECK-FIXES: absl::ToDoubleSeconds(d - absl::Seconds(5))

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone-branch-clone.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone-branch-clone.cpp
index af16f5105552..09f87cedfceb 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-branch-clone.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-branch-clone.cpp
@@ -940,7 +940,7 @@ int decorated_cases(int z) {
   return z + 92;
 }
 
-// The child of the switch statement is not neccessarily a compound statement,
+// The child of the switch statement is not necessarily a compound statement,
 // do not crash in this unusual case.
 char no_real_body(int in, int &out) {
   switch (in)

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp
index 93ecf06ce973..7780089ce8f3 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp
@@ -98,7 +98,7 @@ void funcCallWithTempExcTest() {
   f(5, RegularException());
 }
 
-// Global variable initilization test.
+// Global variable initialization test.
 RegularException exc = RegularException();
 RegularException *excptr = new RegularException();
 

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/cert-throw-exception-type.cpp b/clang-tools-extra/test/clang-tidy/checkers/cert-throw-exception-type.cpp
index bc0ecc808b29..17884ec4cc35 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cert-throw-exception-type.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cert-throw-exception-type.cpp
@@ -1,5 +1,5 @@
 // RUN: %check_clang_tidy -std=c++11,c++14 %s cert-err60-cpp %t -- -- -fcxx-exceptions
-// FIXME: Split off parts of this test that rely on dynamic exeption
+// FIXME: Split off parts of this test that rely on dynamic exception
 // specifications, and run this test in all language modes.
 
 struct S {};

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 ebf37fa35995..7ffdfccd1d3d 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
@@ -8,7 +8,7 @@
 using size_t = __SIZE_TYPE__;
 
 void *malloc(size_t size);
-void *align_malloc(size_t size, unsigned short aligmnent);
+void *align_malloc(size_t size, unsigned short alignment);
 void *calloc(size_t num, size_t size);
 void *realloc(void *ptr, size_t size);
 void *align_realloc(void *ptr, size_t size, unsigned short alignment);

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/fuchsia-multiple-inheritance.cpp b/clang-tools-extra/test/clang-tidy/checkers/fuchsia-multiple-inheritance.cpp
index c7869761cf85..6ce9ce8e6553 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/fuchsia-multiple-inheritance.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/fuchsia-multiple-inheritance.cpp
@@ -45,16 +45,16 @@ class Interface_with_A_Parent : public Base_A {
 class Bad_Child1;
 
 // Inherits from multiple concrete classes.
-// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting mulitple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
+// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting multiple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
 // CHECK-NEXT: class Bad_Child1 : public Base_A, Base_B {};
 class Bad_Child1 : public Base_A, Base_B {};
 
-// CHECK-MESSAGES: [[@LINE+1]]:1: warning: inheriting mulitple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
+// CHECK-MESSAGES: [[@LINE+1]]:1: warning: inheriting multiple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
 class Bad_Child2 : public Base_A, Interface_A_with_member {
   virtual int foo() override { return 0; }
 };
 
-// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting mulitple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
+// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting multiple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
 // CHECK-NEXT: class Bad_Child3 : public Interface_with_A_Parent, Base_B {
 class Bad_Child3 : public Interface_with_A_Parent, Base_B {
   virtual int baz() override { return 0; }
@@ -83,7 +83,7 @@ class Good_Child3 : public Base_A_child, Interface_C, Interface_B {
 
 struct B1 { int x; };
 struct B2 { int x;};
-// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting mulitple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
+// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting multiple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
 // CHECK-NEXT: struct D : B1, B2 {};
 struct D1 : B1, B2 {};
 
@@ -100,7 +100,7 @@ struct D3 : V3, V4 {};
 struct Base3 {};
 struct V5 : virtual Base3 { virtual void f(); };
 struct V6 : virtual Base3 { virtual void g(); };
-// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting mulitple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
+// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting multiple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
 // CHECK-NEXT: struct D4 : V5, V6 {};
 struct D4 : V5, V6 {};
 
@@ -118,7 +118,7 @@ struct Base6 { virtual void f(); };
 struct Base7 { virtual void g(); };
 struct V15 : virtual Base6 { virtual void f() = 0; };
 struct V16 : virtual Base7 { virtual void g() = 0; };
-// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting mulitple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
+// CHECK-MESSAGES: [[@LINE+2]]:1: warning: inheriting multiple classes that aren't pure virtual is discouraged [fuchsia-multiple-inheritance]
 // CHECK-NEXT: struct D9 : V15, V16 {};
 struct D9 : V15, V16 {};
 

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-bug34747.cpp b/clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-bug34747.cpp
index 217df71dc339..1502b809e618 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-bug34747.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/hicpp-signed-bitwise-bug34747.cpp
@@ -12,7 +12,7 @@ template <typename C>
 struct foo {
   typedef OutputStream<C> stream_type;
   foo(stream_type &o) {
-    o << 'x'; // warning occured here, fixed now
+    o << 'x'; // warning occurred here, fixed now
   }
 };
 

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 35a6dd0b7d00..16cb5228b2db 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
@@ -294,7 +294,7 @@ void initialization(int T, Base b) {
   PE1.reset(new auto(E()));
 
   //============================================================================
-  //  NOTE: For initlializer-list constructors, the check only gives warnings,
+  //  NOTE: For initializer-list constructors, the check only gives warnings,
   //  and no fixes are generated.
   //============================================================================
 

diff  --git a/clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp b/clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp
index 0fad5d55f4ee..15348f4b0552 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp
@@ -187,7 +187,7 @@ typedef void (function_ptr)(void);
 // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: {{.*}} in typedef
 // CHECK-FIXES: {{^}}typedef void (function_ptr)();{{$}}
 
-// intentionally not LLVM style to check preservation of whitesapce
+// intentionally not LLVM style to check preservation of whitespace
 typedef void (function_ptr2)
     (
         void
@@ -198,7 +198,7 @@ typedef void (function_ptr2)
 // CHECK-FIXES-NEXT: {{^        $}}
 // CHECK-FIXES-NEXT: {{^    \);$}}
 
-// intentionally not LLVM style to check preservation of whitesapce
+// intentionally not LLVM style to check preservation of whitespace
 typedef
 void
 (
@@ -254,7 +254,7 @@ typedef void (gronk::*member_function_ptr)(void);
 // CHECK-MESSAGES: :[[@LINE-1]]:44: warning: {{.*}} in typedef
 // CHECK-FIXES: {{^}}typedef void (gronk::*member_function_ptr)();{{$}}
 
-// intentionally not LLVM style to check preservation of whitesapce
+// intentionally not LLVM style to check preservation of whitespace
 typedef void (gronk::*member_function_ptr2)
     (
         void
@@ -274,7 +274,7 @@ void gronk::foo() {
   // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: {{.*}} in variable declaration
   // CHECK-FIXES: {{^  }}void (*f2)();{{$}}
 
-  // intentionally not LLVM style to check preservation of whitesapce
+  // intentionally not LLVM style to check preservation of whitespace
   void (*f3)
       (
           void
@@ -297,7 +297,7 @@ void gronk::bar(void) {
   // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: {{.*}} in variable declaration
   // CHECK-FIXES: {{^  }}void (gronk::*p4)();{{$}}
 
-  // intentionally not LLVM style to check preservation of whitesapce
+  // intentionally not LLVM style to check preservation of whitespace
   void (gronk::*p5)
       (
           void
@@ -309,7 +309,7 @@ void gronk::bar(void) {
   // CHECK-FIXES-NExT: {{^      \);$}}
 }
 
-// intentionally not LLVM style to check preservation of whitesapce
+// intentionally not LLVM style to check preservation of whitespace
 void gronk::bar2
   (
   void
@@ -357,7 +357,7 @@ nutter::nutter(void) {
   // CHECK-MESSAGES: :[[@LINE-2]]:48: warning: {{.*}} in named cast
   // CHECK-FIXES: void (*f5)() = reinterpret_cast<void (*)()>(0);{{$}}
 
-  // intentionally not LLVM style to check preservation of whitesapce
+  // intentionally not LLVM style to check preservation of whitespace
   void (*f6)(void) = static_cast<void (*)
       (
           void
@@ -369,7 +369,7 @@ nutter::nutter(void) {
   // CHECK-FIXES-NEXT: {{^          $}}
   // CHECK-FIXES-NEXT: {{^      }})>(0);{{$}}
 
-  // intentionally not LLVM style to check preservation of whitesapce
+  // intentionally not LLVM style to check preservation of whitespace
   void (*f7)(void) = (void (*)
       (
           void
@@ -381,7 +381,7 @@ nutter::nutter(void) {
   // CHECK-FIXES-NEXT: {{^          $}}
   // CHECK-FIXES-NEXT: {{^      \)\) 0;$}}
 
-  // intentionally not LLVM style to check preservation of whitesapce
+  // intentionally not LLVM style to check preservation of whitespace
   void (*f8)(void) = reinterpret_cast<void (*)
       (
           void

diff  --git a/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp b/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
index c89b18f4efde..778ab89c25b3 100644
--- a/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
+++ b/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
@@ -269,7 +269,7 @@ TEST(IncludeFixer, FixNamespaceQualifiers) {
   EXPECT_EQ("#include \"bar2.h\"\nnamespace c {\na::c::bar b;\n}\n",
             runIncludeFixer("namespace c {\nbar b;\n}\n"));
 
-  // Test common qualifers reduction.
+  // Test common qualifiers reduction.
   EXPECT_EQ("#include \"bar.h\"\nnamespace a {\nnamespace d {\nb::bar b;\n}\n} "
             "// namespace a\n",
             runIncludeFixer("namespace a {\nnamespace d {\nbar b;\n}\n}\n"));

diff  --git a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
index 75a9826baf79..b9553e111a57 100644
--- a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
+++ b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
@@ -636,5 +636,5 @@ TEST(ClangMove, DumpDecls) {
 }
 
 } // namespace
-} // namespce move
+} // namespace move
 } // namespace clang

diff  --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
index 9599576592af..fee2d94a4d57 100644
--- a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
+++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
@@ -160,7 +160,7 @@ runCheckOnCode(StringRef Code, std::vector<ClangTidyError> *Errors = nullptr,
     *Errors = std::move(Diags);
   auto Result = tooling::applyAllReplacements(Code, Fixes);
   if (!Result) {
-    // FIXME: propogate the error.
+    // FIXME: propagate the error.
     llvm::consumeError(Result.takeError());
     return "";
   }


        


More information about the cfe-commits mailing list