https://bugs.llvm.org/show_bug.cgi?id=48233
Bug ID: 48233
Summary: Incorrect line numbers with -E and raw string
Product: clang
Version: 11.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Created attachment 24187
--> https://bugs.llvm.org/attachment.cgi?id=24187&action=edit
Example source file as described
Line numbers in the preprocessor output are incorrect when a source has a raw
string literal containing newlines.
Consider this source file containing these three lines:
const char s[] = R"(line1
line2)";
int line3;
Preprocess this source with -E:
$ clang++ -E bug.cpp
The output ends like below. There is an incorrect extra blank line following
the raw string.
# 1 "bug.cpp" 2
const char s[] = R"(line1 <-- line 1, correct
line2)"; <-- line 2, correct
<-- incorrect extra blank line
int line3; <-- line 4, incorrect should be line 3
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs