[clang-tools-extra] [Clang-doc] Display enum comments in HTML (PR #183085)

Samrudh Nelli via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 09:04:36 PDT 2026


================
@@ -26,6 +29,30 @@
                 {{^Value}}
                 <td>{{ValueExpr}}</td>
                 {{/Value}}
+                {{#HasComments}}
+                <td>{{#Description}}
+                        {{#BriefComments}}
+                            {{#.}}
+                            <p class="paragraph-container">{{TextComment}}</p>
+                            {{/.}}
+                        {{/BriefComments}}
+                        {{#ParagraphComments}}
+                        <p class="paragraph-container">
+                            {{#.}}
+                            {{TextComment}}<br>
+                            {{/.}}
+                        </p>
+                        {{/ParagraphComments}}
+                        {{#ParagraphComment}}
+                            <p>
+                            {{#Children}}
+                            {{TextComment}}
+                            {{/Children}}
+                            </p>
+                        {{/ParagraphComment}}
+                    {{/Description}}
+                    {{^Description}} -- {{/Description}}</td>
----------------
SamrudhNelli wrote:

We set HasComment when atleast one member has a comment.
There might arise a case where some members of an enum have comments and some do not. We insert '--' in that case.
I will add a test case for this..

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


More information about the cfe-commits mailing list