<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 10/12/2013 18:03, Jim Grosbach
      wrote:<br>
    </div>
    <blockquote
      cite="mid:C5C76C35-2DDD-4634-A8BE-7B754C673D9F@apple.com"
      type="cite">
      <blockquote type="cite">
        <div bgcolor="#FFFFFF" text="#000000"> That causes dissonance
          between what the compiler sees and what lit.py sees for no
          particularly good reason. One of the nice properties of lit
          tests is that they're also valid compiler inputs, so trailing
          slash is a bit unfortunate.<br>
          <br>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>How does the backslash break this in any way?</div>
    </blockquote>
    <br>
    The backslash is interpreted by lit and the compiler in different
    and incompatible ways.<br>
    <br>
    Spot the problem in this reduced example..<br>
    <br>
    <meta charset="utf-8">
    <pre style="color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="color: rgb(105, 105, 105);">// expected-no-diagnostics</span>

<span style="color: rgb(105, 105, 105);">// RUN: %clang_cc1 %s -verify -emit-llvm -o - | \</span>
__attribute__ <span style="color: rgb(128, 128, 48);">(</span><span style="color: rgb(128, 128, 48);">(</span>packed<span style="color: rgb(128, 128, 48);">)</span><span style="color: rgb(128, 128, 48);">)</span> <span style="color: rgb(105, 105, 105);">// no warning</span>
<span style="color: rgb(128, 0, 0); font-weight: bold;">int</span> x<span style="color: rgb(128, 0, 128);">;</span>

<span style="color: rgb(105, 105, 105);">// RUN: FileCheck %s</span>
<span style="color: rgb(105, 105, 105);">// CHECK: @x = common global i32 0, align 4</span></pre>
    <br>
    It is easier to get this wrong than it is to get it right -- in
    effect, lit is encouraging use of backslash line continuations which
    are guaranteed to change the meaning of the following line in C/C++
    with a silent failure mode. This is concerning for a C/C++ compiler
    test suite :-)<br>
    <br>
    It's problematic because the feature hides test issues in and of
    itself by being incompatible with C, but moreover because it breaks
    stock tools used to check code and comments due to the complex
    sub-grammar introduced.<br>
    <br>
    It's really important to me that there's buy-in for this though --
    the last thing I want is for people to say "Alp made my tests hard
    to read" after the fact(!)<br>
    <br>
    Cheers,<br>
    Alp.<br>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.nuanti.com">http://www.nuanti.com</a>
the browser experts
</pre>
  </body>
</html>