http://bugs.llvm.org/show_bug.cgi?id=32631
Bug ID: 32631
Summary: undef is printed on the wrong line by -E -CC -dD with
comment in macro
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: jonathanmueller....@gmail.com
CC: llvm-bugs@lists.llvm.org
If you run `clang++ -E -CC -dD` on this file:
```
#define FOO /*a
b
c*/
FOO
#undef FOO
```
The output is:
```
predefine macros here...
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "file.cpp" 2
#define FOO /*a
b
c*/
/*a
b
c*/#undef FOO
# 7 "file.cpp"
```
This is incorrect, the `#undef` is on the same line as the expansion but should
be on its own line.
The error still happens when the macro contains additional code, but doesn't
happen anymore if it contains a comment with a line number other than three.
I know that this is *really* obscure, but I parse the output of `clang++ -E`
and can't detect the `#undef` if it is on the same line.
--
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