Skip to content

Handle template specializations in clang-doc output #59073

Open
@brettw

Description

@brettw

Currently clang-doc outputs one file per record. In the HTML and markdown generators, the file names are based on the name of the record, which is one word (scope nesting is done at the directory level).

But template specializations have the same name for multiple structures. These specializations can have separate documentation and so should not be combined. This causes multiple records in one file. (The YAML output avoids this by using the USR of the record as the name.)

In markdown these are output in arbitrary order which is undesirable. HTML needs more work because the output code currently writes the HTML heading and footer tags around the structure, and these are duplicated for each struct in the same file.

Most importantly, the HTML output should avoid having the extra <!DOCTYPE>, etc. tags in the middle of the file when there are name collisions. Second, ideally the template specializations would be presented in some structured way, with the main definition at the top followed by the specializations such that it's clear they're specializations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions