diff --git a/clang-tools-extra/clang-change-namespace/ChangeNamespace.h b/clang-tools-extra/clang-change-namespace/ChangeNamespace.h --- a/clang-tools-extra/clang-change-namespace/ChangeNamespace.h +++ b/clang-tools-extra/clang-change-namespace/ChangeNamespace.h @@ -27,7 +27,7 @@ // 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 @@ 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> MoveNamespaces; diff --git a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp --- a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp +++ b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp @@ -832,7 +832,7 @@ 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-doc/Generators.cpp b/clang-tools-extra/clang-doc/Generators.cpp --- a/clang-tools-extra/clang-doc/Generators.cpp +++ b/clang-tools-extra/clang-doc/Generators.cpp @@ -82,7 +82,7 @@ // 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 --- a/clang-tools-extra/clang-doc/Serialize.cpp +++ b/clang-tools-extra/clang-doc/Serialize.cpp @@ -36,7 +36,7 @@ // /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 --- a/clang-tools-extra/clang-include-fixer/IncludeFixer.h +++ b/clang-tools-extra/clang-include-fixer/IncludeFixer.h @@ -62,7 +62,7 @@ }; /// 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 --- a/clang-tools-extra/clang-include-fixer/IncludeFixerContext.h +++ b/clang-tools-extra/clang-include-fixer/IncludeFixerContext.h @@ -37,7 +37,7 @@ /// 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 --- a/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp +++ b/clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp @@ -25,7 +25,7 @@ // 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 --- 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 @@ 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 --- 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 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 --- 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 @@ 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 --- a/clang-tools-extra/clang-move/Move.cpp +++ b/clang-tools-extra/clang-move/Move.cpp @@ -145,7 +145,7 @@ 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 @@ } // 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 getUsedDecls(const HelperDeclRefGraph *RG, @@ -767,7 +767,7 @@ // 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 @@ std::vector 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 --- a/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp +++ b/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp @@ -116,7 +116,7 @@ /// Reorders fields in the definition of a struct/class. /// -/// At the moment reodering of fields with +/// At the moment reordering of fields with /// different accesses (public/protected/private) is not supported. /// \returns true on success. static bool reorderFieldsInDefinition( @@ -133,7 +133,7 @@ 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 different accesses " + llvm::errs() << "Currently reordering of fields with different 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 --- a/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp +++ b/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp @@ -51,7 +51,7 @@ // 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> 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 --- a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp +++ b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp @@ -41,7 +41,7 @@ static const llvm::IndexedMap, 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, DurationScale2IndexFunctor> diff --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp --- a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp +++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp @@ -96,7 +96,7 @@ {"Hours", "Minutes", "Seconds", "Millis", "Micros", "Nanos"}) { std::string TimeInverse = (llvm::Twine("ToUnix") + ScaleName).str(); llvm::Optional 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 --- a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp @@ -130,7 +130,7 @@ 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 @@ 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 --- a/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp @@ -115,7 +115,7 @@ } 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("InitType"); diff --git a/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp --- a/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp @@ -74,7 +74,7 @@ const Expr *Alloc = Result.Nodes.getNodeAs("Alloc"); if (!Alloc) Alloc = Result.Nodes.getNodeAs("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("StrLen"); diff --git a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp --- a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp @@ -220,7 +220,7 @@ .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 --- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp @@ -156,7 +156,7 @@ const auto *EnumConst = EnumExpr ? dyn_cast(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 --- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp @@ -104,7 +104,7 @@ 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 --- a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp @@ -49,7 +49,7 @@ 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("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 --- a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp @@ -110,7 +110,7 @@ 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 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp @@ -215,7 +215,7 @@ // Result of matching for legacy consumer-functions like `::free()`. const auto *LegacyConsumer = Nodes.getNodeAs("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.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h @@ -69,7 +69,7 @@ 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/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp @@ -189,7 +189,7 @@ ? static_cast(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(*Decl)) { if (DeclsToInit.count(D) > 0) diff --git a/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h --- a/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h +++ b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h @@ -15,7 +15,7 @@ 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 --- a/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp +++ b/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp @@ -30,7 +30,7 @@ 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 --- a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp +++ b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp @@ -65,7 +65,7 @@ } /// This function calculate 2 ** Bits and returns -/// numeric_limits::max() if an overflow occured. +/// numeric_limits::max() if an overflow occurred. static std::size_t twoPow(std::size_t Bits) { return Bits >= std::numeric_limits::digits ? std::numeric_limits::max() @@ -153,7 +153,7 @@ // 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("non-enum-condition")) { diff --git a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp --- a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp @@ -202,7 +202,7 @@ void NoRecursionCheck::handleSCC(ArrayRef 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 @@ 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(EventuallyCyclicCallStack) @@ -260,7 +260,7 @@ CG.addToCallGraph(const_cast(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 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 --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp @@ -668,7 +668,7 @@ } /// 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 --- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp @@ -123,7 +123,7 @@ 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(5) // diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp @@ -333,7 +333,7 @@ const auto *V = cast(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(ExprInit)) ExprInit = E->getSubExpr(); diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp --- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp @@ -307,7 +307,7 @@ /// 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 --- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp @@ -442,7 +442,7 @@ // 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 different 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 --- a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp @@ -79,7 +79,7 @@ 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 --- a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp @@ -285,7 +285,7 @@ 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 --- a/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp @@ -137,7 +137,7 @@ // 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 @@ 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 --- a/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp @@ -125,7 +125,7 @@ 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 --- a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp @@ -102,7 +102,7 @@ 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 --- a/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp @@ -193,7 +193,7 @@ } 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 --- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp +++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp @@ -131,7 +131,7 @@ 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 --- a/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h +++ b/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h @@ -37,7 +37,7 @@ /// 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 --- a/clang-tools-extra/clangd/AST.cpp +++ b/clang-tools-extra/clangd/AST.cpp @@ -95,7 +95,7 @@ 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 --- a/clang-tools-extra/clangd/ClangdLSPServer.h +++ b/clang-tools-extra/clangd/ClangdLSPServer.h @@ -188,7 +188,7 @@ CB(std::move(Rsp)); } else { elog("Failed to decode {0} response", *RawResponse); - CB(llvm::make_error("failed to decode reponse", + CB(llvm::make_error("failed to decode response", ErrorCode::InvalidParams)); } }; diff --git a/clang-tools-extra/clangd/Diagnostics.cpp b/clang-tools-extra/clangd/Diagnostics.cpp --- a/clang-tools-extra/clangd/Diagnostics.cpp +++ b/clang-tools-extra/clangd/Diagnostics.cpp @@ -597,7 +597,7 @@ 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 --- a/clang-tools-extra/clangd/FindSymbols.h +++ b/clang-tools-extra/clangd/FindSymbols.h @@ -32,7 +32,7 @@ /// 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.h b/clang-tools-extra/clangd/FindTarget.h --- a/clang-tools-extra/clangd/FindTarget.h +++ b/clang-tools-extra/clangd/FindTarget.h @@ -149,7 +149,7 @@ /// 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 using Ptr = T*; /// Ptr x; /// ^~~ there is no Decl for 'Ptr', so we return the template pattern. diff --git a/clang-tools-extra/clangd/FindTarget.cpp b/clang-tools-extra/clangd/FindTarget.cpp --- a/clang-tools-extra/clangd/FindTarget.cpp +++ b/clang-tools-extra/clangd/FindTarget.cpp @@ -547,7 +547,7 @@ 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/FormattedString.cpp b/clang-tools-extra/clangd/FormattedString.cpp --- a/clang-tools-extra/clangd/FormattedString.cpp +++ b/clang-tools-extra/clangd/FormattedString.cpp @@ -273,7 +273,7 @@ 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.h b/clang-tools-extra/clangd/Hover.h --- a/clang-tools-extra/clangd/Hover.h +++ b/clang-tools-extra/clangd/Hover.h @@ -62,7 +62,7 @@ /// Pretty-printed variable type. /// Set only for variables. llvm::Optional Type; - /// Set for functions and lambadas. + /// Set for functions and lambdas. llvm::Optional ReturnType; /// Set for functions, lambdas and macros with parameters. llvm::Optional> Parameters; diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp --- a/clang-tools-extra/clangd/Hover.cpp +++ b/clang-tools-extra/clangd/Hover.cpp @@ -279,7 +279,7 @@ // 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 @@ 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 @@ // 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/ParsedAST.cpp b/clang-tools-extra/clangd/ParsedAST.cpp --- a/clang-tools-extra/clangd/ParsedAST.cpp +++ b/clang-tools-extra/clangd/ParsedAST.cpp @@ -276,7 +276,7 @@ } // 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 @@ // 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 --- a/clang-tools-extra/clangd/PathMapping.cpp +++ b/clang-tools-extra/clangd/PathMapping.cpp @@ -21,7 +21,7 @@ llvm::Optional 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 --- a/clang-tools-extra/clangd/Preamble.cpp +++ b/clang-tools-extra/clangd/Preamble.cpp @@ -114,7 +114,7 @@ "(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 --- a/clang-tools-extra/clangd/Quality.cpp +++ b/clang-tools-extra/clangd/Quality.cpp @@ -207,7 +207,7 @@ // 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 --- a/clang-tools-extra/clangd/QueryDriverDatabase.cpp +++ b/clang-tools-extra/clangd/QueryDriverDatabase.cpp @@ -169,7 +169,7 @@ } 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 --- a/clang-tools-extra/clangd/index/Background.cpp +++ b/clang-tools-extra/clangd/index/Background.cpp @@ -234,7 +234,7 @@ // 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 different contents, or indexing was successfull this time. + // File has different 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 --- a/clang-tools-extra/clangd/index/Serialization.cpp +++ b/clang-tools-extra/clangd/index/Serialization.cpp @@ -699,7 +699,7 @@ 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 --- a/clang-tools-extra/clangd/index/SymbolOrigin.h +++ b/clang-tools-extra/clangd/index/SymbolOrigin.h @@ -16,7 +16,7 @@ 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 --- a/clang-tools-extra/clangd/index/dex/Trigram.cpp +++ b/clang-tools-extra/clangd/index/dex/Trigram.cpp @@ -52,7 +52,7 @@ 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.h b/clang-tools-extra/clangd/refactor/Rename.h --- a/clang-tools-extra/clangd/refactor/Rename.h +++ b/clang-tools-extra/clangd/refactor/Rename.h @@ -30,7 +30,7 @@ /// 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/Rename.cpp b/clang-tools-extra/clangd/refactor/Rename.cpp --- a/clang-tools-extra/clangd/refactor/Rename.cpp +++ b/clang-tools-extra/clangd/refactor/Rename.cpp @@ -224,7 +224,7 @@ 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 @@ // *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/tweaks/AddUsing.cpp b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp --- a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp @@ -28,7 +28,7 @@ // 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 --- a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp @@ -151,7 +151,7 @@ // // 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 @@ 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 @@ 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 --- a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp @@ -244,7 +244,7 @@ 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 @@ 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 --- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp @@ -119,7 +119,7 @@ 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 @@ } 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 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -744,7 +744,7 @@ 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 --- a/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp +++ b/clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp @@ -597,7 +597,7 @@ 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 @@ 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 @@ SymY.CanonicalDeclaration.FileURI = BarURI.c_str(); SymX.IncludeHeaders.emplace_back("", 1); SymY.IncludeHeaders.emplace_back("", 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 @@ 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 --- a/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp +++ b/clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp @@ -100,7 +100,7 @@ << "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 --- a/clang-tools-extra/clangd/unittests/FindTargetTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindTargetTests.cpp @@ -604,7 +604,7 @@ }; /// 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 --- a/clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp +++ b/clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp @@ -136,7 +136,7 @@ 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 ExpectedSource; diff --git a/clang-tools-extra/clangd/unittests/PathMappingTests.cpp b/clang-tools-extra/clangd/unittests/PathMappingTests.cpp --- a/clang-tools-extra/clangd/unittests/PathMappingTests.cpp +++ b/clang-tools-extra/clangd/unittests/PathMappingTests.cpp @@ -52,7 +52,7 @@ llvm::Expected 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 --- a/clang-tools-extra/clangd/unittests/RenameTests.cpp +++ b/clang-tools-extra/clangd/unittests/RenameTests.cpp @@ -882,7 +882,7 @@ R"cpp( template 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 {}; diff --git a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp --- a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp +++ b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp @@ -199,7 +199,7 @@ )cpp", {CreateExpectedSymbolDetails("foo", "", "c:@S@foo")}}, { - R"cpp( // Type Reference - template argumen + R"cpp( // Type Reference - template argument struct foo {}; template struct bar {}; void baz() { diff --git a/clang-tools-extra/clangd/unittests/TweakTests.cpp b/clang-tools-extra/clangd/unittests/TweakTests.cpp --- a/clang-tools-extra/clangd/unittests/TweakTests.cpp +++ b/clang-tools-extra/clangd/unittests/TweakTests.cpp @@ -588,7 +588,7 @@ // 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/abseil-no-internal-dependencies.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst @@ -5,7 +5,7 @@ Warns if code using Abseil depends on internal details. If something is in a namespace that includes the word “internal”, code is not allowed to depend upon -it beaucse it’s an implementation detail. They cannot friend it, include it, +it because it’s an implementation detail. They cannot friend it, include it, you mention it or refer to it in any way. Doing so violates Abseil's compatibility guidelines and may result in breakage. See https://abseil.io/about/compatibility for more information. 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 --- 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 --- 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 @@ ========================== 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 --- 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 @@ 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 --- 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 @@ #include // 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 --- 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 @@ 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 --- 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 @@ ... }; -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 --- a/clang-tools-extra/docs/doxygen.cfg.in +++ b/clang-tools-extra/docs/doxygen.cfg.in @@ -1400,7 +1400,7 @@ 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 --- a/clang-tools-extra/docs/pp-trace.rst +++ b/clang-tools-extra/docs/pp-trace.rst @@ -123,7 +123,7 @@ 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.h b/clang-tools-extra/modularize/CoverageChecker.h --- a/clang-tools-extra/modularize/CoverageChecker.h +++ b/clang-tools-extra/modularize/CoverageChecker.h @@ -124,7 +124,7 @@ /// \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/CoverageChecker.cpp b/clang-tools-extra/modularize/CoverageChecker.cpp --- a/clang-tools-extra/modularize/CoverageChecker.cpp +++ b/clang-tools-extra/modularize/CoverageChecker.cpp @@ -267,7 +267,7 @@ 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/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp --- 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 --- 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 @@ } // 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 --- a/clang-tools-extra/pp-trace/PPCallbacksTracker.h +++ b/clang-tools-extra/pp-trace/PPCallbacksTracker.h @@ -68,7 +68,7 @@ /// 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 @@ ~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 --- 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 --- 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 --- 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 --- 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 @@ // 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 --- 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 @@ 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 --- 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 @@ 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 --- 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 --- 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 --- 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 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 @@ 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 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 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 --- 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 @@ struct foo { typedef OutputStream 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 --- 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 @@ 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 --- 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // CHECK-MESSAGES: :[[@LINE-2]]:48: warning: {{.*}} in named cast // CHECK-FIXES: void (*f5)() = reinterpret_cast(0);{{$}} - // intentionally not LLVM style to check preservation of whitesapce + // intentionally not LLVM style to check preservation of whitespace void (*f6)(void) = static_cast(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 @@ // 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