summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/AST/Comment.cpp3
-rw-r--r--clang/test/Sema/warn-documentation.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp
index f3f4d9bf16e..82dbed47f8a 100644
--- a/clang/lib/AST/Comment.cpp
+++ b/clang/lib/AST/Comment.cpp
@@ -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;
}
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp
index f12871856be..aec914a7cd0 100644
--- a/clang/test/Sema/warn-documentation.cpp
+++ b/clang/test/Sema/warn-documentation.cpp
@@ -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;
OpenPOWER on IntegriCloud