================ @@ -210,12 +229,17 @@ serializeCommonAttributes(const Info &I, json::Object &Obj, } if (!I.Description.empty()) { - json::Value DescArray = json::Array(); - auto &DescArrayRef = *DescArray.getAsArray(); - DescArrayRef.reserve(I.Description.size()); - for (const auto &Comment : I.Description) - DescArrayRef.push_back(serializeComment(Comment)); - Obj["Description"] = DescArray; + Object Description = Object(); + // Skip straight to the FullComment's children + auto &Comments = I.Description.at(0).Children; + for (const auto &CommentInfo : Comments) { + json::Value Comment = serializeComment(*CommentInfo, Description); + // Paragraph comments might not be children + if (auto *ParagraphComment = + Comment.getAsObject()->get("ParagraphComment")) + insertComment(Description, *ParagraphComment, "ParagraphComments"); ---------------- evelez7 wrote:
Not really, because all paragraph comments were previously handled. This is meant to signal that there are top level `ParagraphComment`s that can be returned from `serializeComment` that need to be manually inserted into `Description` with this modified scheme. They can't be added like brief comments now are because we can't be sure if the `ParagraphComment` is nested (the text of a brief command is a paragraph comment). So, if the returned comment is a `ParagraphComment`, then it must be a top-level, standalone comment without a command. Maybe this comment could use a revision. https://github.com/llvm/llvm-project/pull/149564 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits