summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/default-synthesize.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-08-29 18:31:16 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-08-29 18:31:16 +0000
commitb1585c8a9976de3b63b578ebcd17f4ee7bd4a420 (patch)
treea1f76a78d592c1757328aa16b08bbd59256fadb4 /test/SemaObjC/default-synthesize.m
parentf990758c7bf88340ef832db834510f5388506171 (diff)
Objective-C. Tweak diagnosing properties that are not auto-synthesized.
Do not warn when property declared in class's protocol will be auto-synthesized by its uper class implementation because super class has also declared this property while this class has not. Continue to warn if current class has declared the property also (because this declaration will not result in a 2nd synthesis). rdar://18152478 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/default-synthesize.m')
-rw-r--r--test/SemaObjC/default-synthesize.m26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/SemaObjC/default-synthesize.m b/test/SemaObjC/default-synthesize.m
index 4865668af3..d0d3085ba7 100644
--- a/test/SemaObjC/default-synthesize.m
+++ b/test/SemaObjC/default-synthesize.m
@@ -88,7 +88,7 @@
@end
@protocol TopProtocol
- @property (readonly) id myString; // expected-warning {{auto property synthesis will not synthesize property 'myString' because it will be implemented by its superclass}}
+ @property (readonly) id myString; // expected-note {{property declared here}}
@end
@interface TopClass <TopProtocol>
@@ -100,7 +100,7 @@
@interface SubClass : TopClass <TopProtocol>
@end
-@implementation SubClass @end // expected-note {{detected while default synthesizing properties in class implementation}}
+@implementation SubClass @end // expected-warning {{auto property synthesis will not synthesize property 'myString' declared in protocol 'TopProtocol'}}
// rdar://7920807
@interface C @end
@@ -138,3 +138,25 @@
@implementation MyClass // expected-warning {{auto property synthesis will not synthesize property 'requiredString' declared in protocol 'MyProtocol'}}
@end
+
+// rdar://18152478
+@protocol NSObject @end
+@protocol TMSourceManagerDelegate<NSObject>
+@end
+
+@protocol TMSourceManager <NSObject>
+@property (nonatomic, assign) id <TMSourceManagerDelegate> delegate;
+@end
+
+@interface TMSourceManager
+@property (nonatomic, assign) id <TMSourceManagerDelegate> delegate;
+@end
+
+@protocol TMTimeZoneManager <TMSourceManager>
+@end
+
+@interface TimeZoneManager : TMSourceManager <TMTimeZoneManager>
+@end
+
+@implementation TimeZoneManager
+@end