summaryrefslogtreecommitdiffstats
path: root/test/ARCMT
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-06 18:58:23 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-06 18:58:23 +0000
commit280b4ada965f89607684446e826d830f0b8a7864 (patch)
tree6d8cee8bcfa73c954115abdf5d1152b72d8cb4c7 /test/ARCMT
parent17ac3197941b9f135424dfe3900577a04407c5c2 (diff)
[arcmt] In GC, error for __strong/__weak on non-objc pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ARCMT')
-rw-r--r--test/ARCMT/GC-check.m5
-rw-r--r--test/ARCMT/GC.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/test/ARCMT/GC-check.m b/test/ARCMT/GC-check.m
index f71787ce02..9864354228 100644
--- a/test/ARCMT/GC-check.m
+++ b/test/ARCMT/GC-check.m
@@ -12,3 +12,8 @@ void test1(CFTypeRef *cft) {
// expected-error {{unavailable}}
NSAllocateCollectable(100, 0); // expected-error {{call returns pointer to GC managed memory; it will become unmanaged in ARC}}
}
+
+@interface I1 {
+ __strong void *gcVar; // expected-error {{GC managed memory will become unmanaged in ARC}}
+}
+@end;
diff --git a/test/ARCMT/GC.h b/test/ARCMT/GC.h
index 6202e478c3..4301baf272 100644
--- a/test/ARCMT/GC.h
+++ b/test/ARCMT/GC.h
@@ -1,5 +1,6 @@
@interface ExtInterface {
__strong ExtInterface *myivar;
+ __strong void *gcVar;
}
@end