summaryrefslogtreecommitdiffstats
path: root/clang/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
commit249c38bb027a9152e7ed587da962e680ac65bf42 (patch)
tree529324395d5a1ee87e10bf19ddaf44b9fc37eb68 /clang/test/Preprocessor/macro_fn.c
parentfc5571337e46a40d9a108e63a0c4e69f3d0d9d4e (diff)
downloadbcm5719-llvm-249c38bb027a9152e7ed587da962e680ac65bf42.tar.gz
bcm5719-llvm-249c38bb027a9152e7ed587da962e680ac65bf42.zip
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
Diffstat (limited to 'clang/test/Preprocessor/macro_fn.c')
-rw-r--r--clang/test/Preprocessor/macro_fn.c6
1 files changed, 6 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud