[all-commits] [llvm/llvm-project] 0f6dbb: [clang-doc] Add template support.

Brett Wilson via All-commits all-commits at lists.llvm.org
Wed Dec 7 09:48:33 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f6dbb5f164662c3e6a167a89e7a89f07c60e32b
      https://github.com/llvm/llvm-project/commit/0f6dbb5f164662c3e6a167a89e7a89f07c60e32b
  Author: Brett Wilson <brettw at gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M clang-tools-extra/clang-doc/BitcodeReader.cpp
    M clang-tools-extra/clang-doc/BitcodeWriter.cpp
    M clang-tools-extra/clang-doc/BitcodeWriter.h
    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/single-file-public.cpp
    M clang-tools-extra/test/clang-doc/single-file.cpp
    A clang-tools-extra/test/clang-doc/templates.cpp
    M clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
    M clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
    M clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp

  Log Message:
  -----------
  [clang-doc] Add template support.

Reads template information from the AST and adds template parameters and
specialization information to the corresponding clang-doc structures.

Add a "QualName" to the Reference struct which includes the full
qualified type name. The Reference object represents a link in the
HTML/MD generators so is based on the unqualified name. But this does
not encode C-V qualifiers or template information that decorate the
name. The new QualName member encodes all of this information and also
makes it easier for the generators or downsteam YAML consumers to
generate the full name (before they had to process the "Path").

In test code that was changed, remove made-up paths to built-in types
like "int". In addition to slightnly cleaning up the code, these types
do not have paths in real execution, and generating incorrect references
to nonexistant data may complicate future changes in the generators.

Differential Revision: https://reviews.llvm.org/D139154




More information about the All-commits mailing list