]> granicus.if.org Git - clang/commitdiff
classof isn't right. This is causing assertion failures somehow now.
authorChris Lattner <sabre@nondot.org>
Sun, 7 Oct 2007 07:04:41 +0000 (07:04 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Oct 2007 07:04:41 +0000 (07:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42720 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h

index 5da94c0e4b8427b9a1a7396fbe561ae7493ee3b7..748abb2782fb07c073d0ef5c5316d3bffa9f5526 100644 (file)
@@ -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; }
 };