================
@@ -113,7 +113,23 @@ @interface AnotherObject : NSObject {
   // expected-warning@-1{{Instance variable 'dispatch' in 'AnotherObject' is a 
retainable type 'dispatch_queue_t'}}
 }
 @property(nonatomic, strong) NSString *prop_string;
-// expected-warning@-1{{Property 'prop_string' in 'AnotherObject' is a raw 
pointer to retainable type 'NSString'}}
+// expected-warning@-1{{Property 'prop_string' in 'AnotherObject' is a raw 
pointer to retainable type 'NSString'; member variables must be a RetainPtr}}
+@property(nonatomic, readonly) NSString *prop_safe;
+@end
+
+@implementation AnotherObject
+- (NSString *)prop_safe {
+  return nil;
+}
+@end
+
+// No warnings for @interface declaration itself. 
+@interface InterfaceOnlyObject : NSObject
+@property(nonatomic, strong) NSString *prop_string1;
+@property(nonatomic, assign) NSString *prop_string2;
+@property(nonatomic, unsafe_unretained) NSString *prop_string3;
+@property(nonatomic, readonly) NSString *prop_string4;
+
----------------
t-rasmud wrote:

What is the expected behavior for inherited interfaces that have an 
implementation? For example:
```
@interface InterfaceOnlyObjectInherited : InterfaceOnlyObject
@end

@implementation InterfaceOnlyObjectInherited
@end
```

https://github.com/llvm/llvm-project/pull/159947
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to