isAssign && !(Attributes & ObjCDeclSpec::DQ_PR_assign))
if (T->isObjCObjectPointerType()) {
QualType InterfaceTy = T->getPointeeType();
- ObjCInterfaceDecl *IDecl=
- InterfaceTy->getAsObjCInterfaceType()->getDecl();
+ if (const ObjCInterfaceType *OIT =
+ InterfaceTy->getAsObjCInterfaceType()) {
+ ObjCInterfaceDecl *IDecl = OIT->getDecl();
if (IDecl)
if (ObjCProtocolDecl* PNSCopying =
LookupProtocol(&Context.Idents.get("NSCopying")))
if (IDecl->ClassImplementsProtocol(PNSCopying, true))
Diag(AtLoc, diag::warn_implements_nscopying)
<< FD.D.getIdentifier();
+ }
}
if (T->isObjCInterfaceType())
Diag(FD.D.getIdentifierLoc(), diag::err_statically_allocated_object);
@interface INTF
@property NSDictionary* undoAction; // expected-warning {{no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed}} // expected-warning {{default assign attribute on property 'undoAction' which implements NSCopying protocol is not appropriate with}}
+ @property id okAction; // expected-warning {{no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed}}
@end