diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/Preprocessor/macro_fn.c | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/Preprocessor/macro_fn.c')
-rw-r--r-- | test/Preprocessor/macro_fn.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Preprocessor/macro_fn.c b/test/Preprocessor/macro_fn.c index 85733b4..f93d52c 100644 --- a/test/Preprocessor/macro_fn.c +++ b/test/Preprocessor/macro_fn.c @@ -4,8 +4,8 @@ #define zero() 0 #define one(x) 0 #define two(x, y) 0 -#define zero_dot(...) 0 /* expected-warning {{variadic macros were introduced in C99}} */ -#define one_dot(x, ...) 0 /* expected-warning {{variadic macros were introduced in C99}} */ +#define zero_dot(...) 0 /* expected-warning {{variadic macros are a C99 feature}} */ +#define one_dot(x, ...) 0 /* expected-warning {{variadic macros are a C99 feature}} expected-note 2{{macro 'one_dot' defined here}} */ zero() zero(1); /* expected-error {{too many arguments provided to function-like macro invocation}} */ @@ -19,25 +19,25 @@ one(a, b) /* expected-error {{too many arguments provided to function-li two() /* expected-error {{too few arguments provided to function-like macro invocation}} */ two(a) /* expected-error {{too few arguments provided to function-like macro invocation}} */ two(a,b) -two(a, ) /* expected-warning {{empty macro arguments were standardized in C99}} */ +two(a, ) /* expected-warning {{empty macro arguments are a C99 feature}} */ two(a,b,c) /* expected-error {{too many arguments provided to function-like macro invocation}} */ two( - , /* expected-warning {{empty macro arguments were standardized in C99}} */ - , /* expected-warning {{empty macro arguments were standardized in C99}} \ + , /* expected-warning {{empty macro arguments are a C99 feature}} */ + , /* expected-warning {{empty macro arguments are a C99 feature}} \ expected-error {{too many arguments provided to function-like macro invocation}} */ ) -two(,) /* expected-warning 2 {{empty macro arguments were standardized in C99}} */ +two(,) /* expected-warning 2 {{empty macro arguments are a C99 feature}} */ /* PR4006 & rdar://6807000 */ -#define e(...) __VA_ARGS__ /* expected-warning {{variadic macros were introduced in C99}} */ +#define e(...) __VA_ARGS__ /* expected-warning {{variadic macros are a C99 feature}} */ e(x) e() zero_dot() -one_dot(x) /* empty ... argument: expected-warning {{varargs argument missing, but tolerated as an extension}} */ -one_dot() /* empty first argument, elided ...: expected-warning {{varargs argument missing, but tolerated as an extension}} */ +one_dot(x) /* empty ... argument: expected-warning {{must specify at least one argument for '...' parameter of variadic macro}} */ +one_dot() /* empty first argument, elided ...: expected-warning {{must specify at least one argument for '...' parameter of variadic macro}} */ /* rdar://6816766 - Crash with function-like macro test at end of directive. */ |