diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-24 15:53:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-24 15:53:44 +0000 |
commit | 713da40fb093cb6ab50ddc57e1697fddf9802104 (patch) | |
tree | 6db292b1b24d7920410c1b3876347f54389edced | |
parent | 09a63c97b95eb4dc6fd6b2323929e8cf12af03ff (diff) |
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
-rw-r--r-- | include/clang/AST/TypeLoc.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 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()); } |