Comment parsing: fix crash on \tparam followed immediately by another block
command, for example: \tparam\brief.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/CommentParser.cpp b/lib/AST/CommentParser.cpp
index 8d7716a..eb1027a 100644
--- a/lib/AST/CommentParser.cpp
+++ b/lib/AST/CommentParser.cpp
@@ -334,8 +334,11 @@
ParagraphComment *Paragraph = S.actOnParagraphComment(
ArrayRef<InlineContentComment *>());
if (IsParam) {
- S.actOnBlockCommandFinish(PC, Paragraph);
+ S.actOnParamCommandFinish(PC, Paragraph);
return PC;
+ } else if (IsTParam) {
+ S.actOnTParamCommandFinish(TPC, Paragraph);
+ return TPC;
} else {
S.actOnBlockCommandFinish(BC, Paragraph);
return BC;