
Summary: This patch implements 4.3 of http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4220.pdf. If a raw string contains a newline character, replace each newline character with the \n escape code. Without this patch, included test case (macro_raw_string.cpp) results compilation failure. Reviewers: rsmith, doug.gregor, jkorous-apple Reviewed By: jkorous-apple Subscribers: jkorous-apple, vsapsai, cfe-commits Differential Revision: https://reviews.llvm.org/D39279 llvm-svn: 319904
12 lines
168 B
C++
12 lines
168 B
C++
// RUN: %clang_cc1 -E -std=c++11 %s -o %t
|
|
// RUN: %clang_cc1 %t
|
|
|
|
#define FOO(str) foo(#str)
|
|
|
|
extern void foo(const char *str);
|
|
|
|
void bar() {
|
|
FOO(R"(foo
|
|
bar)");
|
|
}
|