aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_fn.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-19 18:26:34 +0000
committerChris Lattner <sabre@nondot.org>2009-04-19 18:26:34 +0000
commit8fde5978a63bcce5c294a93b2a5dd424d7628971 (patch)
tree817c2351eae32d1ade42456058b7f8eeda8d8f9f /test/Preprocessor/macro_fn.c
parent5417544b42581366f45d8164f9cbbd1a2e99c485 (diff)
Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first token
in a function-like macro body. This has the added bonus of moving some function-like macro specific code out of the object-like macro codepath. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/macro_fn.c')
-rw-r--r--test/Preprocessor/macro_fn.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_fn.c b/test/Preprocessor/macro_fn.c
index 8dc8b77d6d..90dc2f06d6 100644
--- a/test/Preprocessor/macro_fn.c
+++ b/test/Preprocessor/macro_fn.c
@@ -25,3 +25,9 @@ two(
expected-error {{too many arguments provided to function-like macro invocation}} */
)
two(,) /* expected-warning 2 {{empty macro arguments were standardized in C99}} */
+
+
+
+/* PR4006 */
+#define e(...) __VA_ARGS__ /* expected-warning {{variadic macros were introduced in C99}} */
+e(x)