diff options
40 files changed, 0 insertions, 425 deletions
diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h index a183eb059c..37b0740cb9 100644 --- a/include/clang/AST/ASTConsumer.h +++ b/include/clang/AST/ASTConsumer.h @@ -130,9 +130,6 @@ public: /// PrintStats - If desired, print any statistics. virtual void PrintStats() {} - - // Support isa/cast/dyn_cast - static bool classof(const ASTConsumer *) { return true; } }; } // end namespace clang. diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index b17bd48b7d..12a9855617 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -107,9 +107,6 @@ public: // Pretty print this attribute. virtual void printPretty(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const = 0; - - // Implement isa/cast/dyncast/etc. - static bool classof(const Attr *) { return true; } }; class InheritableAttr : public Attr { @@ -125,7 +122,6 @@ public: static bool classof(const Attr *A) { return A->getKind() <= attr::LAST_INHERITABLE; } - static bool classof(const InheritableAttr *) { return true; } }; class InheritableParamAttr : public InheritableAttr { @@ -139,7 +135,6 @@ public: static bool classof(const Attr *A) { return A->getKind() <= attr::LAST_INHERITABLE_PARAM; } - static bool classof(const InheritableParamAttr *) { return true; } }; #include "clang/AST/Attrs.inc" diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h index ea039795e9..e4b3d2c9f3 100644 --- a/include/clang/AST/Comment.h +++ b/include/clang/AST/Comment.h @@ -175,8 +175,6 @@ public: void dump(llvm::raw_ostream &OS, const CommandTraits *Traits, const SourceManager *SM) const; - static bool classof(const Comment *) { return true; } - SourceRange getSourceRange() const LLVM_READONLY { return Range; } SourceLocation getLocStart() const LLVM_READONLY { @@ -218,8 +216,6 @@ public: C->getCommentKind() <= LastInlineContentCommentConstant; } - static bool classof(const InlineContentComment *) { return true; } - void addTrailingNewline() { InlineContentCommentBits.HasTrailingNewline = 1; } @@ -246,8 +242,6 @@ public: return C->getCommentKind() == TextCommentKind; } - static bool classof(const TextComment *) { return true; } - child_iterator child_begin() const { return NULL; } child_iterator child_end() const { return NULL; } @@ -306,8 +300,6 @@ public: return C->getCommentKind() == InlineCommandCommentKind; } - static bool classof(const InlineCommandComment *) { return true; } - child_iterator child_begin() const { return NULL; } child_iterator child_end() const { return NULL; } @@ -368,8 +360,6 @@ public: C->getCommentKind() <= LastHTMLTagCommentConstant; } - static bool classof(const HTMLTagComment *) { return true; } - StringRef getTagName() const LLVM_READONLY { return TagName; } SourceRange getTagNameSourceRange() const LLVM_READONLY { @@ -435,8 +425,6 @@ public: return C->getCommentKind() == HTMLStartTagCommentKind; } - static bool classof(const HTMLStartTagComment *) { return true; } - child_iterator child_begin() const { return NULL; } child_iterator child_end() const { return NULL; } @@ -492,8 +480,6 @@ public: return C->getCommentKind() == HTMLEndTagCommentKind; } - static bool classof(const HTMLEndTagComment *) { return true; } - child_iterator child_begin() const { return NULL; } child_iterator child_end() const { return NULL; } @@ -514,8 +500,6 @@ public: return C->getCommentKind() >= FirstBlockContentCommentConstant && C->getCommentKind() <= LastBlockContentCommentConstant; } - - static bool classof(const BlockContentComment *) { return true; } }; /// A single paragraph that contains inline content. @@ -545,8 +529,6 @@ public: return C->getCommentKind() == ParagraphCommentKind; } - static bool classof(const ParagraphComment *) { return true; } - child_iterator child_begin() const { return reinterpret_cast<child_iterator>(Content.begin()); } @@ -613,8 +595,6 @@ public: C->getCommentKind() <= LastBlockCommandCommentConstant; } - static bool classof(const BlockCommandComment *) { return true; } - child_iterator child_begin() const { return reinterpret_cast<child_iterator>(&Paragraph); } @@ -701,8 +681,6 @@ public: return C->getCommentKind() == ParamCommandCommentKind; } - static bool classof(const ParamCommandComment *) { return true; } - enum PassDirection { In, Out, @@ -789,8 +767,6 @@ public: return C->getCommentKind() == TParamCommandCommentKind; } - static bool classof(const TParamCommandComment *) { return true; } - bool hasParamName() const { return getNumArgs() > 0; } @@ -840,8 +816,6 @@ public: return C->getCommentKind() == VerbatimBlockLineCommentKind; } - static bool classof(const VerbatimBlockLineComment *) { return true; } - child_iterator child_begin() const { return NULL; } child_iterator child_end() const { return NULL; } @@ -872,8 +846,6 @@ public: return C->getCommentKind() == VerbatimBlockCommentKind; } - static bool classof(const VerbatimBlockComment *) { return true; } - child_iterator child_begin() const { return reinterpret_cast<child_iterator>(Lines.begin()); } @@ -929,8 +901,6 @@ public: return C->getCommentKind() == VerbatimLineCommentKind; } - static bool classof(const VerbatimLineComment *) { return true; } - child_iterator child_begin() const { return NULL; } child_iterator child_end() const { return NULL; } @@ -1071,8 +1041,6 @@ public: return C->getCommentKind() == FullCommentKind; } - static bool classof(const FullComment *) { return true; } - child_iterator child_begin() const { return reinterpret_cast<child_iterator>(Blocks.begin()); } diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index ee9fefa5ba..835961f798 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -88,7 +88,6 @@ public: static TranslationUnitDecl *Create(ASTContext &C); // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TranslationUnitDecl *D) { return true; } static bool classofKind(Kind K) { return K == TranslationUnit; } static DeclContext *castToDeclContext(const TranslationUnitDecl *D) { return static_cast<DeclContext *>(const_cast<TranslationUnitDecl*>(D)); @@ -340,7 +339,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const NamedDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstNamed && K <= lastNamed; } }; @@ -386,7 +384,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const LabelDecl *D) { return true; } static bool classofKind(Kind K) { return K == Label; } }; @@ -512,7 +509,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const NamespaceDecl *D) { return true; } static bool classofKind(Kind K) { return K == Namespace; } static DeclContext *castToDeclContext(const NamespaceDecl *D) { return static_cast<DeclContext *>(const_cast<NamespaceDecl*>(D)); @@ -548,7 +544,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ValueDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstValue && K <= lastValue; } }; @@ -669,7 +664,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const DeclaratorDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstDeclarator && K <= lastDeclarator; } @@ -1211,7 +1205,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const VarDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstVar && K <= lastVar; } }; @@ -1232,7 +1225,6 @@ public: } // Implement isa/cast/dyncast/etc. - static bool classof(const ImplicitParamDecl *D) { return true; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == ImplicitParam; } }; @@ -1402,7 +1394,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ParmVarDecl *D) { return true; } static bool classofKind(Kind K) { return K == ParmVar; } private: @@ -2073,7 +2064,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const FunctionDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstFunction && K <= lastFunction; } @@ -2207,7 +2197,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const FieldDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstField && K <= lastField; } friend class ASTDeclReader; @@ -2246,7 +2235,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const EnumConstantDecl *D) { return true; } static bool classofKind(Kind K) { return K == EnumConstant; } friend class StmtIteratorBase; @@ -2290,7 +2278,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const IndirectFieldDecl *D) { return true; } static bool classofKind(Kind K) { return K == IndirectField; } friend class ASTDeclReader; }; @@ -2337,7 +2324,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TypeDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstType && K <= lastType; } }; @@ -2393,7 +2379,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TypedefNameDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstTypedefName && K <= lastTypedefName; } @@ -2416,7 +2401,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TypedefDecl *D) { return true; } static bool classofKind(Kind K) { return K == Typedef; } }; @@ -2437,7 +2421,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TypeAliasDecl *D) { return true; } static bool classofKind(Kind K) { return K == TypeAlias; } }; @@ -2669,7 +2652,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TagDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstTag && K <= lastTag; } static DeclContext *castToDeclContext(const TagDecl *D) { @@ -2899,7 +2881,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const EnumDecl *D) { return true; } static bool classofKind(Kind K) { return K == Enum; } friend class ASTDeclReader; @@ -3030,7 +3011,6 @@ public: virtual void completeDefinition(); static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const RecordDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstRecord && K <= lastRecord; } @@ -3066,7 +3046,6 @@ public: void setAsmString(StringLiteral *Asm) { AsmString = Asm; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const FileScopeAsmDecl *D) { return true; } static bool classofKind(Kind K) { return K == FileScopeAsm; } }; @@ -3212,7 +3191,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const BlockDecl *D) { return true; } static bool classofKind(Kind K) { return K == Block; } static DeclContext *castToDeclContext(const BlockDecl *D) { return static_cast<DeclContext *>(const_cast<BlockDecl*>(D)); @@ -3286,7 +3264,6 @@ public: virtual SourceRange getSourceRange() const LLVM_READONLY; static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ImportDecl *D) { return true; } static bool classofKind(Kind K) { return K == Import; } }; diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index ec4bfdd72b..55430681dd 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -844,8 +844,6 @@ public: IdentifierNamespace |= IDNS_NonMemberOperator; } - // Implement isa/cast/dyncast/etc. - static bool classof(const Decl *) { return true; } static bool classofKind(Kind K) { return true; } static DeclContext *castToDeclContext(const Decl *); static Decl *castFromDeclContext(const DeclContext *); @@ -1523,10 +1521,6 @@ public: static bool classof(const Decl *D); static bool classof(const DeclContext *D) { return true; } -#define DECL(NAME, BASE) -#define DECL_CONTEXT(NAME) \ - static bool classof(const NAME##Decl *D) { return true; } -#include "clang/AST/DeclNodes.inc" LLVM_ATTRIBUTE_USED void dumpDeclContext() const; diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index e06246c87d..9cb56e2b3c 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -145,7 +145,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const AccessSpecDecl *D) { return true; } static bool classofKind(Kind K) { return K == AccessSpec; } }; @@ -1514,10 +1513,6 @@ public: static bool classofKind(Kind K) { return K >= firstCXXRecord && K <= lastCXXRecord; } - static bool classof(const CXXRecordDecl *D) { return true; } - static bool classof(const ClassTemplateSpecializationDecl *D) { - return true; - } friend class ASTDeclReader; friend class ASTDeclWriter; @@ -1672,7 +1667,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const CXXMethodDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstCXXMethod && K <= lastCXXMethod; } @@ -2152,7 +2146,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const CXXConstructorDecl *D) { return true; } static bool classofKind(Kind K) { return K == CXXConstructor; } friend class ASTDeclReader; @@ -2224,7 +2217,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const CXXDestructorDecl *D) { return true; } static bool classofKind(Kind K) { return K == CXXDestructor; } friend class ASTDeclReader; @@ -2291,7 +2283,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const CXXConversionDecl *D) { return true; } static bool classofKind(Kind K) { return K == CXXConversion; } friend class ASTDeclReader; @@ -2361,7 +2352,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const LinkageSpecDecl *D) { return true; } static bool classofKind(Kind K) { return K == LinkageSpec; } static DeclContext *castToDeclContext(const LinkageSpecDecl *D) { return static_cast<DeclContext *>(const_cast<LinkageSpecDecl*>(D)); @@ -2465,7 +2455,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const UsingDirectiveDecl *D) { return true; } static bool classofKind(Kind K) { return K == UsingDirective; } // Friend for getUsingDirectiveName. @@ -2559,7 +2548,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const NamespaceAliasDecl *D) { return true; } static bool classofKind(Kind K) { return K == NamespaceAlias; } }; @@ -2630,7 +2618,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const UsingShadowDecl *D) { return true; } static bool classofKind(Kind K) { return K == Decl::UsingShadow; } friend class ASTDeclReader; @@ -2762,7 +2749,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const UsingDecl *D) { return true; } static bool classofKind(Kind K) { return K == Using; } friend class ASTDeclReader; @@ -2836,7 +2822,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const UnresolvedUsingValueDecl *D) { return true; } static bool classofKind(Kind K) { return K == UnresolvedUsingValue; } friend class ASTDeclReader; @@ -2902,7 +2887,6 @@ public: CreateDeserialized(ASTContext &C, unsigned ID); static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const UnresolvedUsingTypenameDecl *D) { return true; } static bool classofKind(Kind K) { return K == UnresolvedUsingTypename; } }; @@ -2942,7 +2926,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(StaticAssertDecl *D) { return true; } static bool classofKind(Kind K) { return K == StaticAssert; } friend class ASTDeclReader; diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h index b40144388a..37e45868b5 100644 --- a/include/clang/AST/DeclFriend.h +++ b/include/clang/AST/DeclFriend.h @@ -130,7 +130,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const FriendDecl *D) { return true; } static bool classofKind(Kind K) { return K == Decl::Friend; } friend class ASTDeclReader; diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 5ff0514ae5..99dd293cf9 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -460,7 +460,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCMethodDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCMethod; } static DeclContext *castToDeclContext(const ObjCMethodDecl *D) { return static_cast<DeclContext *>(const_cast<ObjCMethodDecl*>(D)); @@ -559,7 +558,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCContainerDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstObjCContainer && K <= lastObjCContainer; @@ -1014,7 +1012,6 @@ public: void setTypeForDecl(const Type *TD) const { TypeForDecl = TD; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCInterfaceDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCInterface; } friend class ASTReader; @@ -1087,7 +1084,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCIvarDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCIvar; } private: /// NextIvar - Next Ivar in the list of ivars declared in class; class's @@ -1120,7 +1116,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCAtDefsFieldDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCAtDefsField; } }; @@ -1300,7 +1295,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCProtocolDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCProtocol; } friend class ASTReader; @@ -1424,7 +1418,6 @@ public: SourceLocation getIvarRBraceLoc() const { return IvarRBraceLoc; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCCategoryDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCCategory; } friend class ASTDeclReader; @@ -1477,7 +1470,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCImplDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstObjCImpl && K <= lastObjCImpl; } @@ -1554,7 +1546,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCCategoryImplDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCCategoryImpl;} friend class ASTDeclReader; @@ -1698,7 +1689,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCImplementationDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCImplementation; } friend class ASTDeclReader; @@ -1730,7 +1720,6 @@ public: void setClassInterface(ObjCInterfaceDecl *D) { AliasedClass = D; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCCompatibleAliasDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCCompatibleAlias; } }; @@ -1913,7 +1902,6 @@ public: IdentifierInfo *propertyID); static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCPropertyDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCProperty; } }; @@ -2024,7 +2012,6 @@ public: } static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ObjCPropertyImplDecl *D) { return true; } static bool classofKind(Decl::Kind K) { return K == ObjCPropertyImpl; } friend class ASTDeclReader; diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 0daa60b220..8620116662 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -243,12 +243,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TemplateDecl *D) { return true; } - static bool classof(const RedeclarableTemplateDecl *D) { return true; } - static bool classof(const FunctionTemplateDecl *D) { return true; } - static bool classof(const ClassTemplateDecl *D) { return true; } - static bool classof(const TemplateTemplateParmDecl *D) { return true; } - static bool classof(const TypeAliasTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstTemplate && K <= lastTemplate; } @@ -688,10 +682,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const RedeclarableTemplateDecl *D) { return true; } - static bool classof(const FunctionTemplateDecl *D) { return true; } - static bool classof(const ClassTemplateDecl *D) { return true; } - static bool classof(const TypeAliasTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstRedeclarableTemplate && K <= lastRedeclarableTemplate; } @@ -837,7 +827,6 @@ public: // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const FunctionTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K == FunctionTemplate; } friend class ASTDeclReader; @@ -979,7 +968,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TemplateTypeParmDecl *D) { return true; } static bool classofKind(Kind K) { return K == TemplateTypeParm; } }; @@ -1160,7 +1148,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const NonTypeTemplateParmDecl *D) { return true; } static bool classofKind(Kind K) { return K == NonTypeTemplateParm; } }; @@ -1324,7 +1311,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TemplateTemplateParmDecl *D) { return true; } static bool classofKind(Kind K) { return K == TemplateTemplateParm; } friend class ASTDeclReader; @@ -1591,14 +1577,6 @@ public: K <= lastClassTemplateSpecialization; } - static bool classof(const ClassTemplateSpecializationDecl *) { - return true; - } - - static bool classof(const ClassTemplatePartialSpecializationDecl *) { - return true; - } - friend class ASTDeclReader; friend class ASTDeclWriter; }; @@ -1767,10 +1745,6 @@ public: return K == ClassTemplatePartialSpecialization; } - static bool classof(const ClassTemplatePartialSpecializationDecl *) { - return true; - } - friend class ASTDeclReader; friend class ASTDeclWriter; }; @@ -1972,7 +1946,6 @@ public: // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const ClassTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K == ClassTemplate; } friend class ASTDeclReader; @@ -2070,7 +2043,6 @@ public: // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == Decl::FriendTemplate; } - static bool classof(const FriendTemplateDecl *D) { return true; } friend class ASTDeclReader; }; @@ -2145,7 +2117,6 @@ public: // Implement isa/cast/dyncast support static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const TypeAliasTemplateDecl *D) { return true; } static bool classofKind(Kind K) { return K == TypeAliasTemplate; } friend class ASTDeclReader; @@ -2209,9 +2180,6 @@ public: static bool classofKind(Kind K) { return K == Decl::ClassScopeFunctionSpecialization; } - static bool classof(const ClassScopeFunctionSpecializationDecl *D) { - return true; - } friend class ASTDeclReader; friend class ASTDeclWriter; diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index f176041bf1..6171b12fe1 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -699,7 +699,6 @@ public: return T->getStmtClass() >= firstExprConstant && T->getStmtClass() <= lastExprConstant; } - static bool classof(const Expr *) { return true; } }; @@ -765,7 +764,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == OpaqueValueExprClass; } - static bool classof(const OpaqueValueExpr *) { return true; } }; /// \brief A reference to a declared variable, function, enum, etc. @@ -1062,7 +1060,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == DeclRefExprClass; } - static bool classof(const DeclRefExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1112,7 +1109,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == PredefinedExprClass; } - static bool classof(const PredefinedExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1199,7 +1195,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == IntegerLiteralClass; } - static bool classof(const IntegerLiteral *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1246,7 +1241,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CharacterLiteralClass; } - static bool classof(const CharacterLiteral *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1289,7 +1283,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == FloatingLiteralClass; } - static bool classof(const FloatingLiteral *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1320,7 +1313,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ImaginaryLiteralClass; } - static bool classof(const ImaginaryLiteral *) { return true; } // Iterators child_range children() { return child_range(&Val, &Val+1); } @@ -1482,7 +1474,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == StringLiteralClass; } - static bool classof(const StringLiteral *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1523,7 +1514,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ParenExprClass; } - static bool classof(const ParenExpr *) { return true; } // Iterators child_range children() { return child_range(&Val, &Val+1); } @@ -1634,7 +1624,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == UnaryOperatorClass; } - static bool classof(const UnaryOperator *) { return true; } // Iterators child_range children() { return child_range(&Val, &Val+1); } @@ -1833,8 +1822,6 @@ public: return T->getStmtClass() == OffsetOfExprClass; } - static bool classof(const OffsetOfExpr *) { return true; } - // Iterators child_range children() { Stmt **begin = @@ -1938,7 +1925,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == UnaryExprOrTypeTraitExprClass; } - static bool classof(const UnaryExprOrTypeTraitExpr *) { return true; } // Iterators child_range children(); @@ -2018,7 +2004,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ArraySubscriptExprClass; } - static bool classof(const ArraySubscriptExpr *) { return true; } // Iterators child_range children() { @@ -2154,7 +2139,6 @@ public: return T->getStmtClass() >= firstCallExprConstant && T->getStmtClass() <= lastCallExprConstant; } - static bool classof(const CallExpr *) { return true; } // Iterators child_range children() { @@ -2441,7 +2425,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == MemberExprClass; } - static bool classof(const MemberExpr *) { return true; } // Iterators child_range children() { return child_range(&Base, &Base+1); } @@ -2507,7 +2490,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CompoundLiteralExprClass; } - static bool classof(const CompoundLiteralExpr *) { return true; } // Iterators child_range children() { return child_range(&Init, &Init+1); } @@ -2598,7 +2580,6 @@ public: return T->getStmtClass() >= firstCastExprConstant && T->getStmtClass() <= lastCastExprConstant; } - static bool classof(const CastExpr *) { return true; } // Iterators child_range children() { return child_range(&Op, &Op+1); } @@ -2662,7 +2643,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ImplicitCastExprClass; } - static bool classof(const ImplicitCastExpr *) { return true; } }; inline Expr *Expr::IgnoreImpCasts() { @@ -2717,7 +2697,6 @@ public: return T->getStmtClass() >= firstExplicitCastExprConstant && T->getStmtClass() <= lastExplicitCastExprConstant; } - static bool classof(const ExplicitCastExpr *) { return true; } }; /// CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style @@ -2758,7 +2737,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CStyleCastExprClass; } - static bool classof(const CStyleCastExpr *) { return true; } }; /// \brief A builtin binary operation expression such as "x + y" or "x <= y". @@ -2901,7 +2879,6 @@ public: return S->getStmtClass() >= firstBinaryOperatorConstant && S->getStmtClass() <= lastBinaryOperatorConstant; } - static bool classof(const BinaryOperator *) { return true; } // Iterators child_range children() { @@ -2971,7 +2948,6 @@ public: QualType getComputationResultType() const { return ComputationResultType; } void setComputationResultType(QualType T) { ComputationResultType = T; } - static bool classof(const CompoundAssignOperator *) { return true; } static bool classof(const Stmt *S) { return S->getStmtClass() == CompoundAssignOperatorClass; } @@ -3017,7 +2993,6 @@ public: return T->getStmtClass() == ConditionalOperatorClass || T->getStmtClass() == BinaryConditionalOperatorClass; } - static bool classof(const AbstractConditionalOperator *) { return true; } }; /// ConditionalOperator - The ?: ternary operator. The GNU "missing @@ -3076,7 +3051,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ConditionalOperatorClass; } - static bool classof(const ConditionalOperator *) { return true; } // Iterators child_range children() { @@ -3158,7 +3132,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == BinaryConditionalOperatorClass; } - static bool classof(const BinaryConditionalOperator *) { return true; } // Iterators child_range children() { @@ -3214,7 +3187,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == AddrLabelExprClass; } - static bool classof(const AddrLabelExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -3258,7 +3230,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == StmtExprClass; } - static bool classof(const StmtExpr *) { return true; } // Iterators child_range children() { return child_range(&SubStmt, &SubStmt+1); } @@ -3301,7 +3272,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ShuffleVectorExprClass; } - static bool classof(const ShuffleVectorExpr *) { return true; } /// getNumSubExprs - Return the size of the SubExprs array. This includes the /// constant expression, the actual arguments passed in, and the function @@ -3396,7 +3366,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ChooseExprClass; } - static bool classof(const ChooseExpr *) { return true; } // Iterators child_range children() { @@ -3433,7 +3402,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == GNUNullExprClass; } - static bool classof(const GNUNullExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -3479,7 +3447,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == VAArgExprClass; } - static bool classof(const VAArgExpr *) { return true; } // Iterators child_range children() { return child_range(&Val, &Val+1); } @@ -3661,7 +3628,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == InitListExprClass; } - static bool classof(const InitListExpr *) { return true; } // Iterators child_range children() { @@ -3998,7 +3964,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == DesignatedInitExprClass; } - static bool classof(const DesignatedInitExpr *) { return true; } // Iterators child_range children() { @@ -4028,7 +3993,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ImplicitValueInitExprClass; } - static bool classof(const ImplicitValueInitExpr *) { return true; } SourceRange getSourceRange() const LLVM_READONLY { return SourceRange(); @@ -4074,7 +4038,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ParenListExprClass; } - static bool classof(const ParenListExpr *) { return true; } // Iterators child_range children() { @@ -4189,7 +4152,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == GenericSelectionExprClass; } - static bool classof(const GenericSelectionExpr *) { return true; } child_range children() { return child_range(SubExprs, SubExprs+END_EXPR+NumAssocs); @@ -4260,7 +4222,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ExtVectorElementExprClass; } - static bool classof(const ExtVectorElementExpr *) { return true; } // Iterators child_range children() { return child_range(&Base, &Base+1); } @@ -4302,7 +4263,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == BlockExprClass; } - static bool classof(const BlockExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -4349,7 +4309,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == AsTypeExprClass; } - static bool classof(const AsTypeExpr *) { return true; } // Iterators child_range children() { return child_range(&SrcExpr, &SrcExpr+1); } @@ -4486,7 +4445,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == PseudoObjectExprClass; } - static bool classof(const PseudoObjectExpr *) { return true; } }; /// AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, @@ -4576,7 +4534,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == AtomicExprClass; } - static bool classof(const AtomicExpr *) { return true; } // Iterators child_range children() { diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index ac02d3ba56..ff7fb8142a 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -88,7 +88,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXOperatorCallExprClass; } - static bool classof(const CXXOperatorCallExpr *) { return true; } // Set the FP contractability status of this operator. Only meaningful for // operations on floating point types. @@ -137,7 +136,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXMemberCallExprClass; } - static bool classof(const CXXMemberCallExpr *) { return true; } }; /// CUDAKernelCallExpr - Represents a call to a CUDA kernel function. @@ -165,7 +163,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CUDAKernelCallExprClass; } - static bool classof(const CUDAKernelCallExpr *) { return true; } }; /// CXXNamedCastExpr - Abstract class common to all of the C++ "named" @@ -217,7 +214,6 @@ public: return false; } } - static bool classof(const CXXNamedCastExpr *) { return true; } }; /// CXXStaticCastExpr - A C++ @c static_cast expression @@ -247,7 +243,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXStaticCastExprClass; } - static bool classof(const CXXStaticCastExpr *) { return true; } }; /// CXXDynamicCastExpr - A C++ @c dynamic_cast expression @@ -281,7 +276,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXDynamicCastExprClass; } - static bool classof(const CXXDynamicCastExpr *) { return true; } }; /// CXXReinterpretCastExpr - A C++ @c reinterpret_cast expression (C++ @@ -313,7 +307,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXReinterpretCastExprClass; } - static bool classof(const CXXReinterpretCastExpr *) { return true; } }; /// CXXConstCastExpr - A C++ @c const_cast expression (C++ [expr.const.cast]), @@ -341,7 +334,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXConstCastExprClass; } - static bool classof(const CXXConstCastExpr *) { return true; } }; /// UserDefinedLiteral - A call to a literal operator (C++11 [over.literal]) @@ -410,7 +402,6 @@ public: static bool classof(const Stmt *S) { return S->getStmtClass() == UserDefinedLiteralClass; } - static bool classof(const UserDefinedLiteral *) { return true; } friend class ASTStmtReader; friend class ASTStmtWriter; @@ -441,7 +432,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXBoolLiteralExprClass; } - static bool classof(const CXXBoolLiteralExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -467,7 +457,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXNullPtrLiteralExprClass; } - static bool classof(const CXXNullPtrLiteralExpr *) { return true; } child_range children() { return child_range(); } }; @@ -548,7 +537,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXTypeidExprClass; } - static bool classof(const CXXTypeidExpr *) { return true; } // Iterators child_range children() { @@ -623,7 +611,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXUuidofExprClass; } - static bool classof(const CXXUuidofExpr *) { return true; } /// Grabs __declspec(uuid()) off a type, or returns 0 if there is none. static UuidAttr *GetUuidAttrOfType(QualType QT); @@ -674,7 +661,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXThisExprClass; } - static bool classof(const CXXThisExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -725,7 +711,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXThrowExprClass; } - static bool classof(const CXXThrowExpr *) { return true; } // Iterators child_range children() { @@ -813,7 +798,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXDefaultArgExprClass; } - static bool classof(const CXXDefaultArgExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -890,7 +874,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXBindTemporaryExprClass; } - static bool classof(const CXXBindTemporaryExpr *) { return true; } // Iterators child_range children() { return child_range(&SubExpr, &SubExpr + 1); } @@ -1026,7 +1009,6 @@ public: return T->getStmtClass() == CXXConstructExprClass || T->getStmtClass() == CXXTemporaryObjectExprClass; } - static bool classof(const CXXConstructExpr *) { return true; } // Iterators child_range children() { @@ -1081,7 +1063,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXFunctionalCastExprClass; } - static bool classof(const CXXFunctionalCastExpr *) { return true; } }; /// @brief Represents a C++ functional cast expression that builds a @@ -1119,7 +1100,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXTemporaryObjectExprClass; } - static bool classof(const CXXTemporaryObjectExpr *) { return true; } friend class ASTStmtReader; }; @@ -1412,7 +1392,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == LambdaExprClass; } - static bool classof(const LambdaExpr *) { return true; } SourceRange getSourceRange() const LLVM_READONLY { return SourceRange(IntroducerRange.getBegin(), ClosingBrace); @@ -1460,7 +1439,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXScalarValueInitExprClass; } - static bool classof(const CXXScalarValueInitExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1647,7 +1625,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXNewExprClass; } - static bool classof(const CXXNewExpr *) { return true; } // Iterators child_range children() { @@ -1718,7 +1695,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXDeleteExprClass; } - static bool classof(const CXXDeleteExpr *) { return true; } // Iterators child_range children() { return child_range(&Argument, &Argument+1); } @@ -1907,7 +1883,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXPseudoDestructorExprClass; } - static bool classof(const CXXPseudoDestructorExpr *) { return true; } // Iterators child_range children() { return child_range(&Base, &Base + 1); } @@ -1963,7 +1938,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == UnaryTypeTraitExprClass; } - static bool classof(const UnaryTypeTraitExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -2035,7 +2009,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == BinaryTypeTraitExprClass; } - static bool classof(const BinaryTypeTraitExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -2129,7 +2102,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == TypeTraitExprClass; } - static bool classof(const TypeTraitExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -2204,7 +2176,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ArrayTypeTraitExprClass; } - static bool classof(const ArrayTypeTraitExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -2263,7 +2234,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ExpressionTraitExprClass; } - static bool classof(const ExpressionTraitExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -2450,7 +2420,6 @@ public: return T->getStmtClass() == UnresolvedLookupExprClass || T->getStmtClass() == UnresolvedMemberExprClass; } - static bool classof(const OverloadExpr *) { return true; } friend class ASTStmtReader; friend class ASTStmtWriter; @@ -2572,7 +2541,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == UnresolvedLookupExprClass; } - static bool classof(const UnresolvedLookupExpr *) { return true; } }; /// \brief A qualified reference to a name whose declaration cannot @@ -2723,7 +2691,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == DependentScopeDeclRefExprClass; } - static bool classof(const DependentScopeDeclRefExpr *) { return true; } child_range children() { return child_range(); } @@ -2796,7 +2763,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ExprWithCleanupsClass; } - static bool classof(const ExprWithCleanups *) { return true; } // Iterators child_range children() { return child_range(&SubExpr, &SubExpr + 1); } @@ -2909,7 +2875,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXUnresolvedConstructExprClass; } - static bool classof(const CXXUnresolvedConstructExpr *) { return true; } // Iterators child_range children() { @@ -3158,7 +3123,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXDependentScopeMemberExprClass; } - static bool classof(const CXXDependentScopeMemberExpr *) { return true; } // Iterators child_range children() { @@ -3292,7 +3256,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == UnresolvedMemberExprClass; } - static bool classof(const UnresolvedMemberExpr *) { return true; } // Iterators child_range children() { @@ -3336,7 +3299,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXNoexceptExprClass; } - static bool classof(const CXXNoexceptExpr *) { return true; } // Iterators child_range children() { return child_range(&Operand, &Operand + 1); } @@ -3413,7 +3375,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == PackExpansionExprClass; } - static bool classof(const PackExpansionExpr *) { return true; } // Iterators child_range children() { @@ -3519,7 +3480,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == SizeOfPackExprClass; } - static bool classof(const SizeOfPackExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -3564,9 +3524,6 @@ public: static bool classof(const Stmt *s) { return s->getStmtClass() == SubstNonTypeTemplateParmExprClass; } - static bool classof(const SubstNonTypeTemplateParmExpr *) { - return true; - } // Iterators child_range children() { return child_range(&Replacement, &Replacement+1); } @@ -3624,9 +3581,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == SubstNonTypeTemplateParmPackExprClass; } - static bool classof(const SubstNonTypeTemplateParmPackExpr *) { - return true; - } // Iterators child_range children() { return child_range(); } @@ -3694,7 +3648,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == FunctionParmPackExprClass; } - static bool classof(const FunctionParmPackExpr *) { return true; } child_range children() { return child_range(); } }; @@ -3753,9 +3706,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == MaterializeTemporaryExprClass; } - static bool classof(const MaterializeTemporaryExpr *) { - return true; - } // Iterators child_range children() { return child_range(&Temporary, &Temporary + 1); } diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h index 5c48dfebaa..748aaa1694 100644 --- a/include/clang/AST/ExprObjC.h +++ b/include/clang/AST/ExprObjC.h @@ -51,7 +51,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCStringLiteralClass; } - static bool classof(const ObjCStringLiteral *) { return true; } // Iterators child_range children() { return child_range(&String, &String+1); } @@ -81,7 +80,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCBoolLiteralExprClass; } - static bool classof(const ObjCBoolLiteralExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -121,7 +119,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCBoxedExprClass; } - static bool classof(const ObjCBoxedExpr *) { return true; } // Iterators child_range children() { return child_range(&SubExpr, &SubExpr+1); } @@ -156,7 +153,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCArrayLiteralClass; } - static bool classof(const ObjCArrayLiteral *) { return true; } /// \brief Retrieve elements of array of literals. Expr **getElements() { return reinterpret_cast<Expr **>(this + 1); } @@ -319,7 +315,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCDictionaryLiteralClass; } - static bool classof(const ObjCDictionaryLiteral *) { return true; } // Iterators child_range children() { @@ -372,7 +367,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCEncodeExprClass; } - static bool classof(const ObjCEncodeExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -409,7 +403,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCSelectorExprClass; } - static bool classof(const ObjCSelectorExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -447,7 +440,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCProtocolExprClass; } - static bool classof(const ObjCProtocolExpr *) { return true; } // Iterators child_range children() { return child_range(); } @@ -501,7 +493,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCIvarRefExprClass; } - static bool classof(const ObjCIvarRefExpr *) { return true; } // Iterators child_range children() { return child_range(&Base, &Base+1); } @@ -715,7 +706,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCPropertyRefExprClass; } - static bool classof(const ObjCPropertyRefExpr *) { return true; } // Iterators child_range children() { @@ -813,7 +803,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCSubscriptRefExprClass; } - static bool classof(const ObjCSubscriptRefExpr *) { return true; } Expr *getBaseExpr() const { return cast<Expr>(SubExprs[BASE]); } void setBaseExpr(Stmt *S) { SubExprs[BASE] = S; } @@ -1342,7 +1331,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCMessageExprClass; } - static bool classof(const ObjCMessageExpr *) { return true; } // Iterators child_range children(); @@ -1407,7 +1395,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCIsaExprClass; } - static bool classof(const ObjCIsaExpr *) { return true; } // Iterators child_range children() { return child_range(&Base, &Base+1); } @@ -1481,7 +1468,6 @@ public: static bool classof(const Stmt *s) { return s->getStmtClass() == ObjCIndirectCopyRestoreExprClass; } - static bool classof(const ObjCIndirectCopyRestoreExpr *) { return true; } }; /// \brief An Objective-C "bridged" cast expression, which casts between @@ -1530,8 +1516,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCBridgedCastExprClass; } - static bool classof(const ObjCBridgedCastExpr *) { return true; } - }; } // end namespace clang diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 042c513552..673b272181 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -392,9 +392,6 @@ public: const_cast<const Stmt*>(this)->stripLabelLikeStatements()); } - // Implement isa<T> support. - static bool classof(const Stmt *) { return true; } - /// hasImplicitControlFlow - Some statements (e.g. short circuited operations) /// contain implicit control-flow in the order their subexpressions /// are evaluated. This predicate returns true if this statement has @@ -480,7 +477,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == DeclStmtClass; } - static bool classof(const DeclStmt *) { return true; } // Iterators over subexpressions. child_range children() { @@ -535,7 +531,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == NullStmtClass; } - static bool classof(const NullStmt *) { return true; } child_range children() { return child_range(); } @@ -615,7 +610,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CompoundStmtClass; } - static bool classof(const CompoundStmt *) { return true; } // Iterators child_range children() { @@ -654,7 +648,6 @@ public: return T->getStmtClass() == CaseStmtClass || T->getStmtClass() == DefaultStmtClass; } - static bool classof(const SwitchCase *) { return true; } }; class CaseStmt : public SwitchCase { @@ -714,7 +707,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CaseStmtClass; } - static bool classof(const CaseStmt *) { return true; } // Iterators child_range children() { @@ -749,7 +741,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == DefaultStmtClass; } - static bool classof(const DefaultStmt *) { return true; } // Iterators child_range children() { return child_range(&SubStmt, &SubStmt+1); } @@ -788,7 +779,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == LabelStmtClass; } - static bool classof(const LabelStmt *) { return true; } }; @@ -837,7 +827,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == AttributedStmtClass; } - static bool classof(const AttributedStmt *) { return true; } }; @@ -906,7 +895,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == IfStmtClass; } - static bool classof(const IfStmt *) { return true; } }; /// SwitchStmt - This represents a 'switch' stmt. @@ -1000,7 +988,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == SwitchStmtClass; } - static bool classof(const SwitchStmt *) { return true; } }; @@ -1050,7 +1037,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == WhileStmtClass; } - static bool classof(const WhileStmt *) { return true; } // Iterators child_range children() { @@ -1099,7 +1085,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == DoStmtClass; } - static bool classof(const DoStmt *) { return true; } // Iterators child_range children() { @@ -1171,7 +1156,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ForStmtClass; } - static bool classof(const ForStmt *) { return true; } // Iterators child_range children() { @@ -1206,7 +1190,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == GotoStmtClass; } - static bool classof(const GotoStmt *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1251,7 +1234,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == IndirectGotoStmtClass; } - static bool classof(const IndirectGotoStmt *) { return true; } // Iterators child_range children() { return child_range(&Target, &Target+1); } @@ -1278,7 +1260,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ContinueStmtClass; } - static bool classof(const ContinueStmt *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1302,7 +1283,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == BreakStmtClass; } - static bool classof(const BreakStmt *) { return true; } // Iterators child_range children() { return child_range(); } @@ -1354,7 +1334,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ReturnStmtClass; } - static bool classof(const ReturnStmt *) { return true; } // Iterators child_range children() { @@ -1472,7 +1451,6 @@ public: return T->getStmtClass() == GCCAsmStmtClass || T->getStmtClass() == MSAsmStmtClass; } - static bool classof(const AsmStmt *) { return true; } // Input expr iterators. @@ -1665,7 +1643,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == GCCAsmStmtClass; } - static bool classof(const GCCAsmStmt *) { return true; } }; /// This represents a Microsoft inline-assembly statement extension. @@ -1746,7 +1723,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == MSAsmStmtClass; } - static bool classof(const MSAsmStmt *) { return true; } child_range children() { return child_range(&Exprs[0], &Exprs[0]); @@ -1795,8 +1771,6 @@ public: return T->getStmtClass() == SEHExceptStmtClass; } - static bool classof(SEHExceptStmt *) { return true; } - }; class SEHFinallyStmt : public Stmt { @@ -1832,8 +1806,6 @@ public: return T->getStmtClass() == SEHFinallyStmtClass; } - static bool classof(SEHFinallyStmt *) { return true; } - }; class SEHTryStmt : public Stmt { @@ -1885,8 +1857,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == SEHTryStmtClass; } - - static bool classof(SEHTryStmt *) { return true; } }; } // end namespace clang diff --git a/include/clang/AST/StmtCXX.h b/include/clang/AST/StmtCXX.h index a948722cc1..f4e4dcdd4a 100644 --- a/include/clang/AST/StmtCXX.h +++ b/include/clang/AST/StmtCXX.h @@ -50,7 +50,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXCatchStmtClass; } - static bool classof(const CXXCatchStmt *) { return true; } child_range children() { return child_range(&HandlerBlock, &HandlerBlock+1); } @@ -111,7 +110,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXTryStmtClass; } - static bool classof(const CXXTryStmt *) { return true; } child_range children() { return child_range(getStmts(), getStmts() + getNumHandlers() + 1); @@ -196,7 +194,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == CXXForRangeStmtClass; } - static bool classof(const CXXForRangeStmt *) { return true; } // Iterators child_range children() { @@ -286,8 +283,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == MSDependentExistsStmtClass; } - - static bool classof(MSDependentExistsStmt *) { return true; } }; } // end namespace clang diff --git a/include/clang/AST/StmtObjC.h b/include/clang/AST/StmtObjC.h index e7e1232989..d7a73a70bd 100644 --- a/include/clang/AST/StmtObjC.h +++ b/include/clang/AST/StmtObjC.h @@ -61,7 +61,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCForCollectionStmtClass; } - static bool classof(const ObjCForCollectionStmt *) { return true; } // Iterators child_range children() { @@ -112,7 +111,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCAtCatchStmtClass; } - static bool classof(const ObjCAtCatchStmt *) { return true; } child_range children() { return child_range(&Body, &Body + 1); } }; @@ -143,7 +141,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCAtFinallyStmtClass; } - static bool classof(const ObjCAtFinallyStmt *) { return true; } child_range children() { return child_range(&AtFinallyStmt, &AtFinallyStmt+1); @@ -244,7 +241,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCAtTryStmtClass; } - static bool classof(const ObjCAtTryStmt *) { return true; } child_range children() { return child_range(getStmts(), @@ -303,7 +299,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCAtSynchronizedStmtClass; } - static bool classof(const ObjCAtSynchronizedStmt *) { return true; } child_range children() { return child_range(&SubStmts[0], &SubStmts[0]+END_EXPR); @@ -339,7 +334,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCAtThrowStmtClass; } - static bool classof(const ObjCAtThrowStmt *) { return true; } child_range children() { return child_range(&Throw, &Throw+1); } }; @@ -371,7 +365,6 @@ public: static bool classof(const Stmt *T) { return T->getStmtClass() == ObjCAutoreleasePoolStmtClass; } - static bool classof(const ObjCAutoreleasePoolStmt *) { return true; } child_range children() { return child_range(&SubStmt, &SubStmt + 1); } }; diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 1950751ace..4936026f64 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -1789,8 +1789,6 @@ public: CanQualType getCanonicalTypeUnqualified() const; // in CanonicalType.h LLVM_ATTRIBUTE_USED void dump() const; - static bool classof(const Type *) { return true; } - friend class ASTReader; friend class ASTWriter; }; @@ -1890,7 +1888,6 @@ public: } static bool classof(const Type *T) { return T->getTypeClass() == Builtin; } - static bool classof(const BuiltinType *) { return true; } }; /// ComplexType - C99 6.2.5p11 - Complex values. This supports the C99 complex @@ -1921,7 +1918,6 @@ public: } static bool classof(const Type *T) { return T->getTypeClass() == Complex; } - static bool classof(const ComplexType *) { return true; } }; /// ParenType - Sugar for parentheses used when specifying types. @@ -1953,7 +1949,6 @@ public: } static bool classof(const Type *T) { return T->getTypeClass() == Paren; } - static bool classof(const ParenType *) { return true; } }; /// PointerType - C99 6.7.5.1 - Pointer Declarators. @@ -1985,7 +1980,6 @@ public: } static bool classof(const Type *T) { return T->getTypeClass() == Pointer; } - static bool classof(const PointerType *) { return true; } }; /// BlockPointerType - pointer to a block type. @@ -2021,7 +2015,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == BlockPointer; } - static bool classof(const BlockPointerType *) { return true; } }; /// ReferenceType - Base for LValueReferenceType and RValueReferenceType @@ -2069,7 +2062,6 @@ public: return T->getTypeClass() == LValueReference || T->getTypeClass() == RValueReference; } - static bool classof(const ReferenceType *) { return true; } }; /// LValueReferenceType - C++ [dcl.ref] - Lvalue reference @@ -2087,7 +2079,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == LValueReference; } - static bool classof(const LValueReferenceType *) { return true; } }; /// RValueReferenceType - C++0x [dcl.ref] - Rvalue reference @@ -2104,7 +2095,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == RValueReference; } - static bool classof(const RValueReferenceType *) { return true; } }; /// MemberPointerType - C++ 8.3.3 - Pointers to members @@ -2159,7 +2149,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == MemberPointer; } - static bool classof(const MemberPointerType *) { return true; } }; /// ArrayType - C99 6.7.5.2 - Array Declarators. @@ -2215,7 +2204,6 @@ public: T->getTypeClass() == IncompleteArray || T->getTypeClass() == DependentSizedArray; } - static bool classof(const ArrayType *) { return true; } }; /// ConstantArrayType - This class represents the canonical version of @@ -2267,7 +2255,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == ConstantArray; } - static bool classof(const ConstantArrayType *) { return true; } }; /// IncompleteArrayType - This class represents C arrays with an unspecified @@ -2287,7 +2274,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == IncompleteArray; } - static bool classof(const IncompleteArrayType *) { return true; } friend class StmtIteratorBase; @@ -2350,7 +2336,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == VariableArray; } - static bool classof(const VariableArrayType *) { return true; } friend class StmtIteratorBase; @@ -2407,7 +2392,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == DependentSizedArray; } - static bool classof(const DependentSizedArrayType *) { return true; } friend class StmtIteratorBase; @@ -2453,7 +2437,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == DependentSizedExtVector; } - static bool classof(const DependentSizedExtVectorType *) { return true; } void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, Context, getElementType(), getSizeExpr()); @@ -2519,7 +2502,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == Vector || T->getTypeClass() == ExtVector; } - static bool classof(const VectorType *) { return true; } }; /// ExtVectorType - Extended vector type. This type is created using @@ -2585,7 +2567,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == ExtVector; } - static bool classof(const ExtVectorType *) { return true; } }; /// FunctionType - C99 6.7.5.3 - Function Declarators. This is the common base @@ -2748,7 +2729,6 @@ public: return T->getTypeClass() == FunctionNoProto || T->getTypeClass() == FunctionProto; } - static bool classof(const FunctionType *) { return true; } }; /// FunctionNoProtoType - Represents a K&R-style 'int foo()' function, which has @@ -2780,7 +2760,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == FunctionNoProto; } - static bool classof(const FunctionNoProtoType *) { return true; } }; /// FunctionProtoType - Represents a prototype with argument type info, e.g. @@ -3035,7 +3014,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == FunctionProto; } - static bool classof(const FunctionProtoType *) { return true; } void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx); static void Profile(llvm::FoldingSetNodeID &ID, QualType Result, @@ -3066,7 +3044,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == UnresolvedUsing; } - static bool classof(const UnresolvedUsingType *) { return true; } void Profile(llvm::FoldingSetNodeID &ID) { return Profile(ID, Decl); @@ -3098,7 +3075,6 @@ public: QualType desugar() const; static bool classof(const Type *T) { return T->getTypeClass() == Typedef; } - static bool classof(const TypedefType *) { return true; } }; /// TypeOfExprType (GCC extension). @@ -3118,7 +3094,6 @@ public: bool isSugared() const; static bool classof(const Type *T) { return T->getTypeClass() == TypeOfExpr; } - static bool classof(const TypeOfExprType *) { return true; } }; /// \brief Internal representation of canonical, dependent @@ -3165,7 +3140,6 @@ public: bool isSugared() const { return true; } static bool classof(const Type *T) { return T->getTypeClass() == TypeOf; } - static bool classof(const TypeOfType *) { return true; } }; /// DecltypeType (C++0x) @@ -3187,7 +3161,6 @@ public: bool isSugared() const; static bool classof(const Type *T) { return T->getTypeClass() == Decltype; } - static bool classof(const DecltypeType *) { return true; } }; /// \brief Internal representation of canonical, dependent @@ -3240,7 +3213,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == UnaryTransform; } - static bool classof(const UnaryTransformType *) { return true; } }; class TagType : public Type { @@ -3263,7 +3235,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() >= TagFirst && T->getTypeClass() <= TagLast; } - static bool classof(const TagType *) { return true; } }; /// RecordType - This is a helper class that allows the use of isa/cast/dyncast @@ -3290,7 +3261,6 @@ public: QualType desugar() const { return QualType(this, 0); } static bool classof(const Type *T) { return T->getTypeClass() == Record; } - static bool classof(const RecordType *) { return true; } }; /// EnumType - This is a helper class that allows the use of isa/cast/dyncast @@ -3309,7 +3279,6 @@ public: QualType desugar() const { return QualType(this, 0); } static bool classof(const Type *T) { return T->getTypeClass() == Enum; } - static bool classof(const EnumType *) { return true; } }; /// AttributedType - An attributed type is a type to which a type @@ -3397,7 +3366,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == Attributed; } - static bool classof(const AttributedType *T) { return true; } }; class TemplateTypeParmType : public Type, public llvm::FoldingSetNode { @@ -3471,7 +3439,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == TemplateTypeParm; } - static bool classof(const TemplateTypeParmType *T) { return true; } }; /// \brief Represents the result of substituting a type for a template @@ -3522,7 +3489,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == SubstTemplateTypeParm; } - static bool classof(const SubstTemplateTypeParmType *T) { return true; } }; /// \brief Represents the result of substituting a set of types for a template @@ -3575,7 +3541,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == SubstTemplateTypeParmPack; } - static bool classof(const SubstTemplateTypeParmPackType *T) { return true; } }; /// \brief Represents a C++0x auto type. @@ -3618,7 +3583,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == Auto; } - static bool classof(const AutoType *T) { return true; } }; /// \brief Represents a type template specialization; the template @@ -3782,7 +3746,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == TemplateSpecialization; } - static bool classof(const TemplateSpecializationType *T) { return true; } }; /// \brief The injected class name of a C++ class template or class @@ -3845,7 +3808,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == InjectedClassName; } - static bool classof(const InjectedClassNameType *T) { return true; } }; /// \brief The kind of a tag type. @@ -3992,7 +3954,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == Elaborated; } - static bool classof(const ElaboratedType *T) { return true; } }; /// \brief Represents a qualified type name for which the type name is @@ -4056,7 +4017,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == DependentName; } - static bool classof(const DependentNameType *T) { return true; } }; /// DependentTemplateSpecializationType - Represents a template @@ -4127,9 +4087,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == DependentTemplateSpecialization; } - static bool classof(const DependentTemplateSpecializationType *T) { - return true; - } }; /// \brief Represents a pack expansion of types. @@ -4210,9 +4167,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == PackExpansion; } - static bool classof(const PackExpansionType *T) { - return true; - } }; /// ObjCObjectType - Represents a class type in Objective C. @@ -4323,7 +4277,6 @@ public: return T->getTypeClass() == ObjCObject || T->getTypeClass() == ObjCInterface; } - static bool classof(const ObjCObjectType *) { return true; } }; /// ObjCObjectTypeImpl - A class providing a concrete implementation @@ -4387,7 +4340,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == ObjCInterface; } - static bool classof(const ObjCInterfaceType *) { return true; } // Nonsense to "hide" certain members of ObjCObjectType within this // class. People asking for protocols on an ObjCInterfaceType are @@ -4537,7 +4489,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == ObjCObjectPointer; } - static bool classof(const ObjCObjectPointerType *) { return true; } }; class AtomicType : public Type, public llvm::FoldingSetNode { @@ -4568,7 +4519,6 @@ class AtomicType : public Type, public llvm::FoldingSetNode { static bool classof(const Type *T) { return T->getTypeClass() == Atomic; } - static bool classof(const AtomicType *) { return true; } }; /// A qualifier set is used to build a set of qualifiers. diff --git a/include/clang/AST/TypeLoc.h b/include/clang/AST/TypeLoc.h index 60cd3064e7..8a04bd8d5e 100644 --- a/include/clang/AST/TypeLoc.h +++ b/include/clang/AST/TypeLoc.h @@ -159,8 +159,6 @@ public: return !(LHS == RHS); } - static bool classof(const TypeLoc *TL) { return true; } - private: static void initializeImpl(ASTContext &Context, TypeLoc TL, SourceLocation Loc); @@ -192,7 +190,6 @@ public: static bool classof(const TypeLoc *TL) { return !TL->getType().hasLocalQualifiers(); } - static bool classof(const UnqualTypeLoc *TL) { return true; } }; /// \brief Wrapper of type source information for a type with @@ -237,7 +234,6 @@ public: static bool classof(const TypeLoc *TL) { return TL->getType().hasLocalQualifiers(); } - static bool classof(const QualifiedTypeLoc *TL) { return true; } }; inline UnqualTypeLoc TypeLoc::getUnqualifiedLoc() const { @@ -303,9 +299,6 @@ public: static bool classof(const UnqualTypeLoc *TL) { return Derived::classofType(TL->getTypePtr()); } - static bool classof(const Derived *TL) { - return true; - } TypeLoc getNextTypeLoc() const { return getNextTypeLoc(asDerived()->getInnerType()); @@ -380,9 +373,6 @@ public: static bool classof(const UnqualTypeLoc *TL) { return Derived::classofType(TL->getTypePtr()); } - static bool classof(const Derived *TL) { - return true; - } const TypeClass *getTypePtr() const { return cast<TypeClass>(Base::getTypePtr()); @@ -417,7 +407,6 @@ public: } static bool classof(const TypeLoc *TL); - static bool classof(const TypeSpecTypeLoc *TL) { return true; } }; diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h index 02b85304db..a2090eca72 100644 --- a/include/clang/Analysis/AnalysisContext.h +++ b/include/clang/Analysis/AnalysisContext.h @@ -239,8 +239,6 @@ public: virtual void Profile(llvm::FoldingSetNodeID &ID) = 0; - static bool classof(const LocationContext*) { return true; } - public: static void ProfileCommon(llvm::FoldingSetNodeID &ID, ContextKind ck, diff --git a/include/clang/Analysis/CFG.h b/include/clang/Analysis/CFG.h index 30a1db2f62..8cc5d814e8 100644 --- a/include/clang/Analysis/CFG.h +++ b/include/clang/Analysis/CFG.h @@ -88,8 +88,6 @@ public: return static_cast<const ElemTy*>(this); return 0; } - - static bool classof(const CFGElement *E) { return true; } }; class CFGStmt : public CFGElement { diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 081c29fa26..9479978043 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -140,8 +140,6 @@ public: return ID.ComputeHash(); } - static bool classof(const ProgramPoint*) { return true; } - bool operator==(const ProgramPoint & RHS) const { return Data1 == RHS.Data1 && Data2 == RHS.Data2 && diff --git a/include/clang/Driver/Action.h b/include/clang/Driver/Action.h index 6e317a0726..4057e48f69 100644 --- a/include/clang/Driver/Action.h +++ b/include/clang/Driver/Action.h @@ -90,8 +90,6 @@ public: iterator end() { return Inputs.end(); } const_iterator begin() const { return Inputs.begin(); } const_iterator end() const { return Inputs.end(); } - - static bool classof(const Action *) { return true; } }; class InputAction : public Action { @@ -105,7 +103,6 @@ public: static bool classof(const Action *A) { return A->getKind() == InputClass; } - static bool classof(const InputAction *) { return true; } }; class BindArchAction : public Action { @@ -122,7 +119,6 @@ public: static bool classof(const Action *A) { return A->getKind() == BindArchClass; } - static bool classof(const BindArchAction *) { return true; } }; class JobAction : public Action { @@ -136,7 +132,6 @@ public: return (A->getKind() >= JobClassFirst && A->getKind() <= JobClassLast); } - static bool classof(const JobAction *) { return true; } }; class PreprocessJobAction : public JobAction { @@ -147,7 +142,6 @@ public: static bool classof(const Action *A) { return A->getKind() == PreprocessJobClass; } - static bool classof(const PreprocessJobAction *) { return true; } }; class PrecompileJobAction : public JobAction { @@ -158,7 +152,6 @@ public: static bool classof(const Action *A) { return A->getKind() == PrecompileJobClass; } - static bool classof(const PrecompileJobAction *) { return true; } }; class AnalyzeJobAction : public JobAction { @@ -169,7 +162,6 @@ public: static bool classof(const Action *A) { return A->getKind() == AnalyzeJobClass; } - static bool classof(const AnalyzeJobAction *) { return true; } }; class MigrateJobAction : public JobAction { @@ -180,7 +172,6 @@ public: static bool classof(const Action *A) { return A->getKind() == MigrateJobClass; } - static bool classof(const MigrateJobAction *) { return true; } }; class CompileJobAction : public JobAction { @@ -191,7 +182,6 @@ public: static bool classof(const Action *A) { return A->getKind() == CompileJobClass; } - static bool classof(const CompileJobAction *) { return true; } }; class AssembleJobAction : public JobAction { @@ -202,7 +192,6 @@ public: static bool classof(const Action *A) { return A->getKind() == AssembleJobClass; } - static bool classof(const AssembleJobAction *) { return true; } }; class LinkJobAction : public JobAction { @@ -213,7 +202,6 @@ public: static bool classof(const Action *A) { return A->getKind() == LinkJobClass; } - static bool classof(const LinkJobAction *) { return true; } }; class LipoJobAction : public JobAction { @@ -224,7 +212,6 @@ public: static bool classof(const Action *A) { return A->getKind() == LipoJobClass; } - static bool classof(const LipoJobAction *) { return true; } }; class DsymutilJobAction : public JobAction { @@ -235,7 +222,6 @@ public: static bool classof(const Action *A) { return A->getKind() == DsymutilJobClass; } - static bool classof(const DsymutilJobAction *) { return true; } }; class VerifyJobAction : public JobAction { @@ -245,7 +231,6 @@ public: static bool classof(const Action *A) { return A->getKind() == VerifyJobClass; } - static bool classof(const VerifyJobAction *) { return true; } }; } // end namespace driver diff --git a/include/clang/Driver/Arg.h b/include/clang/Driver/Arg.h index 149f39a74d..70f0741520 100644 --- a/include/clang/Driver/Arg.h +++ b/include/clang/Driver/Arg.h @@ -115,8 +115,6 @@ namespace driver { /// when rendered as a input (e.g., Xlinker). void renderAsInput(const ArgList &Args, ArgStringList &Output) const; - static bool classof(const Arg *) { return true; } - void dump() const; /// \brief Return a formatted version of the argument and diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h index c94886dc26..84f5ee1917 100644 --- a/include/clang/Driver/Job.h +++ b/include/clang/Driver/Job.h @@ -39,8 +39,6 @@ public: /// addCommand - Append a command to the current job, which must be /// either a piped job or a job list. void addCommand(Command *C); - - static bool classof(const Job *) { return true; } }; /// Command - An executable path/name and argument vector to @@ -78,7 +76,6 @@ public: static bool classof(const Job *J) { return J->getKind() == CommandClass; } - static bool classof(const Command *) { return true; } }; /// JobList - A sequence of jobs to perform. @@ -113,7 +110,6 @@ public: static bool classof(const Job *J) { return J->getKind() == JobListClass; } - static bool classof(const JobList *) { return true; } }; } // end namespace driver diff --git a/include/clang/Frontend/MultiplexConsumer.h b/include/clang/Frontend/MultiplexConsumer.h index ffa7b4a9dc..539f2c5c4d 100644 --- a/include/clang/Frontend/MultiplexConsumer.h +++ b/include/clang/Frontend/MultiplexConsumer.h @@ -52,7 +52,6 @@ public: virtual void InitializeSema(Sema &S); virtual void ForgetSema(); - static bool classof(const MultiplexConsumer *) { return true; } private: std::vector<ASTConsumer*> Consumers; // Owns these. OwningPtr<MultiplexASTMutationListener> MutationListener; diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index f0cbc63df3..57e51b754e 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -94,9 +94,6 @@ namespace clang { /// entity. bool isInvalid() const { return Kind == InvalidKind; } - // Implement isa/cast/dyncast/etc. - static bool classof(const PreprocessedEntity *) { return true; } - // Only allow allocation of preprocessed entities using the allocator // in PreprocessingRecord or by doing a placement new. void* operator new(size_t bytes, PreprocessingRecord& PR, @@ -133,7 +130,6 @@ namespace clang { return PD->getKind() >= FirstPreprocessingDirective && PD->getKind() <= LastPreprocessingDirective; } - static bool classof(const PreprocessingDirective *) { return true; } }; /// \brief Record the location of a macro definition. @@ -155,7 +151,6 @@ namespace clang { static bool classof(const PreprocessedEntity *PE) { return PE->getKind() == MacroDefinitionKind; } - static bool classof(const MacroDefinition *) { return true; } }; /// \brief Records the location of a macro expansion. @@ -193,7 +188,6 @@ namespace clang { static bool classof(const PreprocessedEntity *PE) { return PE->getKind() == MacroExpansionKind; } - static bool classof(const MacroExpansion *) { return true; } }; /// \brief Record the location of an inclusion directive, such as an @@ -262,7 +256,6 @@ namespace clang { static bool classof(const PreprocessedEntity *PE) { return PE->getKind() == InclusionDirectiveKind; } - static bool classof(const InclusionDirective *) { return true; } }; /// \brief An abstract class that should be subclassed by any external source diff --git a/include/clang/Sema/ExternalSemaSource.h b/include/clang/Sema/ExternalSemaSource.h index 785bf6acd1..7a598498ff 100644 --- a/include/clang/Sema/ExternalSemaSource.h +++ b/include/clang/Sema/ExternalSemaSource.h @@ -175,7 +175,6 @@ public: static bool classof(const ExternalASTSource *Source) { return Source->SemaSource; } - static bool classof(const ExternalSemaSource *) { return true; } }; } // end namespace clang diff --git a/include/clang/Sema/LocInfoType.h b/include/clang/Sema/LocInfoType.h index 93cb8cbda4..63dfa72b8f 100644 --- a/include/clang/Sema/LocInfoType.h +++ b/include/clang/Sema/LocInfoType.h @@ -55,7 +55,6 @@ public: static bool classof(const Type *T) { return T->getTypeClass() == (TypeClass)LocInfo; } - static bool classof(const LocInfoType *) { return true; } }; } // end namespace clang diff --git a/include/clang/Sema/ScopeInfo.h b/include/clang/Sema/ScopeInfo.h index 7fbe07dc94..c0c907e834 100644 --- a/include/clang/Sema/ScopeInfo.h +++ b/include/clang/Sema/ScopeInfo.h @@ -308,8 +308,6 @@ public: /// \brief Clear out the information in this function scope, making it /// suitable for reuse. void Clear(); - - static bool classof(const FunctionScopeInfo *FSI) { return true; } }; class CapturingScopeInfo : public FunctionScopeInfo { @@ -463,7 +461,6 @@ public: static bool classof(const FunctionScopeInfo *FSI) { return FSI->Kind == SK_Block || FSI->Kind == SK_Lambda; } - static bool classof(const CapturingScopeInfo *BSI) { return true; } }; /// \brief Retains information about a block that is currently being parsed. @@ -491,7 +488,6 @@ public: static bool classof(const FunctionScopeInfo *FSI) { return FSI->Kind == SK_Block; } - static bool classof(const BlockScopeInfo *BSI) { return true; } }; class LambdaScopeInfo : public CapturingScopeInfo { @@ -547,8 +543,6 @@ public: static bool classof(const FunctionScopeInfo *FSI) { return FSI->Kind == SK_Lambda; } - static bool classof(const LambdaScopeInfo *BSI) { return true; } - }; FunctionScopeInfo::WeakObjectProfileTy::WeakObjectProfileTy() diff --git a/include/clang/Sema/SemaConsumer.h b/include/clang/Sema/SemaConsumer.h index 139cce8d73..676646afbd 100644 --- a/include/clang/Sema/SemaConsumer.h +++ b/include/clang/Sema/SemaConsumer.h @@ -42,7 +42,6 @@ namespace clang { static bool classof(const ASTConsumer *Consumer) { return Consumer->SemaConsumer; } - static bool classof(const SemaConsumer *) { return true; } }; } diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h index f397faab14..ce89449278 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -470,8 +470,6 @@ public: EmitBasicReport(DeclWithIssue, BugName, Category, BugStr, Loc, &R, 1); } - static bool classof(const BugReporter* R) { return true; } - void addCallPieceLocationContextPair(const PathDiagnosticCallPiece *C, const LocationContext *LC) { LocationContextMap[C] = LC; diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index 9003a22636..bb87f808b0 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -360,10 +360,6 @@ public: /// Return the SourceRanges associated with this PathDiagnosticPiece. ArrayRef<SourceRange> getRanges() const { return ranges; } - static inline bool classof(const PathDiagnosticPiece *P) { - return true; - } - virtual void Profile(llvm::FoldingSetNodeID &ID) const; }; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h index bd0511602c..35dbd9c19f 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h @@ -341,8 +341,6 @@ public: // For debugging purposes only void dump(raw_ostream &Out) const; LLVM_ATTRIBUTE_USED void dump() const; - - static bool classof(const CallEvent *) { return true; } }; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h index 3c9c33a645..34fbc3ca9e 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h @@ -174,8 +174,6 @@ public: template<typename RegionTy> const RegionTy* getAs() const; virtual bool isBoundable() const { return false; } - - static bool classof(const MemRegion*) { return true; } }; /// MemSpaceRegion - A memory region that represents a "memory space"; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index 4e1402fb59..c2134cf048 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -154,9 +154,6 @@ public: SymExpr::symbol_iterator symbol_end() const { return SymExpr::symbol_end(); } - - // Implement isa<T> support. - static inline bool classof(const SVal*) { return true; } }; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index 1b8fba262c..07807165b2 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -68,9 +68,6 @@ public: virtual QualType getType() const = 0; virtual void Profile(llvm::FoldingSetNodeID& profile) = 0; - // Implement isa<T> support. - static inline bool classof(const SymExpr*) { return true; } - /// \brief Iterator over symbols that the current symbol depends on. /// /// For SymbolData, it's the symbol itself; for expressions, it's the diff --git a/lib/Rewrite/Core/DeltaTree.cpp b/lib/Rewrite/Core/DeltaTree.cpp index dff621d206..46922772c5 100644 --- a/lib/Rewrite/Core/DeltaTree.cpp +++ b/lib/Rewrite/Core/DeltaTree.cpp @@ -113,8 +113,6 @@ namespace { void RecomputeFullDeltaLocally(); void Destroy(); - - //static inline bool classof(const DeltaTreeNode *) { return true; } }; } // end anonymous namespace @@ -149,7 +147,6 @@ namespace { return Children[i]; } - //static inline bool classof(const DeltaTreeInteriorNode *) { return true; } static inline bool classof(const DeltaTreeNode *N) { return !N->isLeaf(); } }; } diff --git a/lib/Rewrite/Core/RewriteRope.cpp b/lib/Rewrite/Core/RewriteRope.cpp index 3b085bbedc..fe7aa2d647 100644 --- a/lib/Rewrite/Core/RewriteRope.cpp +++ b/lib/Rewrite/Core/RewriteRope.cpp @@ -117,8 +117,6 @@ namespace { /// guaranteed that there is a split at Offset. void erase(unsigned Offset, unsigned NumBytes); - //static inline bool classof(const RopePieceBTreeNode *) { return true; } - }; } // end anonymous namespace @@ -221,7 +219,6 @@ namespace { /// guaranteed that there is a split at Offset. void erase(unsigned Offset, unsigned NumBytes); - //static inline bool classof(const RopePieceBTreeLeaf *) { return true; } static inline bool classof(const RopePieceBTreeNode *N) { return N->isLeaf(); } @@ -458,7 +455,6 @@ namespace { /// guaranteed that there is a split at Offset. void erase(unsigned Offset, unsigned NumBytes); - //static inline bool classof(const RopePieceBTreeInterior *) { return true; } static inline bool classof(const RopePieceBTreeNode *N) { return !N->isLeaf(); } diff --git a/tools/libclang/CursorVisitor.h b/tools/libclang/CursorVisitor.h index 404af94e2e..aa6b6189a4 100644 --- a/tools/libclang/CursorVisitor.h +++ b/tools/libclang/CursorVisitor.h @@ -46,7 +46,6 @@ protected: public: Kind getKind() const { return K; } const CXCursor &getParent() const { return parent; } - static bool classof(VisitorJob *VJ) { return true; } }; typedef SmallVector<VisitorJob, 10> VisitorWorkList; diff --git a/tools/libclang/IndexingContext.h b/tools/libclang/IndexingContext.h index e92894ae66..7671e6c2f1 100644 --- a/tools/libclang/IndexingContext.h +++ b/tools/libclang/IndexingContext.h @@ -100,8 +100,6 @@ struct DeclInfo : public CXIdxDeclInfo { numAttributes = 0; declAsContainer = semanticContainer = lexicalContainer = 0; } - - static bool classof(const DeclInfo *) { return true; } }; struct ObjCContainerDeclInfo : public DeclInfo { @@ -126,7 +124,6 @@ struct ObjCContainerDeclInfo : public DeclInfo { static bool classof(const DeclInfo *D) { return Info_ObjCContainer <= D->Kind && D->Kind <= Info_ObjCCategory; } - static bool classof(const ObjCContainerDeclInfo *D) { return true; } private: void init(bool isForwardRef, bool isImplementation) { @@ -152,7 +149,6 @@ struct ObjCInterfaceDeclInfo : public ObjCContainerDeclInfo { static bool classof(const DeclInfo *D) { return D->Kind == Info_ObjCInterface; } - static bool classof(const ObjCInterfaceDeclInfo *D) { return true; } }; struct ObjCProtocolDeclInfo : public ObjCContainerDeclInfo { @@ -167,7 +163,6 @@ struct ObjCProtocolDeclInfo : public ObjCContainerDeclInfo { static bool classof(const DeclInfo *D) { return D->Kind == Info_ObjCProtocol; } - static bool classof(const ObjCProtocolDeclInfo *D) { return true; } }; struct ObjCCategoryDeclInfo : public ObjCContainerDeclInfo { @@ -183,7 +178,6 @@ struct ObjCCategoryDeclInfo : public ObjCContainerDeclInfo { static bool classof(const DeclInfo *D) { return D->Kind == Info_ObjCCategory; } - static bool classof(const ObjCCategoryDeclInfo *D) { return true; } }; struct ObjCPropertyDeclInfo : public DeclInfo { @@ -197,7 +191,6 @@ struct ObjCPropertyDeclInfo : public DeclInfo { static bool classof(const DeclInfo *D) { return D->Kind == Info_ObjCProperty; } - static bool classof(const ObjCPropertyDeclInfo *D) { return true; } }; struct CXXClassDeclInfo : public DeclInfo { @@ -209,7 +202,6 @@ struct CXXClassDeclInfo : public DeclInfo { static bool classof(const DeclInfo *D) { return D->Kind == Info_CXXClass; } - static bool classof(const CXXClassDeclInfo *D) { return true; } }; struct AttrInfo : public CXIdxAttrInfo { @@ -221,8 +213,6 @@ struct AttrInfo : public CXIdxAttrInfo { loc = Loc; this->A = A; } - - static bool classof(const AttrInfo *) { return true; } }; struct IBOutletCollectionInfo : public AttrInfo { @@ -240,7 +230,6 @@ struct IBOutletCollectionInfo : public AttrInfo { static bool classof(const AttrInfo *A) { return A->kind == CXIdxAttr_IBOutletCollection; } - static bool classof(const IBOutletCollectionInfo *D) { return true; } }; class AttrListInfo { diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 6812ee7e08..521f6046cf 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -743,8 +743,6 @@ void EmitClangAttrClass(RecordKeeper &Records, raw_ostream &OS) { OS << " static bool classof(const Attr *A) { return A->getKind() == " << "attr::" << R.getName() << "; }\n"; - OS << " static bool classof(const " << R.getName() - << "Attr *) { return true; }\n"; bool LateParsed = R.getValueAsBit("LateParsed"); OS << " virtual bool isLateParsed() const { return " |