summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/ObjCProperties.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/ObjCProperties.m')
-rw-r--r--clang/test/Analysis/ObjCProperties.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/Analysis/ObjCProperties.m b/clang/test/Analysis/ObjCProperties.m
new file mode 100644
index 0000000..b9ed9b9
--- /dev/null
+++ b/clang/test/Analysis/ObjCProperties.m
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=basic -Wno-objc-root-class %s -verify
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -analyzer-constraints=range -Wno-objc-root-class %s -verify
+
+// The point of this test cases is to exercise properties in the static
+// analyzer
+
+@interface MyClass {
+@private
+ id _X;
+}
+- (id)initWithY:(id)Y;
+@property(copy, readwrite) id X;
+@end
+
+@implementation MyClass
+@synthesize X = _X;
+- (id)initWithY:(id)Y {
+ self.X = Y;
+ return self;
+}
+@end