From: Chris Lattner Date: Sun, 7 Oct 2007 07:04:41 +0000 (+0000) Subject: classof isn't right. This is causing assertion failures somehow now. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f47a7f8531668b0b84a7638b6d899c0fbfb483fa;p=clang classof isn't right. This is causing assertion failures somehow now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42720 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 5da94c0e4b..748abb2782 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -156,10 +156,11 @@ public: const ScopedDecl *getNextDeclarator() const { return NextDeclarator; } void setNextDeclarator(ScopedDecl *N) { NextDeclarator = N; } - // Implement isa/cast/dyncast/etc. - true for all ValueDecl's and TypeDecl's. + // Implement isa/cast/dyncast/etc - true for all ValueDecl's and TypeDecl's. static bool classof(const Decl *D) { return (D->getKind() >= Function && D->getKind() <= EnumConstant) || - (D->getKind() >= Typedef && D->getKind() <= Enum); + (D->getKind() >= Typedef && D->getKind() <= Enum) || + D->getKind() == ObjcProtocol || D->getKind() == ObjcInterface; } static bool classof(const ScopedDecl *D) { return true; } };