summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/self-init.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/self-init.m')
-rw-r--r--clang/test/Analysis/self-init.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/Analysis/self-init.m b/clang/test/Analysis/self-init.m
index b0c51a2b37e..d8e8888287d 100644
--- a/clang/test/Analysis/self-init.m
+++ b/clang/test/Analysis/self-init.m
@@ -281,3 +281,28 @@ typedef signed char BOOL;
}
@end
+// Test for radar://12838705.
+@interface ABCClass : NSObject
+@property (nonatomic, strong) NSString *foo;
+@property (nonatomic, strong) NSString *bar;
+@property (nonatomic, strong) NSString *baz;
+@end
+
+@implementation ABCClass
+@synthesize foo = foo_;
+@synthesize bar = bar_;
+@synthesize baz = baz_;
+
+- (id)initWithABC:(ABCClass *)abc {
+ self = [super init];
+ baz_ = abc->baz_;
+ return self;
+}
+
+- (ABCClass *)abcWithFoo:(NSString *)foo {
+ ABCClass *copy = [[ABCClass alloc] initWithABC:self];
+ return copy;
+}
+
+@end
+
OpenPOWER on IntegriCloud