[clang-tools-extra] [clang-doc] Do not serialize empty text comments (PR #169087)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 24 11:05:07 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;
----------------
ilovepi wrote:
I still think its better to return the `json::Value::Null` instead of relying on conversion. If nothing else I won't read this code in 6 months and wonder why we return `nullptr` instead of `json::Value` ;)
https://github.com/llvm/llvm-project/pull/169087
More information about the cfe-commits
mailing list