summaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_paste_commaext.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:11 +0000
commit0a5fb09b599c1bdea3cd11168bb8f4ff4040316e (patch)
tree5e94367d1a8032322c6871cfe16714c0982fd61a /test/Preprocessor/macro_paste_commaext.c
parentf0c0337bbfb63d1f9edf145aab535bdf82c20454 (diff)
Diffstat (limited to 'test/Preprocessor/macro_paste_commaext.c')
-rw-r--r--test/Preprocessor/macro_paste_commaext.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/test/Preprocessor/macro_paste_commaext.c b/test/Preprocessor/macro_paste_commaext.c
index fdb8f982a929..60418effe7c3 100644
--- a/test/Preprocessor/macro_paste_commaext.c
+++ b/test/Preprocessor/macro_paste_commaext.c
@@ -1,13 +1,20 @@
-// RUN: %clang_cc1 %s -E | grep 'V);'
-// RUN: %clang_cc1 %s -E | grep 'W, 1, 2);'
-// RUN: %clang_cc1 %s -E | grep 'X, 1, 2);'
-// RUN: %clang_cc1 %s -E | grep 'Y,);'
-// RUN: %clang_cc1 %s -E | grep 'Z,);'
+// RUN: %clang_cc1 %s -E | FileCheck --strict-whitespace --match-full-lines %s
+
+// In the following tests, note that the output is sensitive to the
+// whitespace *preceeding* the varargs argument, as well as to
+// interior whitespace. AFAIK, this is the only case where whitespace
+// preceeding an argument matters, and might be considered a bug in
+// GCC. Nevertheless, since this feature is a GCC extension in the
+// first place, we'll follow along.
#define debug(format, ...) format, ## __VA_ARGS__)
+// CHECK:V);
debug(V);
-debug(W, 1, 2);
+// CHECK:W,1, 2);
+debug(W,1, 2);
+// CHECK:X, 1, 2);
debug(X, 1, 2 );
+// CHECK:Y,);
debug(Y, );
+// CHECK:Z,);
debug(Z,);
-