[clang-tools-extra] NFC: Fix trivial typo in documents and comments
Differential Revision: https://reviews.llvm.org/D77458
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp b/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp
index 6e678c9..b582885 100644
--- 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<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 3466cdb..39ee86b 100644
--- 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<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 a386665..368aa57 100644
--- 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<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 e40b275..e5f9ebd 100644
--- 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
index e77c981..d3bcdb2 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::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 3e6f9fd..10bbcb8 100644
--- 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<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 fb0d435..1eb5a2f 100644
--- 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
index 1924037..ec088ec 100644
--- 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<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 09409d8..b21fea1 100644
--- 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
index 4000879..4099508 100644
--- 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<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 daefc9e..c9722a2 100644
--- 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
index 905aee9..27ee0e4 100644
--- 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<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 485a07c..da0794a 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -189,7 +189,7 @@
? 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 9e5491c..338fc14 100644
--- 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/fuchsia/MultipleInheritanceCheck.h b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
index 7ac70da..801124c 100644
--- 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
index 7416eb5..1555201 100644
--- 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
index e30b4f1..91e2cda 100644
--- 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<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 @@
// 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 05007e5..5b1dbf3 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::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 @@
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 @@
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 237b2bd..08f817a 100644
--- 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
index 3466a8a..39410d6 100644
--- 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<int []>(5)
//
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
index d0f1370..b4d920f 100644
--- 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<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 307297f..37e4d24 100644
--- 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
index f920592..87be932 100644
--- 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
index d987886..1647cb1 100644
--- 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
index b957374..22fce44 100644
--- 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
index 32177ad..38e4272 100644
--- 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
index 3f096c2..cf31ad0 100644
--- 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
index 6b55690..2de4ccd 100644
--- 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
index eef63b7..f99a8b9 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::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 e8bccd7..1e544f4 100644
--- 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
index e5dfae1..26184a5 100644
--- 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";