Lines Matching refs:Ivar
618 ObjCIvarDecl *ivar) {
619 if (property->isInvalidDecl() || ivar->isInvalidDecl()) return;
621 QualType ivarType = ivar->getType();
637 // If the ivar is private, and it's implicitly __unsafe_unretained
643 ivar->getAccessControl() == ObjCIvarDecl::Private) {
649 ivar->setType(ivarType);
656 S.Diag(ivar->getLocation(), diag::err_arc_strong_property_ownership)
658 << ivar->getDeclName()
663 S.Diag(ivar->getLocation(), diag::error_weak_property)
665 << ivar->getDeclName();
669 S.Diag(ivar->getLocation(), diag::err_arc_assign_property_ownership)
671 << ivar->getDeclName()
692 /// 'ivar's attribute, if any. If no backing 'ivar', property's
695 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {
702 if (!ivar) {
703 // if no backing ivar, make property 'strong'.
707 // property assumes owenership of backing ivar.
708 QualType ivarType = ivar->getType();
913 ObjCIvarDecl *Ivar = 0;
916 // Check that we have a valid, previously declared ivar for @synthesize
921 // Check that this is a previously declared 'ivar' in 'IDecl' interface
923 Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared);
938 setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);
944 // Add GC __weak to the ivar type if the property is weak.
958 // an ivar matching property name and issue warning; since this
959 // is the most common case of not using an ivar used for backing
968 << PropertyId << (Ivar == 0) << PropertyIvar
975 if (!Ivar) {
976 // In ARC, give the ivar a lifetime qualifier based on the
1023 Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl,
1029 Ivar->setInvalidDecl();
1030 ClassImpDecl->addDecl(Ivar);
1031 IDecl->makeDeclVisibleInContext(Ivar);
1041 << property->getDeclName() << Ivar->getDeclName()
1043 Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
1044 << Ivar << Ivar->getName();
1047 property->setPropertyIvarDecl(Ivar);
1049 QualType IvarType = Context.getCanonicalType(Ivar->getType());
1051 // Check that type of property and its ivar are type compatible.
1067 << Ivar->getDeclName() << IvarType;
1068 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1082 << Ivar->getDeclName() << IvarType;
1083 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1091 << property->getDeclName() << Ivar->getDeclName();
1092 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1100 << property->getDeclName() << Ivar->getDeclName();
1105 checkARCPropertyImpl(*this, PropertyLoc, property, Ivar);
1117 Ivar, PropertyIvarLoc);
1125 Ivar->getType()->isRecordType()) {
1126 // For Objective-C++, need to synthesize the AST for the IVAR object to be
1136 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), PropertyDiagLoc,
1162 Ivar->getType()->isRecordType()) {
1171 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), PropertyDiagLoc,
1220 // Diagnose if an ivar was lazily synthesdized due to a previous
1222 // but it requires an ivar of different name.
1224 ObjCIvarDecl *Ivar = 0;
1226 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1229 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1231 // Issue diagnostics only if Ivar belongs to current class.
1232 if (Ivar && Ivar->getSynthesize() &&
1234 Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
1236 Ivar->setInvalidDecl();
1546 /// an ivar synthesized for 'Method' and 'Method' is a property accessor
1639 /* ivar = */ Prop->getDefaultSynthIvarName(Context),
2034 // its life time will be determined by its backing ivar.