[cfe-commits] r160323 - /cfe/trunk/include/clang/AST/Comment.h

Dmitri Gribenko gribozavr at gmail.com
Mon Jul 16 15:13:46 PDT 2012


Author: gribozavr
Date: Mon Jul 16 17:13:46 2012
New Revision: 160323

URL: http://llvm.org/viewvc/llvm-project?rev=160323&view=rev
Log:
Fix BlockCommandComment::classof() to return true for objects of derived classes.

Modified:
    cfe/trunk/include/clang/AST/Comment.h

Modified: cfe/trunk/include/clang/AST/Comment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Comment.h?rev=160323&r1=160322&r2=160323&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Comment.h (original)
+++ cfe/trunk/include/clang/AST/Comment.h Mon Jul 16 17:13:46 2012
@@ -510,7 +510,8 @@
   }
 
   static bool classof(const Comment *C) {
-    return C->getCommentKind() == BlockCommandCommentKind;
+    return C->getCommentKind() >= FirstBlockCommandCommentConstant &&
+           C->getCommentKind() <= LastBlockCommandCommentConstant;
   }
 
   static bool classof(const BlockCommandComment *) { return true; }





More information about the cfe-commits mailing list