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
diff --git a/test/Preprocessor/macro_fn.c b/test/Preprocessor/macro_fn.c
index 8dc8b77..90dc2f0 100644
--- a/test/Preprocessor/macro_fn.c
+++ b/test/Preprocessor/macro_fn.c
@@ -25,3 +25,9 @@
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)