[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
@@ -60,6 +60,17 @@ HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: class Shape +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: Abstract base class for shapes. +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: Provides a common interface for different types of shapes. +HTML-SHAPE: +HTML-SHAPE: ilovepi wrote: Can you file a bug about this and CC me? you can tag it w/ clang-doc for now, even though its an issue w/ mustache lib. I can try to fix that maybe next week. https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
@@ -60,6 +60,17 @@ HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: class Shape +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: Abstract base class for shapes. +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: Provides a common interface for different types of shapes. +HTML-SHAPE: +HTML-SHAPE: evelez7 wrote: This only happens in the comment partial. I'm pretty sure it's something in the mustache library because all other templates handle their whitespace fine. I also haven't tested it but the comment partial is the only one that templates itself recursively, so that might have something to do with it. https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/ilovepi approved this pull request. LGTM, except the Q on formatting. Obviously doesn't need to be solved in this patch, though. https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
@@ -60,6 +60,17 @@ HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: HTML-SHAPE: class Shape +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: Abstract base class for shapes. +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: +HTML-SHAPE: Provides a common interface for different types of shapes. +HTML-SHAPE: +HTML-SHAPE: ilovepi wrote: Do we have any notion about why the format w/ the tags is so wonky? The template looks fine. Are we handling whitespace incorrectly in the mustache lib? or do we need to format the template differently to get these to line up correctly? https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/evelez7 updated
https://github.com/llvm/llvm-project/pull/149565
>From 4a076eab44ff05fec172a3c3a94332a19927d9d6 Mon Sep 17 00:00:00 2001
From: Erick Velez
Date: Fri, 18 Jul 2025 12:04:20 -0700
Subject: [PATCH] [clang-doc] enable comments in class templates
The Mustache basic project has comments in its headers but the comments were not
serialized. Now we serialize @brief and paragraph comments for classes
and add that output to the basic project test.
---
.../clang-doc/assets/class-template.mustache | 4 +-
.../assets/comment-template.mustache | 9 +++-
.../clang-doc/basic-project.mustache.test | 43 +++
3 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/clang-tools-extra/clang-doc/assets/class-template.mustache
b/clang-tools-extra/clang-doc/assets/class-template.mustache
index a4077323f29e2..b1a7470f7c33a 100644
--- a/clang-tools-extra/clang-doc/assets/class-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/class-template.mustache
@@ -128,11 +128,11 @@
{{TagType}} {{Name}}
-{{#RecordComments}}
+{{#Description}}
{{>Comments}}
-{{/RecordComments}}
+{{/Description}}
{{#HasPublicMembers}}
diff --git a/clang-tools-extra/clang-doc/assets/comment-template.mustache
b/clang-tools-extra/clang-doc/assets/comment-template.mustache
index 723ace7a0eed1..b793bad55cf6c 100644
--- a/clang-tools-extra/clang-doc/assets/comment-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/comment-template.mustache
@@ -5,11 +5,16 @@
This file defines templates for generating comments
}}
-{{#FullComment}}
+{{#BriefComments}}
{{#Children}}
{{>Comments}}
{{/Children}}
-{{/FullComment}}
+{{/BriefComments}}
+{{#ParagraphComments}}
+{{#Children}}
+{{>Comments}}
+{{/Children}}
+{{/ParagraphComments}}
{{#ParagraphComment}}
{{#Children}}
{{>Comments}}
diff --git a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
index 4dd6f4165f65e..4fb38e2b32fcb 100644
--- a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
+++ b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
@@ -60,6 +60,17 @@ HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE: class Shape
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Abstract base class for
shapes.
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Provides a common interface
for different types of shapes.
+HTML-SHAPE:
+HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
@@ -172,6 +183,16 @@ HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC: class
Calculator
+HTML-CALC:
+HTML-CALC: A simple calculator
class.
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC: Provides basic arithmetic
operations.
+HTML-CALC:
+HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC:
@@ -300,6 +321,17 @@ HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE: class
Rectangle
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Rectangle class
derived from Shape.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Represents a rectangle
with a given width and height.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/evelez7 updated
https://github.com/llvm/llvm-project/pull/149565
>From 4a076eab44ff05fec172a3c3a94332a19927d9d6 Mon Sep 17 00:00:00 2001
From: Erick Velez
Date: Fri, 18 Jul 2025 12:04:20 -0700
Subject: [PATCH] [clang-doc] enable comments in class templates
The Mustache basic project has comments in its headers but the comments were not
serialized. Now we serialize @brief and paragraph comments for classes
and add that output to the basic project test.
---
.../clang-doc/assets/class-template.mustache | 4 +-
.../assets/comment-template.mustache | 9 +++-
.../clang-doc/basic-project.mustache.test | 43 +++
3 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/clang-tools-extra/clang-doc/assets/class-template.mustache
b/clang-tools-extra/clang-doc/assets/class-template.mustache
index a4077323f29e2..b1a7470f7c33a 100644
--- a/clang-tools-extra/clang-doc/assets/class-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/class-template.mustache
@@ -128,11 +128,11 @@
{{TagType}} {{Name}}
-{{#RecordComments}}
+{{#Description}}
{{>Comments}}
-{{/RecordComments}}
+{{/Description}}
{{#HasPublicMembers}}
diff --git a/clang-tools-extra/clang-doc/assets/comment-template.mustache
b/clang-tools-extra/clang-doc/assets/comment-template.mustache
index 723ace7a0eed1..b793bad55cf6c 100644
--- a/clang-tools-extra/clang-doc/assets/comment-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/comment-template.mustache
@@ -5,11 +5,16 @@
This file defines templates for generating comments
}}
-{{#FullComment}}
+{{#BriefComments}}
{{#Children}}
{{>Comments}}
{{/Children}}
-{{/FullComment}}
+{{/BriefComments}}
+{{#ParagraphComments}}
+{{#Children}}
+{{>Comments}}
+{{/Children}}
+{{/ParagraphComments}}
{{#ParagraphComment}}
{{#Children}}
{{>Comments}}
diff --git a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
index 4dd6f4165f65e..4fb38e2b32fcb 100644
--- a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
+++ b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
@@ -60,6 +60,17 @@ HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE: class Shape
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Abstract base class for
shapes.
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Provides a common interface
for different types of shapes.
+HTML-SHAPE:
+HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
@@ -172,6 +183,16 @@ HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC: class
Calculator
+HTML-CALC:
+HTML-CALC: A simple calculator
class.
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC: Provides basic arithmetic
operations.
+HTML-CALC:
+HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC:
@@ -300,6 +321,17 @@ HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE: class
Rectangle
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Rectangle class
derived from Shape.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Represents a rectangle
with a given width and height.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
Author: Erick Velez (evelez7)
Changes
The Mustache basic project has comments in its headers but the comments were not
serialized. Now we serialize @brief and paragraph comments for classes
and add that output to the basic project test.
---
Full diff: https://github.com/llvm/llvm-project/pull/149565.diff
3 Files Affected:
- (modified) clang-tools-extra/clang-doc/assets/class-template.mustache (+2-2)
- (modified) clang-tools-extra/clang-doc/assets/comment-template.mustache
(+7-2)
- (modified) clang-tools-extra/test/clang-doc/basic-project.mustache.test (+43)
``diff
diff --git a/clang-tools-extra/clang-doc/assets/class-template.mustache
b/clang-tools-extra/clang-doc/assets/class-template.mustache
index a4077323f29e2..b1a7470f7c33a 100644
--- a/clang-tools-extra/clang-doc/assets/class-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/class-template.mustache
@@ -128,11 +128,11 @@
{{TagType}} {{Name}}
-{{#RecordComments}}
+{{#Description}}
{{>Comments}}
-{{/RecordComments}}
+{{/Description}}
{{#HasPublicMembers}}
diff --git a/clang-tools-extra/clang-doc/assets/comment-template.mustache
b/clang-tools-extra/clang-doc/assets/comment-template.mustache
index 723ace7a0eed1..b793bad55cf6c 100644
--- a/clang-tools-extra/clang-doc/assets/comment-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/comment-template.mustache
@@ -5,11 +5,16 @@
This file defines templates for generating comments
}}
-{{#FullComment}}
+{{#BriefComments}}
{{#Children}}
{{>Comments}}
{{/Children}}
-{{/FullComment}}
+{{/BriefComments}}
+{{#ParagraphComments}}
+{{#Children}}
+{{>Comments}}
+{{/Children}}
+{{/ParagraphComments}}
{{#ParagraphComment}}
{{#Children}}
{{>Comments}}
diff --git a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
index 4dd6f4165f65e..4fb38e2b32fcb 100644
--- a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
+++ b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
@@ -60,6 +60,17 @@ HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE: class Shape
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Abstract base class for
shapes.
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Provides a common interface
for different types of shapes.
+HTML-SHAPE:
+HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
@@ -172,6 +183,16 @@ HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC: class
Calculator
+HTML-CALC:
+HTML-CALC: A simple calculator
class.
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC: Provides basic arithmetic
operations.
+HTML-CALC:
+HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC:
@@ -300,6 +321,17 @@ HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE: class
Rectangle
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Rectangle class
derived from Shape.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Represents a rectangle
with a given width and height.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
@@ -395,6 +427,17 @@ HTML-CIRCLE:
HTML-CIRCLE:
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/evelez7 ready_for_review https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
evelez7 wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/149565?utm_source=stack-comment-downstack-mergeability-warning"; > >on Graphite. > https://graphite.dev/docs/merge-pull-requests";>Learn more * **#149565** https://app.graphite.dev/github/pr/llvm/llvm-project/149565?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/149565?utm_source=stack-comment-view-in-graphite"; target="_blank">(View in Graphite) * **#149564** https://app.graphite.dev/github/pr/llvm/llvm-project/149564?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#149006** https://app.graphite.dev/github/pr/llvm/llvm-project/149006?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#148923** https://app.graphite.dev/github/pr/llvm/llvm-project/148923?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * `main` This stack of pull requests is managed by https://graphite.dev?utm-source=stack-comment";>Graphite. Learn more about https://stacking.dev/?utm_source=stack-comment";>stacking. https://github.com/llvm/llvm-project/pull/149565 ___ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] enable comments in class templates (PR #149565)
https://github.com/evelez7 created
https://github.com/llvm/llvm-project/pull/149565
The Mustache basic project has comments in its headers but the comments were not
serialized. Now we serialize @brief and paragraph comments for classes
and add that output to the basic project test.
>From 5c0f49388a7bf1e4e783b897aa1b6a6e8c9553a2 Mon Sep 17 00:00:00 2001
From: Erick Velez
Date: Fri, 18 Jul 2025 12:04:20 -0700
Subject: [PATCH] [clang-doc] enable comments in class templates
The Mustache basic project has comments in its headers but the comments were not
serialized. Now we serialize @brief and paragraph comments for classes
and add that output to the basic project test.
---
.../clang-doc/assets/class-template.mustache | 4 +-
.../assets/comment-template.mustache | 9 +++-
.../clang-doc/basic-project.mustache.test | 43 +++
3 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/clang-tools-extra/clang-doc/assets/class-template.mustache
b/clang-tools-extra/clang-doc/assets/class-template.mustache
index a4077323f29e2..b1a7470f7c33a 100644
--- a/clang-tools-extra/clang-doc/assets/class-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/class-template.mustache
@@ -128,11 +128,11 @@
{{TagType}} {{Name}}
-{{#RecordComments}}
+{{#Description}}
{{>Comments}}
-{{/RecordComments}}
+{{/Description}}
{{#HasPublicMembers}}
diff --git a/clang-tools-extra/clang-doc/assets/comment-template.mustache
b/clang-tools-extra/clang-doc/assets/comment-template.mustache
index 723ace7a0eed1..b793bad55cf6c 100644
--- a/clang-tools-extra/clang-doc/assets/comment-template.mustache
+++ b/clang-tools-extra/clang-doc/assets/comment-template.mustache
@@ -5,11 +5,16 @@
This file defines templates for generating comments
}}
-{{#FullComment}}
+{{#BriefComments}}
{{#Children}}
{{>Comments}}
{{/Children}}
-{{/FullComment}}
+{{/BriefComments}}
+{{#ParagraphComments}}
+{{#Children}}
+{{>Comments}}
+{{/Children}}
+{{/ParagraphComments}}
{{#ParagraphComment}}
{{#Children}}
{{>Comments}}
diff --git a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
index 4dd6f4165f65e..4fb38e2b32fcb 100644
--- a/clang-tools-extra/test/clang-doc/basic-project.mustache.test
+++ b/clang-tools-extra/test/clang-doc/basic-project.mustache.test
@@ -60,6 +60,17 @@ HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE: class Shape
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Abstract base class for
shapes.
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE:
+HTML-SHAPE: Provides a common interface
for different types of shapes.
+HTML-SHAPE:
+HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
HTML-SHAPE:
@@ -172,6 +183,16 @@ HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC: class
Calculator
+HTML-CALC:
+HTML-CALC: A simple calculator
class.
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC:
+HTML-CALC: Provides basic arithmetic
operations.
+HTML-CALC:
+HTML-CALC:
HTML-CALC:
HTML-CALC:
HTML-CALC:
@@ -300,6 +321,17 @@ HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE:
HTML-RECTANGLE: class
Rectangle
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Rectangle class
derived from Shape.
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE:
+HTML-RECTANGLE: Represents a rectangle
with a given width and height.
+H
