[cfe-commits] r38779 - /cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:24:33 PDT 2007
Author: sabre
Date: Wed Jul 11 11:24:32 2007
New Revision: 38779
URL: http://llvm.org/viewvc/llvm-project?rev=38779&view=rev
Log:
new testcase for the GNU comma swallow extension.
Added:
cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c (with props)
Added: cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c?rev=38779&view=auto
==============================================================================
--- cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c (added)
+++ cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c Wed Jul 11 11:24:32 2007
@@ -0,0 +1,16 @@
+// Test the GNU comma swallowing extension.
+// RUN: clang %s -E | grep 'foo{A, }' &&
+// RUN: clang %s -E | grep 'fo2{A,}' &&
+// RUN: clang %s -E | grep '{foo}'
+
+#define X(Y) foo{A, Y}
+X()
+
+#define X2(Y) fo2{A,##Y}
+X2()
+
+// should eat the comma.
+#define X3(b, ...) {b, ## __VA_ARGS__}
+X3(foo)
+
+
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
More information about the cfe-commits
mailing list