<p dir="ltr">Ping.</p>
<div class="gmail_quote">On May 20, 2013 8:38 PM, "Alexander Kornienko" <<a href="mailto:alexfh@google.com">alexfh@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">On Mon, May 20, 2013 at 8:20 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On Mon, May 20, 2013 at 6:17 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>

</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Please take a look. Is this enough?</div></div></blockquote><div><br></div></div><div>Does it trigger the crash before your fix?</div>

</div></div></div></blockquote><div><br></div><div>Yes, of course.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">

<div class="gmail_quote"><div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Index: test/Format/style-on-command-line.cpp</div><div>===================================================================</div>


<div>--- test/Format/style-on-command-line.cpp       (revision 182291)</div>
<div>+++ test/Format/style-on-command-line.cpp       (working copy)</div><div>@@ -5,8 +5,10 @@</div><div> // RUN: clang-format -style="{lsjd}" %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK4 %s</div>



<div> // RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format</div><div> // RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK5 %s</div><div>+// RUN: echo -e "\n" > %T/.clang-format</div>


</div></blockquote><div><br></div></div><div>Why not 'touch'?</div></div></div></div></blockquote><div><br></div><div>To also check it with whitespace-only .clang-format.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Actually, I think all of these tests should change to not use 'echo' or other shell commands to build up the configuration files, and instead the configuration files should be directly added as files to the test suite under the 'Inputs' directory. That makes them much more friendly to Windows IIRC.</div>

</div></div></div></blockquote><div><br></div><div>We already have grep in one of the RUN lines, so "echo" doesn't make things worse. We already have plans to make some of our "unit" tests integration tests instead, as they are in fact. But FileCheck isn't suitable for this, we need a different mechanism for this, so it'll be a bit later. And I think this particular test will better fit into that structure. So I'd leave it as is for now, if you don't object.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div>+// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s</div><div> // RUN: echo -e "BasedOnStyle: google\nIndentWidth: 5" > %T/.clang-format</div><div>



-// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s</div><div>+// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK7 %s</div>



<div> void f() {</div><div> // CHECK1: {{^        int\* i;$}}</div><div> // CHECK2: {{^       int \*i;$}}</div><div>@@ -17,7 +19,9 @@</div><div> // CHECK4: {{^  int \*i;$}}</div><div> // CHECK5: Can't find usable .clang-format, using LLVM style</div>



<div> // CHECK5: {{^  int \*i;$}}</div><div>-// CHECK6: {{^     int\* i;$}}</div><div>+// CHECK6: Can't find usable .clang-format, using LLVM style</div><div>+// CHECK6: {{^  int \*i;$}}</div><div>+// CHECK7: {{^     int\* i;$}}</div>



<div> int*i;</div><div> int j;</div><div> }</div></div></blockquote></div></div></div></div></div></blockquote></div>
</div></div>
</blockquote></div>