================
@@ -565,6 +565,22 @@ static void serializeInfo(const EnumValueInfo &I, Object 
&Obj) {
     Obj["ValueExpr"] = I.ValueExpr;
   else
     Obj["Value"] = I.Value;
+  if (!I.Description.empty()) {
+    json::Value CommentsArray = Array();
+    auto &CommentsArrayRef = *CommentsArray.getAsArray();
+    Object TempObj, ChildJson;
+    for (const auto &Child : I.Description) {
+      for (const auto &CI : Child.Children) {
+        ChildJson = serializeComment(*CI, TempObj);
+        if (!ChildJson.empty()) {
+          CommentsArrayRef.push_back(std::move(ChildJson));
+        }
+      }
+    }
+    if (!CommentsArrayRef.empty()) {
----------------
evelez7 wrote:

nit: same here for one line conditionals. I don't think the braces help much 
here.

https://github.com/llvm/llvm-project/pull/183085
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to