diff --git a/clang-tools-extra/clang-doc/JSONGenerator.cpp b/clang-tools-extra/clang-doc/JSONGenerator.cpp index 92a4117c4e534..5fc28406ee870 100644 --- a/clang-tools-extra/clang-doc/JSONGenerator.cpp +++ b/clang-tools-extra/clang-doc/JSONGenerator.cpp @@ -147,8 +147,10 @@ static Object serializeComment(const CommentInfo &I, Object &Description) { Child.insert({"ParamName", I.ParamName}); Child.insert({"Direction", I.Direction}); Child.insert({"Explicit", I.Explicit}); - Child.insert({"Children", ChildArr}); - Obj.insert({commentKindToString(I.Kind), ChildVal}); + auto TextCommentsArray = extractTextComments(CARef.front().getAsObject()); + Child.insert({"Children", TextCommentsArray}); + if (I.Kind == CommentKind::CK_ParamCommandComment) + insertComment(Description, ChildVal, "ParamComments"); return Obj; } diff --git a/clang-tools-extra/clang-doc/assets/comment-template.mustache b/clang-tools-extra/clang-doc/assets/comment-template.mustache index f2edb1b2eb9ac..d55a53194ee5c 100644 --- a/clang-tools-extra/clang-doc/assets/comment-template.mustache +++ b/clang-tools-extra/clang-doc/assets/comment-template.mustache @@ -24,6 +24,14 @@ {{>Comments}} {{/Children}} {{/ParagraphComment}} +{{#HasParamComments}} +
First integer.
+HTML-CALC:Second integer.
+HTML-CALC:First integer.
+HTML-CALC:Second integer.
+HTML-CALC:First integer.
+HTML-CALC:Second integer.
+HTML-CALC:Width of the rectangle.
+HTML-RECTANGLE:Height of the rectangle.
+HTML-RECTANGLE:Radius of the circle.
+HTML-CIRCLE:
Parameters
+HTML-CALC:First integer.
+HTML-CALC:Second integer.
+HTML-CALC: