<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59073>59073</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Handle template specializations in clang-doc output
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          brettw
      </td>
    </tr>
</table>

<pre>
    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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VE1v3DYQ_TXSZRBB0n54ddDBsROkQIMWjXPIcUSOVkwoUuCHVffXd0jtbtwEDbDwesWZeW_ee9Rg5Uv_EJ0jE_QLCI3m_EZaATaGJQYP1hCMShMs5MCRsE5W8JuBMBF8ePr4O6CRMKP7Ju1q4EyGHAbrfNE-5Jrca3AmD-gIBvQkeWg-S4_Bjvn_bXTqWiclJlAb9MoPoWhPXtiFG8gHZc7pUKZTDLlXKu5m0BfQ9Ey6aLuqqB-L-n77-zZyGc2LxkDgFxIKtfoHg7LGw4TPlIf4RCYzGq2DOeqgFqbug4siREe-gqeJ_M8TBJptiqcFXcJg_eLMguaCLJC34CcbtQRjAwwEws6DMiTTUJVmRM8K3VA3NTwoczOgSjIwA_hyz6pv9gA-W8VlIc0YXiD6pE7a5vOnv_6rLKC_aV6xQq8FYjtvDoa8Y7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