[llvm-branch-commits] [clang-tools-extra] [clang-doc] separate comments into categories (PR #149564)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 18 13:28:12 PDT 2025
================
@@ -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");
----------------
ilovepi wrote:
yeah, rewording would be helpful. thanks
https://github.com/llvm/llvm-project/pull/149564
More information about the llvm-branch-commits
mailing list