[cfe-commits] r111916 - /cfe/trunk/include/clang/AST/TypeLoc.h
Douglas Gregor
dgregor at apple.com
Tue Aug 24 08:53:44 PDT 2010
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());
}
More information about the cfe-commits
mailing list