@@ -161,6 +161,9 @@ inline QualType getUnderlyingType(const FriendDecl &Node) {
161
161
inline QualType getUnderlyingType (const CXXBaseSpecifier &Node) {
162
162
return Node.getType ();
163
163
}
164
+ inline QualType getUnderlyingType (const ObjCInterfaceDecl &Node) {
165
+ return Node.getTypeForDecl ()->getPointeeType ();
166
+ }
164
167
165
168
// / Unifies obtaining a `TypeSourceInfo` from different node types.
166
169
template <typename T,
@@ -1113,6 +1116,11 @@ class HasDeclarationMatcher : public MatcherInterface<T> {
1113
1116
return matchesDecl (Node.getDecl (), Finder, Builder);
1114
1117
}
1115
1118
1119
+ bool matchesSpecialized (const ObjCInterfaceDecl &Node, ASTMatchFinder *Finder,
1120
+ BoundNodesTreeBuilder *Builder) const {
1121
+ return matchesDecl (Node.getCanonicalDecl (), Finder, Builder);
1122
+ }
1123
+
1116
1124
// / Extracts the operator new of the new call and returns whether the
1117
1125
// / inner matcher matches on it.
1118
1126
bool matchesSpecialized (const CXXNewExpr &Node,
@@ -1213,7 +1221,7 @@ using HasDeclarationSupportedTypes =
1213
1221
ElaboratedType, InjectedClassNameType, LabelStmt, AddrLabelExpr,
1214
1222
MemberExpr, QualType, RecordType, TagType,
1215
1223
TemplateSpecializationType, TemplateTypeParmType, TypedefType,
1216
- UnresolvedUsingType, ObjCIvarRefExpr>;
1224
+ UnresolvedUsingType, ObjCIvarRefExpr, ObjCInterfaceDecl >;
1217
1225
1218
1226
// / A Matcher that allows binding the node it matches to an id.
1219
1227
// /
0 commit comments