summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-09-01 19:11:23 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-09-01 19:11:23 +0000
commit5e13985df8300038425415345ccea2d659e42d65 (patch)
tree3bad4664917fa65491b7a75a06ded874ba77373c /clang
parent4fe2746c5ffe5226446d5632a367fb4a30d456c2 (diff)
downloadbcm5719-llvm-5e13985df8300038425415345ccea2d659e42d65.tar.gz
bcm5719-llvm-5e13985df8300038425415345ccea2d659e42d65.zip
Improving objc_ownership attribute test coverage.
llvm-svn: 189731
Diffstat (limited to 'clang')
-rw-r--r--clang/test/SemaObjC/arc-decls.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/arc-decls.m b/clang/test/SemaObjC/arc-decls.m
index cdf6cc64ff2..3d0ef686f96 100644
--- a/clang/test/SemaObjC/arc-decls.m
+++ b/clang/test/SemaObjC/arc-decls.m
@@ -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
OpenPOWER on IntegriCloud