# GSoC 2025: Improving Core Clang-Doc Functionality

DevFeed: [GSoC 2025: Improving Core Clang-Doc Functionality](<https://devfeed.tech/articles/gsoc-2025-improving-core-clang-doc-functionality-43125.md>)

Original publisher: [Read original article](<https://blog.llvm.org/posts/2025-gsoc-clang-doc/>)

Author: Erick Velez (evelez7)

Published: 2025-09-22T00:00:00Z

Content type: article

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [clang](<https://devfeed.tech/topics/clang.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Markdown](<https://devfeed.tech/topics/markdown.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [format](<https://devfeed.tech/topics/format.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [YAML](<https://devfeed.tech/topics/yaml.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [2025](<https://devfeed.tech/tags/2025.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [clang-doc](<https://devfeed.tech/tags/clang-doc.md>), [clang-tools-extra](<https://devfeed.tech/tags/clang-tools-extra.md>), [codegen](<https://devfeed.tech/tags/codegen.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [gsoc](<https://devfeed.tech/tags/gsoc.md>), [html](<https://devfeed.tech/tags/html.md>), [json](<https://devfeed.tech/tags/json.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [markdown](<https://devfeed.tech/tags/markdown.md>), [yaml](<https://devfeed.tech/tags/yaml.md>)

## AI overview

A GSoC 2025 contributor describes planned improvements to Clang-Doc, including broader C++ and Doxygen support and Markdown output. The article also explains Clang-Doc's map-reduce architecture and the difficulty of maintaining separate backend implementations for each output format.

## Source excerpt

I was selected as a contributor for GSoC 2025 under the project "Improving Core Clang-Doc Functionality" for LLVM.My mentors for the project were Paul Kirth and Petr Hosek. Clang-Doc is a tool in clang-tools-extra that generates documentation from Clang's AST and can output Markdown, HTML, YAML, and JSON.The project started in 2018 but major development eventually slowed.Recently, there have been efforts to get it back on track. This year, the GSoC project idea had a simple premise: improve core functionality. The Project The project idea proposed three main areas of focus to improve documentation quality. C++ support Doxygen comments Markdown support First, not all C++ constructs were supported, like friends or concepts.Not supporting core C++ constructs in C++ documentation is not good.Second, it's important that Doxygen command support is robust and that we can support as many as possible.Lastly, having Markdown available to developers for documentation would be useful.Markdown provides the power of expression in an area that is technically dense.It can be used to highlight critical information and warnings. The Architecture Here's a quick overview on Clang-Doc's architecture, which follows a map-reduce pattern: Visit source declarations via Clang's ASTVisitor. Serialize relevant source information into an Info (Clang-Doc's main data entity). Write Infos into bitcode, reduce, and reread. Serialize Infos into the desired format with a target backend. The architecture seems straightforward at a glance, but Clang-Doc has critical flaws at step 4. The Bad Clang-Doc has support for many formats.That sounds great in principal, but the backend pipeline's execution made development extremely cumbersome. Unlike in LLVM, Clang-Doc doesn't have a framework like CodeGen that shares functionality across different targets.To document a class, every backend needs to independently implement logic to serialize the class into its target format.Each backend also has separate logic