[all-commits] [llvm/llvm-project] d57040: Refactor clang doc comment structure (#142273)

Samarth Narang via All-commits all-commits at lists.llvm.org
Sat Jun 7 08:05:18 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5704097fcc2128bb8c97867e090543024a936d0
      https://github.com/llvm/llvm-project/commit/d5704097fcc2128bb8c97867e090543024a936d0
  Author: Samarth Narang <70980689+snarang181 at users.noreply.github.com>
  Date:   2025-06-07 (Sat, 07 Jun 2025)

  Changed paths:
    M clang-tools-extra/clang-doc/BitcodeReader.cpp
    M clang-tools-extra/clang-doc/BitcodeWriter.cpp
    M clang-tools-extra/clang-doc/HTMLGenerator.cpp
    M clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
    M clang-tools-extra/clang-doc/MDGenerator.cpp
    M clang-tools-extra/clang-doc/Representation.cpp
    M clang-tools-extra/clang-doc/Representation.h
    M clang-tools-extra/clang-doc/Serialize.cpp
    M clang-tools-extra/clang-doc/YAMLGenerator.cpp
    M clang-tools-extra/test/clang-doc/templates.cpp
    M clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
    M clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
    M clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
    M clang-tools-extra/unittests/clang-doc/MergeTest.cpp
    M clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp

  Log Message:
  -----------
  Refactor clang doc comment structure (#142273)

This patch refactors CommentKind handling in clang-doc by introducing a
strongly typed enum class for better type safety and clarity. It updates
all relevant places, including YAML traits and serialization, to work
with the new enum. Additionally, it enhances the Mustache-based HTML
generation by fully supporting all comment kinds, ensuring accurate
structured rendering of comment blocks. The changes simplify future
maintenance, improve robustness by eliminating unchecked defaults, and
ensure consistency between generators.

Fixes https://github.com/llvm/llvm-project/issues/142083



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list