Skip to content

Commit cfece5a

Browse files
authored
[clang][ASTMatchers][NFC] fix typos in AST-matchers docs. (#141307)
1 parent 81bde10 commit cfece5a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

clang/include/clang/ASTMatchers/ASTMatchFinder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ SmallVector<BoundNodes, 1> match(MatcherT Matcher, ASTContext &Context);
268268
/// Returns \c NULL if there is no match, or if the matching node cannot be
269269
/// casted to \c NodeT.
270270
///
271-
/// This is useful in combanation with \c match():
271+
/// This is useful in combination with \c match():
272272
/// \code
273273
/// const Decl *D = selectFirst<Decl>("id", match(Matcher.bind("id"),
274274
/// Node, Context));

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ extern const internal::VariadicDynCastAllOfMatcher<Decl,
612612
TemplateTemplateParmDecl>
613613
templateTemplateParmDecl;
614614

615-
/// Matches public C++ declarations and C++ base specifers that specify public
615+
/// Matches public C++ declarations and C++ base specifiers that specify public
616616
/// inheritance.
617617
///
618618
/// Examples:
@@ -635,7 +635,7 @@ AST_POLYMORPHIC_MATCHER(isPublic,
635635
return getAccessSpecifier(Node) == AS_public;
636636
}
637637

638-
/// Matches protected C++ declarations and C++ base specifers that specify
638+
/// Matches protected C++ declarations and C++ base specifiers that specify
639639
/// protected inheritance.
640640
///
641641
/// Examples:
@@ -657,8 +657,8 @@ AST_POLYMORPHIC_MATCHER(isProtected,
657657
return getAccessSpecifier(Node) == AS_protected;
658658
}
659659

660-
/// Matches private C++ declarations and C++ base specifers that specify private
661-
/// inheritance.
660+
/// Matches private C++ declarations and C++ base specifiers that specify
661+
/// private inheritance.
662662
///
663663
/// Examples:
664664
/// \code
@@ -1212,7 +1212,7 @@ AST_MATCHER_P(TemplateArgument, refersToIntegralType,
12121212
/// Matches a TemplateArgument of integral type with a given value.
12131213
///
12141214
/// Note that 'Value' is a string as the template argument's value is
1215-
/// an arbitrary precision integer. 'Value' must be euqal to the canonical
1215+
/// an arbitrary precision integer. 'Value' must be equal to the canonical
12161216
/// representation of that integral value in base 10.
12171217
///
12181218
/// Given
@@ -5689,7 +5689,7 @@ AST_POLYMORPHIC_MATCHER_P(equalsBoundNode,
56895689
// FIXME: Figure out whether it makes sense to allow this
56905690
// on any other node types.
56915691
// For *Loc it probably does not make sense, as those seem
5692-
// unique. For NestedNameSepcifier it might make sense, as
5692+
// unique. For NestedNameSpecifier it might make sense, as
56935693
// those also have pointer identity, but I'm not sure whether
56945694
// they're ever reused.
56955695
internal::NotEqualsBoundNodePredicate Predicate;
@@ -6322,7 +6322,7 @@ AST_MATCHER_P(CXXMethodDecl, forEachOverridden,
63226322
return Matched;
63236323
}
63246324

6325-
/// Matches declarations of virtual methods and C++ base specifers that specify
6325+
/// Matches declarations of virtual methods and C++ base specifiers that specify
63266326
/// virtual inheritance.
63276327
///
63286328
/// Example:
@@ -7710,7 +7710,7 @@ extern const AstTypeMatcher<InjectedClassNameType> injectedClassNameType;
77107710
/// \endcode
77117711
extern const AstTypeMatcher<DecayedType> decayedType;
77127712

7713-
/// Matches the decayed type, whoes decayed type matches \c InnerMatcher
7713+
/// Matches the decayed type, whose decayed type matches \c InnerMatcher
77147714
AST_MATCHER_P(DecayedType, hasDecayedType, internal::Matcher<QualType>,
77157715
InnerType) {
77167716
return InnerType.matches(Node.getDecayedType(), Finder, Builder);
@@ -7750,7 +7750,7 @@ extern const AstTypeMatcher<DependentTemplateSpecializationType>
77507750
/// }
77517751
/// \endcode
77527752
///
7753-
/// \c cxxRcordDecl(hasDeclContext(namedDecl(hasName("M")))) matches the
7753+
/// \c cxxRecordDecl(hasDeclContext(namedDecl(hasName("M")))) matches the
77547754
/// declaration of \c class \c D.
77557755
AST_MATCHER_P(Decl, hasDeclContext, internal::Matcher<Decl>, InnerMatcher) {
77567756
const DeclContext *DC = Node.getDeclContext();
@@ -8464,7 +8464,7 @@ AST_MATCHER_P(Stmt, forCallable, internal::Matcher<Decl>, InnerMatcher) {
84648464
/// \endcode
84658465
///
84668466
/// Example matches f() because it has external formal linkage despite being
8467-
/// unique to the translation unit as though it has internal likage
8467+
/// unique to the translation unit as though it has internal linkage
84688468
/// (matcher = functionDecl(hasExternalFormalLinkage()))
84698469
///
84708470
/// \code

clang/include/clang/ASTMatchers/ASTMatchersInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ class HasDeclarationMatcher : public MatcherInterface<T> {
10341034
// A SubstTemplateTypeParmType exists solely to mark a type substitution
10351035
// on the instantiated template. As users usually want to match the
10361036
// template parameter on the uninitialized template, we can always desugar
1037-
// one level without loss of expressivness.
1037+
// one level without loss of expressiveness.
10381038
// For example, given:
10391039
// template<typename T> struct X { T t; } class A {}; X<A> a;
10401040
// The following matcher will match, which otherwise would not:

0 commit comments

Comments
 (0)