summaryrefslogtreecommitdiffstats
path: root/test/ARCMT/check-with-pch.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/ARCMT/check-with-pch.m')
-rw-r--r--test/ARCMT/check-with-pch.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ARCMT/check-with-pch.m b/test/ARCMT/check-with-pch.m
new file mode 100644
index 0000000..7867002
--- /dev/null
+++ b/test/ARCMT/check-with-pch.m
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -x objective-c -triple x86_64-apple-darwin10 %S/Common.h -emit-pch -o %t.pch
+// RUN: %clang_cc1 -include-pch %t.pch -arcmt-check -verify -triple x86_64-apple-darwin10 -fblocks -Werror %s
+// DISABLE: mingw32
+
+// rdar://9601437
+@interface I9601437 {
+ __unsafe_unretained id x;
+}
+-(void)Meth;
+@end
+
+@implementation I9601437
+-(void)Meth {
+ self->x = [NSObject new]; // expected-error {{assigning retained object}}
+}
+@end
OpenPOWER on IntegriCloud