[clang] cfece5a - [clang][ASTMatchers][NFC] fix typos in AST-matchers docs. (#141307)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 21:28:55 PDT 2025
Author: Baranov Victor
Date: 2025-05-28T07:28:52+03:00
New Revision: cfece5abe34edf74bbdd23aea706fa3988c09db0
URL: https://github.com/llvm/llvm-project/commit/cfece5abe34edf74bbdd23aea706fa3988c09db0
DIFF: https://github.com/llvm/llvm-project/commit/cfece5abe34edf74bbdd23aea706fa3988c09db0.diff
LOG: [clang][ASTMatchers][NFC] fix typos in AST-matchers docs. (#141307)
Added:
Modified:
clang/include/clang/ASTMatchers/ASTMatchFinder.h
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/include/clang/ASTMatchers/ASTMatchersInternal.h
Removed:
################################################################################
diff --git a/clang/include/clang/ASTMatchers/ASTMatchFinder.h b/clang/include/clang/ASTMatchers/ASTMatchFinder.h
index a387d9037b7da..73cbcf1f25025 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchFinder.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchFinder.h
@@ -268,7 +268,7 @@ SmallVector<BoundNodes, 1> match(MatcherT Matcher, ASTContext &Context);
/// Returns \c NULL if there is no match, or if the matching node cannot be
/// casted to \c NodeT.
///
-/// This is useful in combanation with \c match():
+/// This is useful in combination with \c match():
/// \code
/// const Decl *D = selectFirst<Decl>("id", match(Matcher.bind("id"),
/// Node, Context));
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h
index e6b684b24b080..e4d605d165324 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -612,7 +612,7 @@ extern const internal::VariadicDynCastAllOfMatcher<Decl,
TemplateTemplateParmDecl>
templateTemplateParmDecl;
-/// Matches public C++ declarations and C++ base specifers that specify public
+/// Matches public C++ declarations and C++ base specifiers that specify public
/// inheritance.
///
/// Examples:
@@ -635,7 +635,7 @@ AST_POLYMORPHIC_MATCHER(isPublic,
return getAccessSpecifier(Node) == AS_public;
}
-/// Matches protected C++ declarations and C++ base specifers that specify
+/// Matches protected C++ declarations and C++ base specifiers that specify
/// protected inheritance.
///
/// Examples:
@@ -657,8 +657,8 @@ AST_POLYMORPHIC_MATCHER(isProtected,
return getAccessSpecifier(Node) == AS_protected;
}
-/// Matches private C++ declarations and C++ base specifers that specify private
-/// inheritance.
+/// Matches private C++ declarations and C++ base specifiers that specify
+/// private inheritance.
///
/// Examples:
/// \code
@@ -1212,7 +1212,7 @@ AST_MATCHER_P(TemplateArgument, refersToIntegralType,
/// Matches a TemplateArgument of integral type with a given value.
///
/// Note that 'Value' is a string as the template argument's value is
-/// an arbitrary precision integer. 'Value' must be euqal to the canonical
+/// an arbitrary precision integer. 'Value' must be equal to the canonical
/// representation of that integral value in base 10.
///
/// Given
@@ -5689,7 +5689,7 @@ AST_POLYMORPHIC_MATCHER_P(equalsBoundNode,
// FIXME: Figure out whether it makes sense to allow this
// on any other node types.
// For *Loc it probably does not make sense, as those seem
- // unique. For NestedNameSepcifier it might make sense, as
+ // unique. For NestedNameSpecifier it might make sense, as
// those also have pointer identity, but I'm not sure whether
// they're ever reused.
internal::NotEqualsBoundNodePredicate Predicate;
@@ -6322,7 +6322,7 @@ AST_MATCHER_P(CXXMethodDecl, forEachOverridden,
return Matched;
}
-/// Matches declarations of virtual methods and C++ base specifers that specify
+/// Matches declarations of virtual methods and C++ base specifiers that specify
/// virtual inheritance.
///
/// Example:
@@ -7710,7 +7710,7 @@ extern const AstTypeMatcher<InjectedClassNameType> injectedClassNameType;
/// \endcode
extern const AstTypeMatcher<DecayedType> decayedType;
-/// Matches the decayed type, whoes decayed type matches \c InnerMatcher
+/// Matches the decayed type, whose decayed type matches \c InnerMatcher
AST_MATCHER_P(DecayedType, hasDecayedType, internal::Matcher<QualType>,
InnerType) {
return InnerType.matches(Node.getDecayedType(), Finder, Builder);
@@ -7750,7 +7750,7 @@ extern const AstTypeMatcher<DependentTemplateSpecializationType>
/// }
/// \endcode
///
-/// \c cxxRcordDecl(hasDeclContext(namedDecl(hasName("M")))) matches the
+/// \c cxxRecordDecl(hasDeclContext(namedDecl(hasName("M")))) matches the
/// declaration of \c class \c D.
AST_MATCHER_P(Decl, hasDeclContext, internal::Matcher<Decl>, InnerMatcher) {
const DeclContext *DC = Node.getDeclContext();
@@ -8464,7 +8464,7 @@ AST_MATCHER_P(Stmt, forCallable, internal::Matcher<Decl>, InnerMatcher) {
/// \endcode
///
/// Example matches f() because it has external formal linkage despite being
-/// unique to the translation unit as though it has internal likage
+/// unique to the translation unit as though it has internal linkage
/// (matcher = functionDecl(hasExternalFormalLinkage()))
///
/// \code
diff --git a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
index 4a27a5d099e60..667a044abcef1 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
@@ -1034,7 +1034,7 @@ class HasDeclarationMatcher : public MatcherInterface<T> {
// A SubstTemplateTypeParmType exists solely to mark a type substitution
// on the instantiated template. As users usually want to match the
// template parameter on the uninitialized template, we can always desugar
- // one level without loss of expressivness.
+ // one level without loss of expressiveness.
// For example, given:
// template<typename T> struct X { T t; } class A {}; X<A> a;
// The following matcher will match, which otherwise would not:
More information about the cfe-commits
mailing list