From: Douglas Gregor Date: Tue, 24 Aug 2010 15:53:44 +0000 (+0000) Subject: Teach InheritingConcreteTypeLoc to play nicely with dyn_cast. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=713da40fb093cb6ab50ddc57e1697fddf9802104;p=clang Teach InheritingConcreteTypeLoc to play nicely with dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111916 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/TypeLoc.h b/include/clang/AST/TypeLoc.h index 842c068784..f1c64bd959 100644 --- a/include/clang/AST/TypeLoc.h +++ b/include/clang/AST/TypeLoc.h @@ -341,6 +341,10 @@ private: template class InheritingConcreteTypeLoc : public Base { public: + static bool classofType(const Type *Ty) { + return TypeClass::classof(Ty); + } + static bool classof(const TypeLoc *TL) { return Derived::classofType(TL->getTypePtr()); }