]> granicus.if.org Git - clang/commitdiff
Fix BlockCommandComment::classof() to return true for objects of derived classes.
authorDmitri Gribenko <gribozavr@gmail.com>
Mon, 16 Jul 2012 22:13:46 +0000 (22:13 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Mon, 16 Jul 2012 22:13:46 +0000 (22:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160323 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Comment.h

index 28e87bfacff8cd9c81fcf25396693e08f5a51c33..9087b9cd66bb16810987c0957aced1bfb5195d3b 100644 (file)
@@ -510,7 +510,8 @@ public:
   }
 
   static bool classof(const Comment *C) {
-    return C->getCommentKind() == BlockCommandCommentKind;
+    return C->getCommentKind() >= FirstBlockCommandCommentConstant &&
+           C->getCommentKind() <= LastBlockCommandCommentConstant;
   }
 
   static bool classof(const BlockCommandComment *) { return true; }