aboutsummaryrefslogtreecommitdiff
path: root/test/ARCMT/releases.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/ARCMT/releases.m')
-rw-r--r--test/ARCMT/releases.m16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/ARCMT/releases.m b/test/ARCMT/releases.m
index d5f21dc4c2a7..867fab9cec74 100644
--- a/test/ARCMT/releases.m
+++ b/test/ARCMT/releases.m
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fobjc-nonfragile-abi -fobjc-exceptions -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
-// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-exceptions -fblocks -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
+// RUN: %clang_cc1 -fobjc-exceptions -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result
+// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-exceptions -fblocks -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
#define nil 0
@@ -85,3 +85,15 @@ void test2(id p) {
RELEASE_MACRO(p);
RELEASE_MACRO2(p);
}
+
+@implementation Foo2
+
+static id internal_var = 0;
+
++ (void)setIt:(id)newone {
+ if (internal_var != newone) {
+ [internal_var release];
+ internal_var = [newone retain];
+ }
+}
+@end