[clang-tools-extra] [Clang-doc] Display enum comments in HTML (PR #183085)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 08:50:10 PDT 2026
================
@@ -353,6 +354,24 @@ static void generateContext(const Info &I, Object &Obj) {
Obj["HasContexts"] = true;
}
+static void serializeDescription(llvm::ArrayRef<CommentInfo> Description, json::Object &Obj) {
----------------
ilovepi wrote:
Why not return the Object from this routine? at both call sites you're initializing an empty object and passing it in. It seems like you'd more naturally just create that object w/in this function and return it.
You could also fold the `Obj["Description"] = std::move(Description);` bits into this implementation. I don't have too strong opinion on that one. It'd make the API not really just a pure serialization, but 🤷 .
https://github.com/llvm/llvm-project/pull/183085
More information about the cfe-commits
mailing list