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) {
*/
void test_nocrash1(int);
+// We used to crash on this.
+// expected-warning@+2 {{empty paragraph passed to '\param' command}}
+// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
+/// \param\brief
+void test_nocrash2(int);
+