<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 9, 2014 at 11:08 AM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank" class="cremed">tobias@grosser.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 09/07/2014 10:47, Daniel Jasper wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, this is intended and I actually don't think that it is such a big<br>
difference. Multiline variable declaration that are broken after the type<br>
are actually reasonably rare.<br>
</blockquote>
<br></div>
In Polly alone it changes 180 lines (43 declarations)<br>
<br>
LLVM has 276 command line declarations that are currently broken<br>
after the type (grep -R 'cl::opt<.*>$' lib/ | wc):<br>
<br>
static cl::opt<bool><br>
VarName("options, ...")<br>
<br>
and 232 that are formatted</blockquote><div><br></div><div>a) That is not a lot (<1% of the codebase).</div><div>b) I think volume of change is actually not all that relevant when deciding on what formatting should be. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
static cl::opt<std::string> OnlyFunction(<br>
     "polly-only-func")<br>
<br></div>
If you look at the last five commit messages that explicitly mention clang-format three contain formatting changes of exactly these constructs:<br>
<br>
r212143:<br>
<br>
-static cl::list<std::string> ArchFlags("arch",<br>
-    cl::desc("architecture(s) from a Mach-O file to dump"),<br>
-    cl::ZeroOrMore);<br>
+static cl::list<std::string><br>
+ArchFlags("arch", cl::desc("architecture(s) from a Mach-O file to dump"),<br>
+          cl::ZeroOrMore);<br>
<br>
<br>
r212141:<br>
<br>
-static cl::opt<OutputFormatTy><br>
-       OutputFormatShort(cl::desc("<u></u>Specify output format"),<br>
-         cl::values(clEnumValN(sysv, "A", "System V format"),<br>
-                    clEnumValN(berkeley, "B", "Berkeley format"),<br>
-                    clEnumValN(darwin, "m", "Darwin -m format"),<br>
-                    clEnumValEnd),<br>
-         cl::init(berkeley));<br>
+OutputFormat("format", cl::desc("Specify output format"),<br>
+             cl::values(clEnumVal(sysv, "System V format"),<br>
+                        clEnumVal(berkeley, "Berkeley format"),<br>
+                        clEnumVal(darwin, "Darwin -m format"), clEnumValEnd),<br>
+             cl::init(berkeley));<br>
<br>
r210182<br>
<br>
-static cl::opt<bool><br>
-EnableAArch64UnscaledMemOp("<u></u>aarch64-unscaled-mem-op", cl::Hidden,<br>
-                         cl::desc("Allow AArch64 unscaled load/store combining"),<br>
-                         cl::init(true));<br>
+static cl::opt<bool> EnableAArch64UnscaledMemOp(<br>
+    "aarch64-unscaled-mem-op", cl::Hidden,<br>
+    cl::desc("Allow AArch64 unscaled load/store combining"), cl::init(true));<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Happy, to take a vote on this though..<br>
</blockquote>
<br></div>
Sure, would it be OK to revert this change meanwhile to get the build bot clean again.<br></blockquote><div><br></div><div>No. I think it is highly likely, we are going to stick with this change. Moreover, I think the issue here is that we have a buildbot enforcing a format based on clang-format's HEAD version. Lets do one of:</div>
<div>- Remove formatting test from buildbot. I think formatting is important, but it is good enough to clean this up every now and then, e.g. in a manually invoked step. Having incorrect indentation for a few days doesn't do any harm. That would also give room to separate formatting-only commits from other commits.</div>
<div>- Use a released version (or other known good version) of clang-format for these tests. We need to decouple clang-format commits from the cleanup of polly.</div><div><br></div><div>Cheers,<br>Daniel</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Tobias<br>
<br>
<br>
</blockquote></div><br></div></div>