diff options
Diffstat (limited to 'include/clang/AST/RecursiveASTVisitor.h')
-rw-r--r-- | include/clang/AST/RecursiveASTVisitor.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index a7a13409eb..36b151ddf3 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -623,6 +623,17 @@ case Stmt::CLASS ## Class: DISPATCH(CLASS, CLASS, S); template<typename Derived> bool RecursiveASTVisitor<Derived>::VisitObjCInterfaceType( ObjCInterfaceType *T) { + return getDerived().VisitObjCObjectType(T); + } + + template<typename Derived> + bool RecursiveASTVisitor<Derived>::VisitObjCObjectType(ObjCObjectType *T) { + // We have to watch out here because an ObjCInterfaceType's base + // type is itself. + if (T->getBaseType().getTypePtr() != T) + if (Visit(T->getBaseType())) + return true; + return getDerived().VisitType(T); } |