[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 21 16:38:44 PDT 2021


njames93 requested changes to this revision.
njames93 added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3812-3821
 AST_POLYMORPHIC_MATCHER_P_OVERLOAD(
     hasType,
     AST_POLYMORPHIC_SUPPORTED_TYPES(Expr, FriendDecl, TypedefNameDecl,
-                                    ValueDecl),
+                                    ValueDecl, CXXBaseSpecifier),
     internal::Matcher<QualType>, InnerMatcher, 0) {
   QualType QT = internal::getUnderlyingType(Node);
   if (!QT.isNull())
----------------
I don't think the change to this matcher is warranted.
The `hasType` matcher that accepts a DeclarationMatcher already has support for cxxBaseSpecifier.
However overloading the matcher that takes a QualType matcher doesn't make sense as base specifiers have no qualifications.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69218/new/

https://reviews.llvm.org/D69218



More information about the cfe-commits mailing list