diff options
| author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2018-01-04 22:58:30 +0000 |
|---|---|---|
| committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2018-01-04 22:58:30 +0000 |
| commit | 7d96b79194c019ab1030c6223c8458ef421889e4 (patch) | |
| tree | b6a719284e8f20441fd76f79f58023e930b1dd52 /clang | |
| parent | 8c432f2d5e6811ccf1c1d3883b87c0e7bb830aac (diff) | |
| download | bcm5719-llvm-7d96b79194c019ab1030c6223c8458ef421889e4.tar.gz bcm5719-llvm-7d96b79194c019ab1030c6223c8458ef421889e4.zip | |
Use backslash escape, replacing xargs -0 in test macro-multiline.c
Summary:
xargs supports escaping of newline characters with backslash.
xargs -0 is neither part of POSIX nor the LSB.
This patch removes the -0 option and adjusts the input to xargs
accordingly; that is, the input is a text file not ending in an
incomplete line, and the newline of interest is preceded by a backslash.
Note: The treatment of escaped newline characters is not as clearly
specified by POSIX as for escaped blank characters; however, the same
can be said for escaped backslashes. It is slightly more clear for the
case where the -I option is used; however, -I is also of limited
portability.
Reviewers: bruno
Reviewed By: bruno
Subscribers: bruno, rcraik, cfe-commits
Differential Revision: https://reviews.llvm.org/D41544
llvm-svn: 321828
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Preprocessor/macro-multiline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/macro-multiline.c b/clang/test/Preprocessor/macro-multiline.c index 72a5d20e523..664c37cd02a 100644 --- a/clang/test/Preprocessor/macro-multiline.c +++ b/clang/test/Preprocessor/macro-multiline.c @@ -1,4 +1,4 @@ -// RUN: printf -- "-DX=A\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" | xargs -0 %clang -E %s | FileCheck -strict-whitespace %s +// RUN: printf -- "-DX=A\\\\\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT\n" | xargs %clang -E %s | FileCheck -strict-whitespace %s // Per GCC -D semantics, \n and anything that follows is ignored. |

