summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-12-03 23:37:08 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-12-03 23:37:08 +0000
commitecbbb6e9bae188e9026ec3b41554dde054c79f7b (patch)
tree3472abeb2e5cb695e3e8498a9354a8fc826cb490 /clang/test/SemaObjC
parentf8af778e1f8e83522cd6c3c7cb85ea97e4de5db1 (diff)
downloadbcm5719-llvm-ecbbb6e9bae188e9026ec3b41554dde054c79f7b.tar.gz
bcm5719-llvm-ecbbb6e9bae188e9026ec3b41554dde054c79f7b.zip
Diagnose when accessing property in a class method and
no property accessor class method to be found, instead of crashing in IRGen. // rdar://8703553 llvm-svn: 120855
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/property-impl-misuse.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/property-impl-misuse.m b/clang/test/SemaObjC/property-impl-misuse.m
index 58c91c59d05..122afc1d4b5 100644
--- a/clang/test/SemaObjC/property-impl-misuse.m
+++ b/clang/test/SemaObjC/property-impl-misuse.m
@@ -14,3 +14,23 @@
@synthesize Y; // expected-note {{previous use is here}}
@synthesize Z=Y; // expected-error {{synthesized properties 'Z' and 'Y' both claim ivar 'Y'}}
@end
+
+// rdar://8703553
+@interface IDEPathCell
+{
+@private
+ id _gradientStyle;
+}
+
+@property (readwrite, assign, nonatomic) id gradientStyle;
+@end
+
+@implementation IDEPathCell
+
+@synthesize gradientStyle = _gradientStyle;
+- (void)setGradientStyle:(id)value { }
+
++ (void)_componentCellWithRepresentedObject {
+ self.gradientStyle; // expected-error {{property 'gradientStyle' not found on object of type 'Class'}}
+}
+@end
OpenPOWER on IntegriCloud