]> granicus.if.org Git - clang/commitdiff
Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.
authorDouglas Gregor <dgregor@apple.com>
Tue, 24 Aug 2010 15:53:44 +0000 (15:53 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 24 Aug 2010 15:53:44 +0000 (15:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111916 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/TypeLoc.h

index 842c06878453d58bf0915952644198262234f050..f1c64bd95977e12051808ff2314e13f012702922 100644 (file)
@@ -341,6 +341,10 @@ private:
 template <class Base, class Derived, class TypeClass>
 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());
   }