Created attachment 24187
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
bug.cpp
(47 bytes, text/plain)