summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/macro_fn.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerdim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commitc72c57c9e9b69944e3e009cd5e209634839581d3 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /test/Preprocessor/macro_fn.c
parent5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff)
downloadFreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip
FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Preprocessor/macro_fn.c')
-rw-r--r--test/Preprocessor/macro_fn.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/Preprocessor/macro_fn.c b/test/Preprocessor/macro_fn.c
index f93d52c..fcdb90a 100644
--- a/test/Preprocessor/macro_fn.c
+++ b/test/Preprocessor/macro_fn.c
@@ -1,9 +1,9 @@
/* RUN: %clang_cc1 %s -Eonly -std=c89 -pedantic -verify
*/
/* PR3937 */
-#define zero() 0
-#define one(x) 0
-#define two(x, y) 0
+#define zero() 0 /* expected-note 2 {{defined here}} */
+#define one(x) 0 /* expected-note 2 {{defined here}} */
+#define two(x, y) 0 /* expected-note 4 {{defined here}} */
#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}} */
@@ -44,3 +44,9 @@ one_dot() /* empty first argument, elided ...: expected-warning {{must specify
#define E() (i == 0)
#if E
#endif
+
+
+/* <rdar://problem/12292192> */
+#define NSAssert(condition, desc, ...) /* expected-warning {{variadic macros are a C99 feature}} */ \
+ SomeComplicatedStuff((desc), ##__VA_ARGS__) /* expected-warning {{token pasting of ',' and __VA_ARGS__ is a GNU extension}} */
+NSAssert(somecond, somedesc)
OpenPOWER on IntegriCloud