Skip to content

[clang-doc] Handle additional comment types in MustacheHTMLGenerator #142083

@ilovepi

Description

@ilovepi

The new mustache generator is missing support for several comment types. Comparing the MDGenerator cases to what's in Mustache shows that we don't currently handle most cases. Even running the mustache backend over the tests/clang-doc/enum.cpp test triggers an assertion from unhandled an HTMLStartTagComment. Its infeasible that we'd be able to run it over a large codebase like clang until we handle those comment types.

Looking at that implementation, Its also likely that we'd benefit from translating the CommentInfo.Kind field into a strongly typed enum. That would make handling the different comment "kinds" with checked switch statements, rather than the pattern of if/else.

The work here is fairly trivial, though getting it right with the requisite testing in place may take a few iterations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions