Author: dgregor
Date: Tue Aug 24 10:53:44 2010
New Revision: 111916
URL: http://llvm.org/viewvc/llvm-project?rev=111916&view=rev
Log:
Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.
Modified:
cfe/trunk/include/clang/AST/TypeLoc.h
Modified: cfe/trunk/include/clang/AST/TypeLoc.h
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=111916&r1=111915&r2=111916&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeLoc.h (original)
+++ cfe/trunk/include/clang/AST/TypeLoc.h Tue Aug 24 10:53:44 2010
@@ -341,6 +341,10 @@
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());
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits