summaryrefslogtreecommitdiff
path: root/test/FixIt/fixit-objc.m
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-10-20 21:14:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-10-20 21:14:49 +0000
commit36981b17ed939300f6f8fc2355a255f711fcef71 (patch)
treeee2483e98b09cac943dc93a6969d83ca737ff139 /test/FixIt/fixit-objc.m
parent180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff)
Notes
Diffstat (limited to 'test/FixIt/fixit-objc.m')
-rw-r--r--test/FixIt/fixit-objc.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/FixIt/fixit-objc.m b/test/FixIt/fixit-objc.m
index 2e8bfaea6aa3a..df591c7922964 100644
--- a/test/FixIt/fixit-objc.m
+++ b/test/FixIt/fixit-objc.m
@@ -53,3 +53,17 @@ int f0(Radar7861841 *a) { return a.x; } // expected-error {{property 'x' not fou
int f1(Radar7861841 *a) { return a->y; } // expected-error {{property 'y' found on object of type 'Radar7861841 *'; did you mean to access it with the "." operator?}}
+
+#define nil ((void*)0)
+#define NULL ((void*)0)
+
+void sentinel(int x, ...) __attribute__((sentinel)); // expected-note{{function has been explicitly marked sentinel here}}
+
+@interface Sentinel
+- (void)sentinel:(int)x, ... __attribute__((sentinel)); // expected-note{{method has been explicitly marked sentinel here}}
+@end
+
+void sentinel_test(Sentinel *a) {
+ sentinel(1, 2, 3); // expected-warning{{missing sentinel in function call}}
+ [a sentinel:1, 2, 3]; // expected-warning{{missing sentinel in method dispatch}}
+}