Improving objc_ownership attribute test coverage.

llvm-svn: 189731
This commit is contained in:
Aaron Ballman 2013-09-01 19:11:23 +00:00
parent 4fe2746c5f
commit 5e13985df8
1 changed files with 6 additions and 0 deletions

View 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