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

    <tr>
        <th>Summary</th>
        <td>
            Please allow trailing text on "clang-format on/off" comments
        </td>
    </tr>

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

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

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

<pre>
    Currently, any additional text after the "off" prevents the directive from being processed, so we have to resort to ugly workarounds in order to provide an explanation for turning the formatting off.

Real life example:
```
/* clang-format off */ // version 14 messes up concepts formatting
template<typename T>
concept ProtoContainer = requires(T x) {
    { x.mutable_elements() };
};
// clang-format on
```

Desired syntax:
```
// clang-format off - reasoning and explanation here
...
// clang-format on
```

Note that clang-tidy allows extra text on `NOLINT` comments
(see https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/NoLintDirectiveHandler.cpp)


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVMGO4zYM_Rr5QozhyI6THHzYndRogcV0Ucy9oC06USuLrkRnkr8vZHuwO4uiQAsEiiSKj-_xWcIY7cUTNWr_We3PGc5y5dCgozs7vmQdm0fzPIdAXtxD6WdA_wA0xopljw6E7gI4CAWQK4HSmodBaQ1ToBt5icu2sYF6sTeCIfAIHVl_gSlwTzGSSbCR4Y3gijcCYQgUOUiazRf3gDcOf2Lg2ZsI1gMHk8pxQrhZQ4Ae6D459JhYwcABZA4-FUnVBw4jiqQlD0OuirMqPq3jb4QOnB0I6I7j5EiVW0TVxfZbl7pV-hP0Dv3laQVMYKB0CsESbuFGISYGuwrGJC3CPEHPvqdJ4nc8VkyhcXIopMpneUzkcSR4VeVPa3RLg6-BhZ_ZC1pPAVR5hkB_zTZQVPr4CnelT6AOn9csAEgLuOfjLNg5-p0cjckIpY_rybMqt8Mf5quCjwL9P_diGc8UbSAD8eEF7__atx9hhwGeIBBGXjxCbz74d6VAa3ae5_-T3QsLgVxRthyx5gHoHL9FoLsEXL9c9qDq4uXXL7-8vKq6gJ7HtVlb1WMkgqvIFJPAhcTFynXu8p5HpVvnbu9_T1PgP6gXpdvOcad0O6L1SrcbAWYXn5bS3_aseSjdvvAX6-X8fkd-Rm8chbyfJqVP34vKTFOaU3nCjJpdfaj2h_p4KLNrU5d131WlGfa1PujTCbE3uDNDccT-YHrKbKMLXRY7Xe3qXVWW-WnAoxnq076sh2NRVKoqaETr8iQl53DJbIwzNXWh6ypz2JGLyyOhtac3WIJK6_RmhGaR382XqKrC2SjxG4pYcdR8dYSR1v6DBLRuuZvvDmj9o7G63Z6Rd0OyObjmPxux0IxKt4uMvwMAAP__3ueRUg">