[clang-tools-extra] [clang-doc] Do not serialize empty text comments (PR #169087)

Erick Velez via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 24 10:08:24 PST 2025


================
@@ -100,8 +105,29 @@ static void insertComment(Object &Description, json::Value &Comment,
 
 static json::Value extractTextComments(Object *ParagraphComment) {
   if (!ParagraphComment)
-    return json::Object();
-  return *ParagraphComment->get("Children");
+    return nullptr;
----------------
evelez7 wrote:

`json::Value` has a constructor for `std::nullptr_t`, so this should work right?

https://github.com/llvm/llvm-project/pull/169087


More information about the cfe-commits mailing list