[llvm-bugs] [Bug 35097] New: clang-diff Ignores #defines in its outputs
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 26 07:34:11 PDT 2017
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: unassignedclangbugs at nondot.org
Reporter: gamblejr at msoe.edu
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171026/400a7202/attachment.html>
More information about the llvm-bugs
mailing list