[llvm-bugs] [Bug 35097] New: clang-diff Ignores #defines in its outputs
llvm-bugs at lists.llvm.org
Thu Oct 26 07:34:11 PDT 2017
Bug ID: 35097
Summary: clang-diff Ignores #defines in its outputs
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: gamblejr at msoe.edu
CC: llvm-bugs at lists.llvm.org
Created attachment 19347
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs