From beef1cb6ebfaea4542fb6d6686caae27787a75e0 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Mon, 16 Jul 2012 22:13:46 +0000 Subject: [PATCH] Fix BlockCommandComment::classof() to return true for objects of derived classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160323 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Comment.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h index 28e87bfacf..9087b9cd66 100644 --- a/include/clang/AST/Comment.h +++ b/include/clang/AST/Comment.h @@ -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; } -- 2.40.0