]> granicus.if.org Git - clang/commitdiff
Fix ParagraphComment::isWhitespace(): a paragraph without a non-whitespace
authorDmitri Gribenko <gribozavr@gmail.com>
Thu, 19 Jul 2012 00:01:56 +0000 (00:01 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Thu, 19 Jul 2012 00:01:56 +0000 (00:01 +0000)
TextComment node was considered whitespace even if it contained other child
nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160474 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Comment.cpp
test/Sema/warn-documentation.cpp

index f3f4d9bf16eccf5ab806958b007b6c5bda4052cb..82dbed47f8a069780b2df80b5a5fe3dfb267b1f5 100644 (file)
@@ -116,7 +116,8 @@ bool ParagraphComment::isWhitespaceNoCache() const {
     if (const TextComment *TC = dyn_cast<TextComment>(*I)) {
       if (!TC->isWhitespace())
         return false;
-    }
+    } else
+      return false;
   }
   return true;
 }
index f12871856bea7b974e61ad6c8a0c24d8d97d07e7..aec914a7cd00d5fcf62dfa354169ed1e1321fb54 100644 (file)
@@ -104,6 +104,9 @@ int test_block_command4(int);
 /// \brief Aaa
 int test_block_command5(int);
 
+/// \brief \c Aaa
+int test_block_command6(int);
+
 // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
 /// \param a Blah blah.
 int test_param1;