From 06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 18 Jan 2015 16:23:48 +0000 Subject: Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102 --- test/Preprocessor/macro_paste_bad.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/Preprocessor/macro_paste_bad.c') diff --git a/test/Preprocessor/macro_paste_bad.c b/test/Preprocessor/macro_paste_bad.c index ec10006ae3d7..23777240cbf7 100644 --- a/test/Preprocessor/macro_paste_bad.c +++ b/test/Preprocessor/macro_paste_bad.c @@ -34,3 +34,11 @@ int VA; // expected-warning {{__VA_ARGS__ can only appear in the expansion of #define LOG_ON_ERROR(x) x ## #y; // expected-error {{'#' is not followed by a macro parameter}} LOG_ON_ERROR(0); + +#define PR21379A(x) printf ##x // expected-note {{macro 'PR21379A' defined here}} +PR21379A(0 {, }) // expected-error {{too many arguments provided to function-like macro invocation}} + // expected-note@-1 {{parentheses are required around macro argument containing braced initializer list}} + +#define PR21379B(x) printf #x // expected-note {{macro 'PR21379B' defined here}} +PR21379B(0 {, }) // expected-error {{too many arguments provided to function-like macro invocation}} + // expected-note@-1 {{parentheses are required around macro argument containing braced initializer list}} -- cgit v1.3