r189731 - Improving objc_ownership attribute test coverage.

Aaron Ballman aaron at aaronballman.com
Sun Sep 1 12:11:23 PDT 2013


Author: aaronballman
Date: Sun Sep  1 14:11:23 2013
New Revision: 189731

URL: http://llvm.org/viewvc/llvm-project?rev=189731&view=rev
Log:
Improving objc_ownership attribute test coverage.

Modified:
    cfe/trunk/test/SemaObjC/arc-decls.m

Modified: cfe/trunk/test/SemaObjC/arc-decls.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-decls.m?rev=189731&r1=189730&r2=189731&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-decls.m (original)
+++ cfe/trunk/test/SemaObjC/arc-decls.m Sun Sep  1 14:11:23 2013
@@ -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}}
+ at interface I2
+    @property __attribute__((objc_ownership(frob))) id i; // expected-warning {{'objc_ownership' attribute argument not supported: 'frob'}}
+ at end





More information about the cfe-commits mailing list