summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy
diff options
context:
space:
mode:
authorKazuaki Ishizaki <ishizaki@jp.ibm.com>2020-01-04 10:28:41 -0500
committerAaron Ballman <aaron@aaronballman.com>2020-01-04 10:28:41 -0500
commitb7ecf1c1c373c53183ef6ef66efbe4237ff7b96d (patch)
tree02e12313b27fbae77d0097e26edbf030b0a2dbb2 /clang-tools-extra/clang-tidy
parentca8b20ca3ba10288b61a083c4ce57fb011124935 (diff)
downloadbcm5719-llvm-b7ecf1c1c373c53183ef6ef66efbe4237ff7b96d.tar.gz
bcm5719-llvm-b7ecf1c1c373c53183ef6ef66efbe4237ff7b96d.zip
NFC: Fix trivial typos in comments
Diffstat (limited to 'clang-tools-extra/clang-tidy')
-rw-r--r--clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h2
-rw-r--r--clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp2
18 files changed, 19 insertions, 19 deletions
diff --git a/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp b/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
index a6748e9d9f8..ef44b23331d 100644
--- a/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
@@ -65,7 +65,7 @@ void FasterStrsplitDelimiterCheck::registerMatchers(MatchFinder *Finder) {
expr(ignoringParenCasts(stringLiteral(lengthIsOne()).bind("Literal")));
// Binds to a string_view (either absl or std) that was passed by value and
- // contructed from string literal.
+ // constructed from string literal.
auto StringViewArg = ignoringElidableConstructorCall(ignoringImpCasts(
cxxConstructExpr(hasType(recordDecl(hasName("::absl::string_view"))),
hasArgument(0, ignoringParenImpCasts(SingleChar)))));
diff --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
index fee1d556eb9..a3866651dce 100644
--- a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
@@ -168,7 +168,7 @@ void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
!InsideMacroDefinition(Result, MaybeCallArg->getSourceRange())) {
// Handle the case where the matched expression is inside a call which
// converts it from the inverse to a Duration. In this case, we replace
- // the outer with just the subtraction expresison, which gives the right
+ // the outer with just the subtraction expression, which gives the right
// type and scale, taking care again about parenthesis.
bool NeedParens = parensRequired(Result, MaybeCallArg);
diff --git a/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
index a03f8609ea6..7f851f0ba02 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
@@ -63,7 +63,7 @@ void ForwardDeclarationNamespaceCheck::check(
const auto *Decl = Result.Nodes.getNodeAs<FriendDecl>("friend_decl");
assert(Decl && "Decl is neither record_decl nor friend decl!");
- // Classes used in friend delarations are not marked referenced in AST,
+ // Classes used in friend declarations are not marked referenced in AST,
// so we need to check classes used in friend declarations manually to
// reduce the rate of false positive.
// For example, in
diff --git a/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
index 0fbd93e847e..815062618a9 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
@@ -27,7 +27,7 @@ AST_MATCHER(StringLiteral, containsNul) {
void StringLiteralWithEmbeddedNulCheck::registerMatchers(MatchFinder *Finder) {
// Match a string that contains embedded NUL character. Extra-checks are
- // applied in |check| to find incorectly escaped characters.
+ // applied in |check| to find incorrectly escaped characters.
Finder->addMatcher(stringLiteral(containsNul()).bind("strlit"), this);
// The remaining checks only apply to C++.
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
index fc334fb5b3b..96e9d3edc01 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -31,7 +31,7 @@ AST_MATCHER(CXXRecordDecl, hasDefaultConstructor) {
}
// Iterate over all the fields in a record type, both direct and indirect (e.g.
-// if the record contains an anonmyous struct).
+// if the record contains an anonymous struct).
template <typename T, typename Func>
void forEachField(const RecordDecl &Record, const T &Fields, Func &&Fn) {
for (const FieldDecl *F : Fields) {
@@ -424,7 +424,7 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
}
// Collect all fields in order, both direct fields and indirect fields from
- // anonmyous record types.
+ // anonymous record types.
SmallVector<const FieldDecl *, 16> OrderedFields;
forEachField(ClassDecl, ClassDecl.fields(),
[&](const FieldDecl *F) { OrderedFields.push_back(F); });
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
index 62c4c768e84..6f0afe989d4 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
@@ -45,7 +45,7 @@ void SlicingCheck::registerMatchers(MatchFinder *Finder) {
const auto IsWithinDerivedCtor =
hasParent(cxxConstructorDecl(ofClass(equalsBoundNode("DerivedDecl"))));
- // Assignement slicing: "a = b;" and "a = std::move(b);" variants.
+ // Assignment slicing: "a = b;" and "a = std::move(b);" variants.
const auto SlicesObjectInAssignment =
callExpr(callee(cxxMethodDecl(anyOf(isCopyAssignmentOperator(),
isMoveAssignmentOperator()),
diff --git a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
index a83e636a433..c6d72494243 100644
--- a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
@@ -61,7 +61,7 @@ void GlobalNamesInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
if (const auto *UsingDirective = dyn_cast<UsingDirectiveDecl>(D)) {
if (UsingDirective->getNominatedNamespace()->isAnonymousNamespace()) {
- // Anynoumous namespaces inject a using directive into the AST to import
+ // Anonymous namespaces inject a using directive into the AST to import
// the names into the containing namespace.
// We should not have them in headers, but there is another warning for
// that.
diff --git a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
index 518e31ef434..b161b824f22 100644
--- a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
+++ b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
@@ -24,7 +24,7 @@ namespace runtime {
/// Finds uses of `short`, `long` and `long long` and suggest replacing them
/// with `u?intXX(_t)?`.
///
-/// Correspondig cpplint.py check: 'runtime/int'.
+/// Corresponding cpplint.py check: 'runtime/int'.
class IntegerTypesCheck : public ClangTidyCheck {
public:
IntegerTypesCheck(StringRef Name, ClangTidyContext *Context);
diff --git a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
index e3dffd0698f..1874d8ef35c 100644
--- a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
@@ -43,7 +43,7 @@ namespace tidy {
namespace modernize {
void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) {
- // std::array<> is avaliable since C++11.
+ // std::array<> is available since C++11.
if (!getLangOpts().CPlusPlus11)
return;
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
index 44ff0641fd2..12d3f629039 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
@@ -376,7 +376,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
// struct S { S(std::initializer_list<int>); };
// struct S2 { S2(S, int); };
// smart_ptr<S>(new S{1, 2, 3}); // C++11 direct list-initialization
- // smart_ptr<S>(new S{}); // use initializer-list consturctor
+ // smart_ptr<S>(new S{}); // use initializer-list constructor
// smart_ptr<S2>()new S2{ {1,2}, 3 }; // have a list-initialized arg
// The above cases have to be replaced with:
// std::make_smart_ptr<S>(std::initializer_list<int>({1, 2, 3}));
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
index 5cab62946d1..86545d3714a 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
@@ -359,7 +359,7 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) {
}
if (const auto *NestedConstruct = dyn_cast<CXXConstructExpr>(E)) {
- // If we ran into an implicit conversion contructor, can't convert.
+ // If we ran into an implicit conversion constructor, can't convert.
//
// FIXME: The following only checks if the constructor can be used
// implicitly, not if it actually was. Cases where the converting
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
index 27e85968722..6efa9822c6c 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -33,7 +33,7 @@ AST_MATCHER(Type, sugaredNullptrType) {
/// Create a matcher that finds implicit casts as well as the head of a
/// sequence of zero or more nested explicit casts that have an implicit cast
/// to null within.
-/// Finding sequences of explict casts is necessary so that an entire sequence
+/// Finding sequences of explicit casts is necessary so that an entire sequence
/// can be replaced instead of just the inner-most implicit cast.
StatementMatcher makeCastSequenceMatcher() {
StatementMatcher ImplicitCastToNull = implicitCastExpr(
diff --git a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
index b8a6d49e234..eba6207ed74 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
@@ -19,7 +19,7 @@ namespace performance {
///
/// Associative containers implements some of the algorithms as methods which
/// should be preferred to the algorithms in the algorithm header. The methods
-/// can take advanatage of the order of the elements.
+/// can take advantage of the order of the elements.
class InefficientAlgorithmCheck : public ClangTidyCheck {
public:
InefficientAlgorithmCheck(StringRef Name, ClangTidyContext *Context)
diff --git a/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp b/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
index e93ed7e3a33..e985fe80508 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
@@ -165,7 +165,7 @@ void InefficientVectorOperationCheck::registerMatchers(MatchFinder *Finder) {
// A method's name starts with "add_" might not mean it's an add field
// call; it could be the getter for a proto field of which the name starts
- // with "add_". So we exlude const methods.
+ // with "add_". So we exclude const methods.
const auto AddFieldMethodDecl =
cxxMethodDecl(matchesName("::add_"), unless(isConst()));
AddMatcher(ProtoDecl, ProtoVarDeclName, ProtoVarDeclStmtName,
diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
index e72ae4e29d4..f4130972a6e 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
@@ -84,7 +84,7 @@ public:
};
/// Holds an identifier name check failure, tracking the kind of the
- /// identifer, its possible fixup and the starting locations of all the
+ /// identifier, its possible fixup and the starting locations of all the
/// identifier usages.
struct NamingCheckFailure {
std::string KindName;
diff --git a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
index 64a955f6803..f95b1c9cb2a 100644
--- a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
@@ -73,7 +73,7 @@ bool checkIfFixItHintIsApplicable(
if (!ParameterSourceDeclaration->isThisDeclarationADefinition())
return false;
- // Assumption: if parameter is not referenced in function defintion body, it
+ // Assumption: if parameter is not referenced in function definition body, it
// may indicate that it's outdated, so don't touch it.
if (!SourceParam->isReferenced())
return false;
diff --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
index 2caa1aad852..2ae08c83f52 100644
--- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
+++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
@@ -24,7 +24,7 @@ namespace utils {
class ExceptionAnalyzer {
public:
enum class State : std::int8_t {
- Throwing = 0, ///< The function can definitly throw given an AST.
+ Throwing = 0, ///< The function can definitely throw given an AST.
NotThrowing = 1, ///< This function can not throw, given an AST.
Unknown = 2, ///< This can happen for extern functions without available
///< definition.
diff --git a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
index fe99e684e1d..d1fc9bda77d 100644
--- a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
+++ b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
@@ -38,7 +38,7 @@ NamespaceAliaser::createAlias(ASTContext &Context, const Stmt &Statement,
return None;
// FIXME: Doesn't consider the order of declarations.
- // If we accidentially pick an alias defined later in the function,
+ // If we accidentally pick an alias defined later in the function,
// the output won't compile.
// FIXME: Also doesn't consider file or class-scope aliases.
OpenPOWER on IntegriCloud