diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/Type.h | 12 | ||||
-rw-r--r-- | clang/lib/AST/Type.cpp | 8 |
2 files changed, 2 insertions, 18 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index a026961b20c..cb183b8d7ac 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -3094,8 +3094,6 @@ public: return T->getTypeClass() >= TagFirst && T->getTypeClass() <= TagLast; } static bool classof(const TagType *) { return true; } - static bool classof(const RecordType *) { return true; } - static bool classof(const EnumType *) { return true; } }; /// RecordType - This is a helper class that allows the use of isa/cast/dyncast @@ -3121,10 +3119,7 @@ public: bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } - static bool classof(const TagType *T); - static bool classof(const Type *T) { - return isa<TagType>(T) && classof(cast<TagType>(T)); - } + static bool classof(const Type *T) { return T->getTypeClass() == Record; } static bool classof(const RecordType *) { return true; } }; @@ -3143,10 +3138,7 @@ public: bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } - static bool classof(const TagType *T); - static bool classof(const Type *T) { - return isa<TagType>(T) && classof(cast<TagType>(T)); - } + static bool classof(const Type *T) { return T->getTypeClass() == Enum; } static bool classof(const EnumType *) { return true; } }; diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index b6ce59e977d..698474b8383 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -1802,14 +1802,6 @@ CXXRecordDecl *InjectedClassNameType::getDecl() const { return cast<CXXRecordDecl>(getInterestingTagDecl(Decl)); } -bool RecordType::classof(const TagType *TT) { - return isa<RecordDecl>(TT->getDecl()); -} - -bool EnumType::classof(const TagType *TT) { - return isa<EnumDecl>(TT->getDecl()); -} - IdentifierInfo *TemplateTypeParmType::getIdentifier() const { return isCanonicalUnqualified() ? 0 : getDecl()->getIdentifier(); } |