[clang-tools-extra] [clang-doc] Flatten repeated @return and @brief comment arrays (PR #188739)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 3 18:08:17 PDT 2026


ilovepi wrote:

> I don't think this is the best way to do this. In `JSONGenerator` we already have a function called `extractTextComments` which is _supposed_ to handle the referenced issue but it didn't account for nested `TextComment` arrays. I think it would be much simpler to handle it there rather than this approach. Could be made more robust by passing the `CommentInfo` along with it to check if it is a return, etc instead of a bool.

Agreed. I had't really noticed that API, but that seems like a much more appropriate place to handle this. The current implementation seems to have a few other shortcomings as well, since its breaking other test output. 

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


More information about the cfe-commits mailing list