<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - -rewrite-macros breaks for consecutive comments"
   href="https://bugs.llvm.org/show_bug.cgi?id=37336">37336</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-rewrite-macros breaks for consecutive comments
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jackanth3@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following code:

/* <a href="show_bug.cgi?id=37336#c1">Comment 1</a> */
/* <a href="show_bug.cgi?id=37336#c2">Comment 2</a> */

Gets rewritten by -rewrite-macros as:

/* <a href="show_bug.cgi?id=37336#c1">Comment 1</a> */
 /*/* <a href="show_bug.cgi?id=37336#c2">Comment 2</a> */*/

which then will fail to compile. This behaviour applies to the first pair of
any consecutive comments separated only by whitespace, including in the context
of other code. E.g.

// <a href="show_bug.cgi?id=37336#c3">Comment 3</a>

/* <a href="show_bug.cgi?id=37336#c4">Comment 4</a> */

becomes:

// <a href="show_bug.cgi?id=37336#c3">Comment 3</a>

 /*/* <a href="show_bug.cgi?id=37336#c4">Comment 4</a> */*/

and

// <a href="show_bug.cgi?id=37336#c5">Comment 5</a>
// <a href="show_bug.cgi?id=37336#c6">Comment 6</a>
// <a href="show_bug.cgi?id=37336#c7">Comment 7</a>
// <a href="show_bug.cgi?id=37336#c8">Comment 8</a>

becomes

// <a href="show_bug.cgi?id=37336#c5">Comment 5</a>
 /* // <a href="show_bug.cgi?id=37336#c6">Comment 6</a> */
// <a href="show_bug.cgi?id=37336#c7">Comment 7</a>
// <a href="show_bug.cgi?id=37336#c8">Comment 8</a>

(The last one is legal code but still not desirable.)</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>