summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/AST/CommentParser.cpp1
-rw-r--r--clang/test/Sema/warn-documentation.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/AST/CommentParser.cpp b/clang/lib/AST/CommentParser.cpp
index c1c04239f58..7f70b95e981 100644
--- a/clang/lib/AST/CommentParser.cpp
+++ b/clang/lib/AST/CommentParser.cpp
@@ -558,7 +558,6 @@ BlockContentComment *Parser::parseParagraphOrBlockCommand() {
case tok::verbatim_block_begin:
case tok::verbatim_line_name:
case tok::eof:
- assert(Content.size() != 0);
break; // Block content or EOF ahead, finish this parapgaph.
case tok::unknown_command:
diff --git a/clang/test/Sema/warn-documentation.cpp b/clang/test/Sema/warn-documentation.cpp
index 7ffaffc0784..5083f686338 100644
--- a/clang/test/Sema/warn-documentation.cpp
+++ b/clang/test/Sema/warn-documentation.cpp
@@ -1304,3 +1304,12 @@ typedef void (*VariadicFnType)(int a, ...);
* now should work too.
*/
using VariadicFnType2 = void (*)(int a, ...);
+
+// expected-warning@+2 {{empty paragraph passed to '@note' command}}
+/**
+@note
+\f$\texttt{mu}_{00}=\texttt{m}_{00}\f$, \f$\texttt{nu}_{00}=1\f$
+\f$\texttt{nu}_{10}=\texttt{mu}_{10}=\texttt{mu}_{01}=\texttt{mu}_{10}=0\f$
+ */
+class EmptyNoteNoCrash {
+};
OpenPOWER on IntegriCloud