diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-07-29 04:39:12 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-07-29 04:39:12 +0000 |
| commit | d480b9c0ed26c3f30dda96a10211cbfee24235b4 (patch) | |
| tree | 2338ee137a9197aee346fb4f7f8ebd75a8c771a4 | |
| parent | 479b0af31db7dedc79732f4c1ac7510d9fc8bbd4 (diff) | |
| download | bcm5719-llvm-d480b9c0ed26c3f30dda96a10211cbfee24235b4.tar.gz bcm5719-llvm-d480b9c0ed26c3f30dda96a10211cbfee24235b4.zip | |
new testcase for the GNU comma swallow extension.
llvm-svn: 38779
| -rw-r--r-- | clang/test/Preprocessor/macro_fn_comma_swallow.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/macro_fn_comma_swallow.c b/clang/test/Preprocessor/macro_fn_comma_swallow.c new file mode 100644 index 00000000000..d4f3bb9940d --- /dev/null +++ b/clang/test/Preprocessor/macro_fn_comma_swallow.c @@ -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) + + |

