<div dir="ltr">On Fri, Jun 28, 2013 at 2:29 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">What is the reason for this? I've not found any related rules in the coding styles we support (llvm, google, chromium, linux kernel).<div>
<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 2:15 AM, Nico Weber <span dir="ltr"><<a href="mailto:nicolasweber@gmx.de" target="_blank">nicolasweber@gmx.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: nico<br>
Date: Tue Jun 25 19:15:19 2013<br>
New Revision: 184894<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=184894&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=184894&view=rev</a><br>
Log:<br>
Formatter: Don't put a space after parameter-naming block comments.<br>
<br>
Before: f(a, b, /*doFoo=*/ false);<br>
Now: f(a, b, /*doFoo=*/false);<br>
<br>
This style is a lot more common:<br>
$ ack -H '=\*\/\w' lib | wc -l<br>
    1281<br>
$ ack -H '=\*\/ \w' lib | wc -l<br>
      70<br></blockquote></div></div></div></div></div></blockquote><div><br></div><div>Clarification: I see your research, but I'm personally not convinced that this is a better style, and that it's worth special casing it.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
Modified:<br>
    cfe/trunk/lib/Format/TokenAnnotator.cpp<br>
    cfe/trunk/unittests/Format/FormatTest.cpp<br>
<br>
Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnnotator.cpp?rev=184894&r1=184893&r2=184894&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnnotator.cpp?rev=184894&r1=184893&r2=184894&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/lib/Format/TokenAnnotator.cpp (original)<br>
+++ cfe/trunk/lib/Format/TokenAnnotator.cpp Tue Jun 25 19:15:19 2013<br>
@@ -1110,6 +1110,8 @@ bool TokenAnnotator::spaceRequiredBetwee<br>
     return false;<br>
   if (Left.is(tok::period) || Right.is(tok::period))<br>
     return false;<br>
+  if (Left.Type == TT_BlockComment && Left.TokenText.endswith("=*/"))<br>
+    return false;<br>
   return true;<br>
 }<br>
<br>
<br>
Modified: cfe/trunk/unittests/Format/FormatTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=184894&r1=184893&r2=184894&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=184894&r1=184893&r2=184894&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)<br>
+++ cfe/trunk/unittests/Format/FormatTest.cpp Tue Jun 25 19:15:19 2013<br>
@@ -756,7 +756,7 @@ TEST_F(FormatTest, RemovesTrailingWhites<br>
 }<br>
<br>
 TEST_F(FormatTest, UnderstandsBlockComments) {<br>
-  verifyFormat("f(/*test=*/ true);");<br>
+  verifyFormat("f(/*noSpaceAfterParameterNamingComment=*/true);");<br>
   EXPECT_EQ(<br>
       "f(aaaaaaaaaaaaaaaaaaaaaaaaa, /* Trailing comment for aa... */\n"<br>
       "  bbbbbbbbbbbbbbbbbbbbbbbbb);",<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br>
</div></div></div></div>
</blockquote></div><br>
</div></div>