15 Commits

Author SHA1 Message Date
Erick Velez
4f007041a8
[clang-doc] place HTML/JSON output inside their own directories (#150655)
Instead of just outputting everything into the designated root folder,
HTML and JSON output will be placed in html/ and json/ directories.
2025-08-14 12:21:40 -07:00
Erick Velez
4df8f72608
[clang-doc] add code comments to comment template (#150648)
Serializes Doxygen code comments in HTML templates. Modifies the
basic-project to add a code example.
2025-07-25 13:10:15 -07:00
Erick Velez
63c2b8a5b3
[clang-doc] add return comments to comment template (#150647)
Serialize return comments in HTML templates.
2025-07-25 12:32:04 -07:00
Erick Velez
8059482051
[clang-doc] add param comments to comment template (#150571)
Serializes parameter comments for all descriptions.
We do not support Doxygen's parameter checking, which warns if a documented parameter is not actually present.
2025-07-25 11:16:04 -07:00
Erick Velez
2ca8cf922f
[clang-doc] remove nesting of text comments inside paragraphs (#150451)
Text comments were unnecessarily nested inside Paragraph comments as a
Children array. If they're at the top level, we can also avoid more
nesting in templates.
2025-07-24 19:49:54 -07:00
Erick Velez
f361dd7400
[clang-doc] separate comments into categories (#149590)
Comment categories will allow better comment organization in HTML.
Before, comments would just be serialized in whatever order they were
written, so groups like params or notes wouldn't be in the same
sections.
2025-07-24 18:35:58 -07:00
Erick Velez
4db2f3ac89
[clang-doc] refactor JSON for better Mustache compatibility (#149588)
This patch contains changes for the JSON generator that will enable compatibility with Mustache templates, like booleans to check for the existence and bounds of arrays to avoid duplication.
2025-07-23 12:53:07 -07:00
Erick Velez
64c273a619
[clang-doc] fix ASan complaints from passing RepositoryURL as reference (#148923)
Passing RepositoryURL around as an optional reference triggered
stack-use-after-return complaints.
2025-07-16 09:03:44 -07:00
Erick Velez
94bb9e12ec
[clang-doc] Serialize record files with mangled name (#148021)
This patch changes JSON file serialization. Now, files are serialized
to a single directory instead of nesting them based on namespaces. The
global namespace retains the "index.json" name.

This solves the problem of class template specializations being serialized to the
same file as its base template. This is also planned as part of
future integration with the Mustache generator which will consume the JSON files.
2025-07-11 13:39:41 -07:00
Erick Velez
a68e4470c1
[clang-doc] serialize friends (#146165)
Parse friends into a new FriendInfo and serialize them in JSON. We keep track of the friend declaration's template and function information if applicable.
2025-06-30 12:43:52 -07:00
Erick Velez
066a14d4d4
[clang-doc] refactor JSONGenerator array usage (#145595)
Improve code reuse by calling serializeArray in more generic cases
instead of creating and reserving arrays on their own.
2025-06-26 10:11:02 -07:00
Erick Velez
b8ea65025d
[clang-doc] document global variables (#145070)
Visit and map VarDecls to document variables declared in namespace scope.
2025-06-24 11:36:31 -07:00
Erick Velez
8050a6e073
[clang-doc] add support for concepts (#144430)
Add support for documenting concepts. This handles concepts and constraints on function and class templates.

Atomic constraints are not considered yet. We don't order constraints based on their conjunctive or disjunctive properties.
2025-06-20 17:39:31 -07:00
Erick Velez
47918e7cb7
[clang-doc] add namespaces to JSON generator (#143209)
Emit namespaces to JSON. Also adds tests for namespaces and non-member constructs.
2025-06-10 10:35:53 -07:00
Erick Velez
1c3320cdde
[clang-doc] add a JSON generator (#142483)
Adds a JSON generator backend to emit mapped information as JSON. This will enable a better testing format for upcoming changes. It can also potentially serve to feed our other backend generators in the future, like Mustache which already serializes information to JSON before emitting as HTML.

This patch contains functionality to emit classes and provides most of the basis of the generator.
2025-06-10 08:39:42 -07:00