Skip to content

Commit

Permalink
Improving objc_ownership attribute test coverage.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189731 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
AaronBallman committed Sep 1, 2013
1 parent 94c0ad9 commit 0180688
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/SemaObjC/arc-decls.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0180688

Please sign in to comment.