[clang-tools-extra] [Clang-doc] Display values and comments in MD (PR #183754)

Erick Velez via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 9 14:54:21 PDT 2026


================
@@ -68,11 +68,27 @@ static void writeSourceFileRef(const ClangDocContext &CDCtx, const Location &L,
   OS << "\n\n";
 }
 
-struct CommentState {
+/// Writer for writing comments to a table cell in MD.
+///
+/// The writer traverses the comments recursively and outputs the
+/// comments into a stream.
+/// The formatter inserts single/double line breaks to retain the comment
+/// structure.
+///
+/// Usage :
+/// Initialize an object with a llvm::raw_ostream to output into.
+/// Call the write(C) function with an array of Comments 'C'.
+class MDCommentWriter {
----------------
evelez7 wrote:

I think just a rename for this should be fine. Should probably just be called `TableCommentWriter`.

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


More information about the cfe-commits mailing list