From 249c38bb027a9152e7ed587da962e680ac65bf42 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 19 Apr 2009 18:26:34 +0000 Subject: 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. llvm-svn: 69530 --- clang/test/Preprocessor/macro_fn.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/Preprocessor') diff --git a/clang/test/Preprocessor/macro_fn.c b/clang/test/Preprocessor/macro_fn.c index 8dc8b77d6df..90dc2f06d68 100644 --- a/clang/test/Preprocessor/macro_fn.c +++ b/clang/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) -- cgit v1.2.3