r179204 - -fparse-all-comments: remove redundant check, as suggested by Fariborz Jahanian

Dmitri Gribenko gribozavr at gmail.com
Wed Apr 10 11:43:09 PDT 2013


Author: gribozavr
Date: Wed Apr 10 13:43:09 2013
New Revision: 179204

URL: http://llvm.org/viewvc/llvm-project?rev=179204&view=rev
Log:
-fparse-all-comments: remove redundant check, as suggested by Fariborz Jahanian

Modified:
    cfe/trunk/include/clang/AST/RawCommentList.h
    cfe/trunk/test/Index/parse-all-comments.c

Modified: cfe/trunk/include/clang/AST/RawCommentList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RawCommentList.h?rev=179204&r1=179203&r2=179204&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RawCommentList.h (original)
+++ cfe/trunk/include/clang/AST/RawCommentList.h Wed Apr 10 13:43:09 2013
@@ -89,7 +89,7 @@ public:
 
   /// Returns true if this comment any kind of a documentation comment.
   bool isDocumentation() const LLVM_READONLY {
-    return !isInvalid() && (!isOrdinary() || ParseAllComments);
+    return !isInvalid() && !isOrdinary();
   }
 
   /// Returns whether we are parsing all comments.

Modified: cfe/trunk/test/Index/parse-all-comments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/parse-all-comments.c?rev=179204&r1=179203&r2=179204&view=diff
==============================================================================
--- cfe/trunk/test/Index/parse-all-comments.c (original)
+++ cfe/trunk/test/Index/parse-all-comments.c Wed Apr 10 13:43:09 2013
@@ -15,6 +15,12 @@ void notdoxy3(void);
 /** Doxygen comment.  isdoxy4 IS_DOXYGEN_SINGLE */
 void isdoxy4(void);
 
+/*! Doxygen comment.  isdoxy5 IS_DOXYGEN_SINGLE */
+void isdoxy5(void);
+
+/// Doxygen comment.  isdoxy6 IS_DOXYGEN_SINGLE
+void isdoxy6(void);
+
 /* BLOCK_ORDINARY_COMMENT */
 // ORDINARY COMMENT
 /// This is a BCPL comment. IS_DOXYGEN_START
@@ -45,4 +51,6 @@ void multi_line_comment_plus_ordinary(in
 // CHECK: parse-all-comments.c:10:6: FunctionDecl=notdoxy2:{{.*}} notdoxy2 NOT_DOXYGEN
 // CHECK: parse-all-comments.c:13:6: FunctionDecl=notdoxy3:{{.*}} notdoxy3 NOT_DOXYGEN
 // CHECK: parse-all-comments.c:16:6: FunctionDecl=isdoxy4:{{.*}} isdoxy4 IS_DOXYGEN_SINGLE
-// CHECK: parse-all-comments.c:23:6: FunctionDecl=multi_line_comment_plus_ordinary:{{.*}} BLOCK_ORDINARY_COMMENT {{.*}} ORDINARY COMMENT {{.*}} IS_DOXYGEN_START {{.*}} IS_DOXYGEN_END
+// CHECK: parse-all-comments.c:19:6: FunctionDecl=isdoxy5:{{.*}} isdoxy5 IS_DOXYGEN_SINGLE
+// CHECK: parse-all-comments.c:22:6: FunctionDecl=isdoxy6:{{.*}} isdoxy6 IS_DOXYGEN_SINGLE
+// CHECK: parse-all-comments.c:29:6: FunctionDecl=multi_line_comment_plus_ordinary:{{.*}} BLOCK_ORDINARY_COMMENT {{.*}} ORDINARY COMMENT {{.*}} IS_DOXYGEN_START {{.*}} IS_DOXYGEN_END





More information about the cfe-commits mailing list