Home | History | Annotate | Download | only in Sema

Lines Matching defs:Ivar

699                                  ObjCIvarDecl *ivar) {
700 if (property->isInvalidDecl() || ivar->isInvalidDecl()) return;
702 QualType ivarType = ivar->getType();
713 // None isn't a valid lifetime for an object ivar in ARC, and
720 // If the ivar is private, and it's implicitly __unsafe_unretained
726 ivar->getAccessControl() == ObjCIvarDecl::Private) {
732 ivar->setType(ivarType);
739 S.Diag(ivar->getLocation(), diag::err_arc_strong_property_ownership)
741 << ivar->getDeclName()
746 S.Diag(ivar->getLocation(), diag::error_weak_property)
748 << ivar->getDeclName();
752 S.Diag(ivar->getLocation(), diag::err_arc_assign_property_ownership)
754 << ivar->getDeclName()
775 /// 'ivar's attribute, if any. If no backing 'ivar', property's
778 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {
785 if (!ivar) {
786 // if no backing ivar, make property 'strong'.
790 // property assumes owenership of backing ivar.
791 QualType ivarType = ivar->getType();
1006 ObjCIvarDecl *Ivar = nullptr;
1009 // Check that we have a valid, previously declared ivar for @synthesize
1014 // Check that this is a previously declared 'ivar' in 'IDecl' interface
1016 Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared);
1031 setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);
1039 // Add GC __weak to the ivar type if the property is weak.
1054 // Only complain here when synthesizing an ivar.
1055 if (!Ivar) {
1062 CompleteTypeErr = true; // suppress later diagnostics about the ivar
1082 // an ivar matching property name and issue warning; since this
1083 // is the most common case of not using an ivar used for backing
1092 << PropertyId << (Ivar == nullptr) << PropertyIvar
1099 if (!Ivar) {
1100 // In ARC, give the ivar a lifetime qualifier based on the
1124 Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl,
1134 Ivar->setInvalidDecl();
1136 Ivar->setInvalidDecl();
1137 ClassImpDecl->addDecl(Ivar);
1138 IDecl->makeDeclVisibleInContext(Ivar);
1148 << property->getDeclName() << Ivar->getDeclName()
1150 Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
1151 << Ivar << Ivar->getName();
1154 property->setPropertyIvarDecl(Ivar);
1156 QualType IvarType = Context.getCanonicalType(Ivar->getType());
1158 // Check that type of property and its ivar are type compatible.
1174 << Ivar->getDeclName() << IvarType;
1175 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1189 << Ivar->getDeclName() << IvarType;
1190 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1198 << property->getDeclName() << Ivar->getDeclName();
1199 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1207 << property->getDeclName() << Ivar->getDeclName();
1212 Ivar->getType().getObjCLifetime())
1213 checkARCPropertyImpl(*this, PropertyLoc, property, Ivar);
1225 Ivar, PropertyIvarLoc);
1233 Ivar->getType()->isRecordType()) {
1234 // For Objective-C++, need to synthesize the AST for the IVAR object to be
1248 new (Context) ObjCIvarRefExpr(Ivar,
1249 Ivar->getUsageType(SelfDecl->getType()),
1251 Ivar->getLocation(),
1287 Ivar->getType()->isRecordType()) {
1300 new (Context) ObjCIvarRefExpr(Ivar,
1301 Ivar->getUsageType(SelfDecl->getType()),
1303 Ivar->getLocation(),
1352 // Diagnose if an ivar was lazily synthesdized due to a previous
1354 // but it requires an ivar of different name.
1356 ObjCIvarDecl *Ivar = nullptr;
1358 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1361 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1363 // Issue diagnostics only if Ivar belongs to current class.
1364 if (Ivar && Ivar->getSynthesize() &&
1366 Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
1368 Ivar->setInvalidDecl();
1579 /// an ivar synthesized for 'Method' and 'Method' is a property accessor
1709 /* ivar = */ Prop->getDefaultSynthIvarName(Context),