Home | History | Annotate | Download | only in Sema

Lines Matching defs:Ivar

709                                  ObjCIvarDecl *ivar) {
710 if (property->isInvalidDecl() || ivar->isInvalidDecl()) return;
712 QualType ivarType = ivar->getType();
723 // None isn't a valid lifetime for an object ivar in ARC, and
730 // If the ivar is private, and it's implicitly __unsafe_unretained
736 ivar->getAccessControl() == ObjCIvarDecl::Private) {
742 ivar->setType(ivarType);
749 S.Diag(ivar->getLocation(), diag::err_arc_strong_property_ownership)
751 << ivar->getDeclName()
756 S.Diag(ivar->getLocation(), diag::error_weak_property)
758 << ivar->getDeclName();
762 S.Diag(ivar->getLocation(), diag::err_arc_assign_property_ownership)
764 << ivar->getDeclName()
785 /// 'ivar's attribute, if any. If no backing 'ivar', property's
788 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {
795 if (!ivar) {
796 // if no backing ivar, make property 'strong'.
800 // property assumes owenership of backing ivar.
801 QualType ivarType = ivar->getType();
1021 ObjCIvarDecl *Ivar = nullptr;
1024 // Check that we have a valid, previously declared ivar for @synthesize
1029 // Check that this is a previously declared 'ivar' in 'IDecl' interface
1031 Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared);
1046 setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);
1054 // Add GC __weak to the ivar type if the property is weak.
1069 // Only complain here when synthesizing an ivar.
1070 if (!Ivar) {
1077 CompleteTypeErr = true; // suppress later diagnostics about the ivar
1097 // an ivar matching property name and issue warning; since this
1098 // is the most common case of not using an ivar used for backing
1107 << PropertyId << (Ivar == nullptr) << PropertyIvar
1114 if (!Ivar) {
1115 // In ARC, give the ivar a lifetime qualifier based on the
1139 Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl,
1149 Ivar->setInvalidDecl();
1151 Ivar->setInvalidDecl();
1152 ClassImpDecl->addDecl(Ivar);
1153 IDecl->makeDeclVisibleInContext(Ivar);
1163 << property->getDeclName() << Ivar->getDeclName()
1165 Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
1166 << Ivar << Ivar->getName();
1169 property->setPropertyIvarDecl(Ivar);
1171 QualType IvarType = Context.getCanonicalType(Ivar->getType());
1173 // Check that type of property and its ivar are type compatible.
1189 << Ivar->getDeclName() << IvarType;
1190 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1204 << Ivar->getDeclName() << IvarType;
1205 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1213 << property->getDeclName() << Ivar->getDeclName();
1214 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1222 << property->getDeclName() << Ivar->getDeclName();
1227 Ivar->getType().getObjCLifetime())
1228 checkARCPropertyImpl(*this, PropertyLoc, property, Ivar);
1240 Ivar, PropertyIvarLoc);
1248 Ivar->getType()->isRecordType()) {
1249 // For Objective-C++, need to synthesize the AST for the IVAR object to be
1263 new (Context) ObjCIvarRefExpr(Ivar,
1264 Ivar->getUsageType(SelfDecl->getType()),
1266 Ivar->getLocation(),
1302 Ivar->getType()->isRecordType()) {
1315 new (Context) ObjCIvarRefExpr(Ivar,
1316 Ivar->getUsageType(SelfDecl->getType()),
1318 Ivar->getLocation(),
1367 // Diagnose if an ivar was lazily synthesdized due to a previous
1369 // but it requires an ivar of different name.
1371 ObjCIvarDecl *Ivar = nullptr;
1373 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1376 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1378 // Issue diagnostics only if Ivar belongs to current class.
1379 if (Ivar && Ivar->getSynthesize() &&
1381 Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
1383 Ivar->setInvalidDecl();
1615 /// an ivar synthesized for 'Method' and 'Method' is a property accessor
1748 /* ivar = */ Prop->getDefaultSynthIvarName(Context),