diff --git a/clang-tools-extra/clang-doc/JSONGenerator.cpp b/clang-tools-extra/clang-doc/JSONGenerator.cpp index 5fc28406ee870..cae1a686266c6 100644 --- a/clang-tools-extra/clang-doc/JSONGenerator.cpp +++ b/clang-tools-extra/clang-doc/JSONGenerator.cpp @@ -126,6 +126,8 @@ static Object serializeComment(const CommentInfo &I, Object &Description) { auto TextCommentsArray = extractTextComments(CARef.front().getAsObject()); if (I.Name == "brief") insertComment(Description, TextCommentsArray, "BriefComments"); + else if (I.Name == "return") + insertComment(Description, TextCommentsArray, "ReturnComments"); 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 d55a53194ee5c..89c48d26278c0 100644 --- a/clang-tools-extra/clang-doc/assets/comment-template.mustache +++ b/clang-tools-extra/clang-doc/assets/comment-template.mustache @@ -32,6 +32,14 @@ {{/ParamComments}} {{/HasParamComments}} +{{#HasReturnComments}} +
{{TextComment}}
+ {{/.}} + {{/ReturnComments}} +{{/HasReturnComments}} {{#BlockCommandComment}}double The perimeter of the shape.
HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: @@ -277,6 +281,8 @@ HTML-CALC:int The sum of a and b.
HTML-CALC: HTML-CALC: HTML-CALC: @@ -297,6 +303,8 @@ HTML-CALC: HTML-CALC:int The result of a - b.
HTML-CALC: HTML-CALC: HTML-CALC: @@ -334,6 +342,8 @@ HTML-CALC:int The product of a and b.
HTML-CALC: HTML-CALC: HTML-CALC: @@ -371,6 +381,9 @@ HTML-CALC:double The result of a / b.
+HTML-CALC: HTML-CALC: HTML-CALC: HTML-CALC: @@ -408,6 +421,8 @@ HTML-CALC:The result of a % b.
HTML-CALC: HTML-CALC: HTML-CALC: @@ -541,6 +556,8 @@ HTML-RECTANGLE: HTML-RECTANGLE:double The area of the rectangle.
HTML-RECTANGLE: HTML-RECTANGLE: HTML-RECTANGLE: @@ -561,6 +578,8 @@ HTML-RECTANGLE: HTML-RECTANGLE:double The perimeter of the rectangle.
HTML-RECTANGLE: HTML-RECTANGLE: HTML-RECTANGLE: @@ -686,6 +705,8 @@ HTML-CIRCLE: HTML-CIRCLE:double The area of the circle.
HTML-CIRCLE: HTML-CIRCLE: HTML-CIRCLE: @@ -706,6 +727,8 @@ HTML-CIRCLE: HTML-CIRCLE:double The perimeter of the circle.
HTML-CIRCLE: HTML-CIRCLE: HTML-CIRCLE:
Returns
+HTML-SHAPE:double The area of the shape.
HTML-SHAPE: