Skip to content

[clang][ASTMatchers][NFC] fix typos in AST-matchers docs. #141307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/include/clang/ASTMatchers/ASTMatchFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
20 changes: 10 additions & 10 deletions clang/include/clang/ASTMatchers/ASTMatchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/ASTMatchers/ASTMatchersInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down