diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-29 07:54:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-29 07:54:23 +0000 |
commit | 71a3a8d50643c450823d3fbcf3307a3d7db1a265 (patch) | |
tree | 9cb7085c73905406d3f0a8b6a79a9137f841379f /test/Preprocessor/macro_paste_commaext.c | |
parent | 0493025c08da22b08af4f0587af726ae30251575 (diff) |
Fix a bug where we would incorrectly emit a "cannot paste" error
message when handling the GNU ", ## __VA_ARGS__" extension. While
I'm at it, flag uses of this as extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/macro_paste_commaext.c')
-rw-r--r-- | test/Preprocessor/macro_paste_commaext.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_paste_commaext.c b/test/Preprocessor/macro_paste_commaext.c new file mode 100644 index 0000000000..0fcd90d68d --- /dev/null +++ b/test/Preprocessor/macro_paste_commaext.c @@ -0,0 +1,13 @@ +// RUN: clang %s -E | grep 'V);' && +// RUN: clang %s -E | grep 'W, 1, 2);' +// RUN: clang %s -E | grep 'X, 1, 2);' +// RUN: clang %s -E | grep 'Y, );' +// RUN: clang %s -E | grep 'Z, );' + +#define debug(format, ...) format, ## __VA_ARGS__) +debug(V); +debug(W, 1, 2); +debug(X, 1, 2 ); +debug(Y, ); +debug(Z,); + |