https://bugs.llvm.org/show_bug.cgi?id=35097

            Bug ID: 35097
           Summary: clang-diff Ignores #defines in its outputs
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: gambl...@msoe.edu
                CC: llvm-bugs@lists.llvm.org

Created attachment 19347
  --> https://bugs.llvm.org/attachment.cgi?id=19347&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to