summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/default-synthesize.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-04-21 18:57:20 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-04-21 18:57:20 +0000
commitd502a94461b81fd9f5d5c5df37ab3d7415bc72b1 (patch)
tree668816577840073e391687f8f8ddd66a0fd64846 /test/SemaObjC/default-synthesize.m
parent9a68a67c6ae4982001815cc04f69b8781058263a (diff)
Improve on source location of diagnostic when default
property synthesis is using a super class ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/default-synthesize.m')
-rw-r--r--test/SemaObjC/default-synthesize.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/default-synthesize.m b/test/SemaObjC/default-synthesize.m
index 45a3710dcf..b892dfadf4 100644
--- a/test/SemaObjC/default-synthesize.m
+++ b/test/SemaObjC/default-synthesize.m
@@ -79,3 +79,17 @@
}
@end
+@protocol TopProtocol
+ @property (readonly) id myString;
+@end
+
+@interface TopClass <TopProtocol>
+{
+ id myString; // expected-note {{previously declared 'myString' here}}
+}
+@end
+
+@interface SubClass : TopClass <TopProtocol>
+@end
+
+@implementation SubClass @end // expected-error {{property 'myString' attempting to use ivar 'myString' declared in super class 'TopClass'}}