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

    <tr>
        <th>Summary</th>
        <td>
            potentially incorrect Emacs marker in headers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    According to https://llvm.org/docs/CodingStandards.html#file-headers the way to tell Emacs that a file is C++ is `-*- C++ -*-`.

But while implementing and testing support for this I ran into a few files which appears to have mistakes in that. Those markers are looking like this:
```
-*- C++ --*-
-*- C++ ---*-
-*- C++ ------*-
-*- C++ -------*-
-*- C++ --------*-
-*- C++ ---------*-
-*- C++ ----------*-
-*- C++/-*-
```

Since it is really hard to find a proper specification for this I cannot tell if these would actually be valid. But since no other files in the `/usr/include` of my distro have such markers I assume they are wrong.

Here is the list of affected files.
```
/usr/include/clang/Analysis/Analyses/LiveVariables.h
/usr/include/clang/Analysis/Analyses/ReachableCode.h
/usr/include/clang/Analysis/Analyses/ThreadSafetyLogical.h
/usr/include/clang/Tooling/AllTUsExecution.h
/usr/include/clang/Tooling/Execution.h
/usr/include/clang/Tooling/StandaloneExecution.h
/usr/include/clang/Tooling/Syntax/Mutations.h
/usr/include/llvm/Analysis/InlineAdvisor.h
/usr/include/llvm/Analysis/InlineOrder.h
/usr/include/llvm/Analysis/ReplayInlineAdvisor.h
/usr/include/llvm/BinaryFormat/DXContainer.h
/usr/include/llvm/BinaryFormat/XCOFF.h
/usr/include/llvm/MC/MCDXContainerWriter.h
/usr/include/llvm/Remarks/RemarkFormat.h
/usr/include/llvm/Remarks/Remark.h
/usr/include/llvm/Remarks/RemarkLinker.h
/usr/include/llvm/Remarks/RemarkParser.h
/usr/include/llvm/Remarks/RemarkStringTable.h
/usr/include/llvm/Transforms/Utils/MemoryOpRemark.h
```

While at it, it might also make sense to check if there are files which are completely lacking the marker.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVk1v4zgP_jXKhWjgyGk-Dj6k6RhvgRZ90WZ25spIdKyNLBmSnIz__UJyttMW3UkbIHBkUw8fUqRIovdqZ4gKdn3Drm9H2IXauqJSjo54oNHWyr5YCWGdVGYHwUIdQutZvmK8ZLzU-tCMrdsxXkorPOPl2sadzwGNRCf9uA6NZjyvlKarmlCS8xBqgiP2UV0greFbgyJ-xQAIcScoD2vGbxi_iUs2y64YX129fEtvbJaNWXbLstXwvOkCHOuEblpNDZkQbUYjIZBPa9-1rXUBKusg1MrDHTg0oEywkZmOid1HNaIGbFvCaK6FGg8EjfIB9-RBmWTsGDa19QQNun10Cx2BtnYfmbTaU6KIRzUYOctOv_T6zqHBow8lfxKdlZ4Tn5Wf3_BfOxgvX4neuT88n5URBCrEIDtCrXuo0cl44pUyEhBaZ1ty4FsSqlICg7LmdfgEGmPDkEaqipnlCY620xJQhC6p3BIcUCs5hpgiPnEaCzbU5E4BTxGlmGiMl513jJfKCN1JYrMMbAVND1L54E6p4DtRv8T9DtD7ronxpj5lwdFZs3uTnP8jl7I6smjlQ9SJVUUikBxsGH98Tu_N4aXQaOKFWxnUvVf-ZUlxea8O9Bc6hduos75QyxOhqKOKtZV0sZZN7QjlM1YU-nu7UwL1J3RtrNVq0Kr15rv_9otEF-P-JexlqKFuaWvoQnxvAv5ivHzoQsrVP4UgFs-3Z3dntDK0kgflrbsA-egkfQ33RK3G_ou8N8qg60vrGgyMl7c_19YEVOYz3O-wP9ePZXke9bBOj1dMP5wKn-F7onhN_ctqYP467uuIe2X2l1j4f3T-EtxzcMrsNvHWngdvHBpfWddE_PegdPx_oMa6_rF95_FHlftHarQYQAXG17GEN2pXB0DtLTS4J_BkPMVKLmoS-1NxdpTq45su6wiEjR07kO5Bo0gNNBbKocCOR7LI5TJf4oiKyXySLxeT5SIf1cVkIsQ2z-cLmk7nsyVlnCqaC0mTXIpskY9UwTM-zaZ8OllkM87Hi7nMF1k2XcxnUyI5Z9OMGlR6_O8gM1Led1QslsvZ9UjjlrRPsxHnho6QhIzzOCq5ImKutt3Os2kWa7r_rSWooKlobYhDSGpCygjrHIlwmnYG32LjOU1Fo87p4u10tVOh7rZjYZvfgUukrbN_k4j3J1kUY5cs_icAAP__eFkZxg">