<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54322>54322</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format of inline comment creates line >80 characters due to indentation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zmodem
</td>
</tr>
</table>
<pre>
Consider:
```
$ cat | build.release/bin/clang-format
//---------------------This line is 80 characters long--------------------------
// excerpt below
std::vector<std::string> cookie_lines({
"CookieBlockedOnCanGetCookie=1", // Fail in FilteringTestLayeredNetworkDelegate::CanGetCookie
});
```
the result is:
```
//---------------------This line is 80 characters long--------------------------
// excerpt below
std::vector<std::string> cookie_lines({
"CookieBlockedOnCanGetCookie=1", // Fail in
// FilteringTestLayeredNetworkDelegate::CanGetCookie
});
```
while clang-format did break the long line, the new line is still >80 columns because of the indentation to align it with the previous line.
Not really sure what would be the better formatting here, but figured it's worth filing.
(Filed originally at https://bugs.chromium.org/p/chromium/issues/detail?id=937329)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9lMGO2yAQhp8GX9BGDsRxcvBhkzS9VNvL3isMY5sGQwR40-3TdyDZbSJttatWKrLsGGaYn-8fp3Xqudk6G7QCT_g9KXekfLkvy8t1fmULKkWkpN7SdtJGzTwYEAEI27fa4l0aYfu7zvkxhV2S9njdvTUeBx2o0RYoPlcllYPwQkbwOOtwnz-O650p_JDgj5G2YNzpvEJpiCqdhd8_gYwOz7V9nQnRa9sT_olK5w4aviUFgbAVqTcv6WkQxrY5YGOcPID6arfCfoZ4niR8N8cIwrYpMgvZC22otnSvDZ4BazxCiF_EM3hQDxBPzh92yKsXEc5Kbva7VCb1jrA14Zu3Hcj3OAD1ECYTEdx7lv1_-v_M_sPkb8Ffm_fOeEn8e6c-4tNp0AbozTehtKKtB3GgycTEOVuQDpMmLJxeLQlRG0ORVfLGmWm0ASlLMQWgrsvh2iqwUUTtLI2OCqN7S3WkJx2HHHD08KTddPZ5dq3twUXsIWHMMw2TB3oaUN3JTQb1Qc5tISIcehYeERIdkE9S2k6RdrrHNIXVCKsDZnos2Wms09_UQW-RMgY6r3ttc0GsNMR4zK2bjWinPszk4N2op3HmfI9zx_R3cpnCnzqEKXXKXkFEuwnfa-yp3ZrXHG1g60I1XK35WhRRRwPNDXXEpW3mKt04IjIq8ewRLv1_Yfy7_9UEiecV3mLyprkV3SPkqZ3hjvhizNPL4-7o3Xfs_GvR1YIzVgyNgqUSq3a-4hVfqpotalmJrmKrrlxJYMvCCPyQQkOqDbZ46oa8RWr3alfohpWMlXxezku-5tWsBrVQoiu7toJFt5ZkUcKIdGZJR-JY-CZLSoBx0egQw-9FEQI2DEAuh_uLKQ7ONz9Hp2AscuUmK_8FMvfa_A">