]> granicus.if.org Git - clang/commitdiff
Improving objc_ownership attribute test coverage.
authorAaron Ballman <aaron@aaronballman.com>
Sun, 1 Sep 2013 19:11:23 +0000 (19:11 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Sun, 1 Sep 2013 19:11:23 +0000 (19:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189731 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjC/arc-decls.m

index cdf6cc64ff2d6dd962532f164df02787d57e51b5..3d0ef686f96b765a73b73864922e604e9538e36c 100644 (file)
@@ -99,3 +99,9 @@ void test7(void) {
   I *y;
   J **py = &y; // expected-error {{pointer to non-const type 'J *' with no explicit ownership}} expected-warning {{incompatible pointer types initializing}}
 }
+
+void func(void) __attribute__((objc_ownership(none)));  // expected-warning {{'objc_ownership' only applies to Objective-C object or block pointer types; type here is 'void (void)'}}
+struct __attribute__((objc_ownership(none))) S2 {}; // expected-error {{'objc_ownership' attribute only applies to variables}}
+@interface I2
+    @property __attribute__((objc_ownership(frob))) id i; // expected-warning {{'objc_ownership' attribute argument not supported: 'frob'}}
+@end