<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 - clang-diff Ignores #defines in its outputs"
   href="https://bugs.llvm.org/show_bug.cgi?id=35097">35097</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-diff Ignores #defines in its outputs
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>gamblejr@msoe.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19347" name="attach_19347" title="Zip file with described files">attachment 19347</a> <a href="attachment.cgi?id=19347&action=edit" title="Zip file with described files">[details]</a></span>
Zip file with described files

Note that I have attached a zip file with four files in it.

In summery the files work0.cpp and work1.cpp when diffed with clang-diff
produce the expected output.  But when I feed it fail0.cpp and fail1.cpp to
diff it tells me that there are no differences.


If I use clang-diff with the following arguments:

   clang-diff work0.cpp work1.cpp --

I get the following output:

   Update CompoundAssignOperator: ^=(8) to &=
   Insert UnaryOperator: ~(10) into CompoundAssignOperator: &=(8) at 1
   Insert ParenExpr(11) into UnaryOperator: ~(10) at 0
   Move BinaryOperator: <<(12) into ParenExpr(11) at 0

This is what I would expect.

When I use clang-diff on the other two files like so:

   clang-diff fail0.cpp fail1.cpp --

The only difference between the "fail" files and the "work" files is the fact
that in the work files I have a volatile variable defined:

    volatile unsigned char PORT = 12;

while in the fail files I have a macro like this:

    #define PORT (*(unsigned char volatile * )0x1000)

All four files compile fine with clang and no arguments given otherwise.</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>