<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:alexfh@google.com" title="Alexander Kornienko <alexfh@google.com>"> <span class="fn">Alexander Kornienko</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - formatter doesn't correctly count length of Unicode codepoints"
href="https://bugs.llvm.org/show_bug.cgi?id=31909">bug 31909</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>alexfh@google.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WONTFIX
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - formatter doesn't correctly count length of Unicode codepoints"
href="https://bugs.llvm.org/show_bug.cgi?id=31909#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - formatter doesn't correctly count length of Unicode codepoints"
href="https://bugs.llvm.org/show_bug.cgi?id=31909">bug 31909</a>
from <span class="vcard"><a class="email" href="mailto:alexfh@google.com" title="Alexander Kornienko <alexfh@google.com>"> <span class="fn">Alexander Kornienko</span></a>
</span></b>
<pre>clang-format does count the ellipsis for a single character with a width of 1
column:
$ cat /tmp/q.cc
/*
00000000011111111112222222222333333333344444444445555555555666666666677777777778
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*/
// … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … …
… … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … …
$ clang-format -style=google /tmp/q.cc
/*
00000000011111111112222222222333333333344444444445555555555666666666677777777778
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*/
// … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … …
…
// … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … …
Now getting back to your input. Its current formatting is:
$ cat /tmp/q.cc
#define MACRO() \
int test; \
// This is my test comment in a macro… This is my test comment in a macro…
\
// This is my test comment in a macro. This is my test comment in a macro.
$ clang-format -style=google /tmp/q.cc
#define MACRO() \
int test; \
// This is my test comment in a macro… This is my test comment in a macro… \
// This is my test comment in a macro. This is my test comment in a macro.
What is going on here has nothing to do with the ellipsis character:
$ cat /tmp/q.cc
#define MACRO() \
int test; \
// This is my test comment in a macro. This is my test comment in a macro.
\
// This is my test comment in a macro. This is my test comment in a macro.
$ clang-format -style=google /tmp/q.cc
#define MACRO() \
int test; \
// This is my test comment in a macro. This is my test comment in a macro. \
// This is my test comment in a macro. This is my test comment in a macro.
The reason is that there's only a single comment here - with an escaped newline
and the ` //` characters in the middle. Clang-format just doesn't touch the
contents of comments and string literals containing escaped newlines:
$ cat /tmp/q.cc
/*
00000000011111111112222222222333333333344444444445555555555666666666677777777778
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*/
// aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr
sss ttt uuu vvv www \
// AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM NNN OOO PPP QQQ RRR
SSS TTT UUU VVV WWW
$ clang-format -style=google /tmp/q.cc
/*
00000000011111111112222222222333333333344444444445555555555666666666677777777778
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*/
// aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss
ttt uuu vvv www \
// AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM NNN OOO PPP QQQ RRR
SSS TTT UUU VVV WWW
This is intended behavior, I believe.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>