Comment parser: don't crash on a completely empty \param followed by a block
command


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160975 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/CommentParser.cpp b/lib/AST/CommentParser.cpp
index 607ace3..6d53567 100644
--- a/lib/AST/CommentParser.cpp
+++ b/lib/AST/CommentParser.cpp
@@ -318,9 +318,9 @@
   if (Tok.is(tok::command) && S.isBlockCommand(Tok.getCommandName())) {
     // Block command ahead.  We can't nest block commands, so pretend that this
     // command has an empty argument.
-    ParagraphComment *PC = S.actOnParagraphComment(
+    ParagraphComment *Paragraph = S.actOnParagraphComment(
                                 ArrayRef<InlineContentComment *>());
-    return S.actOnBlockCommandFinish(BC, PC);
+    return S.actOnBlockCommandFinish(IsParam ? PC : BC, Paragraph);
   }
 
   if (IsParam || NumArgs > 0) {