Home | History | Annotate | Download | only in Sema

Lines Matching refs:ivar

626                                  ObjCIvarDecl *ivar) {
627 if (property->isInvalidDecl() || ivar->isInvalidDecl()) return;
629 QualType ivarType = ivar->getType();
645 // If the ivar is private, and it's implicitly __unsafe_unretained
651 ivar->getAccessControl() == ObjCIvarDecl::Private) {
657 ivar->setType(ivarType);
664 S.Diag(ivar->getLocation(), diag::err_arc_strong_property_ownership)
666 << ivar->getDeclName()
671 S.Diag(ivar->getLocation(), diag::error_weak_property)
673 << ivar->getDeclName();
677 S.Diag(ivar->getLocation(), diag::err_arc_assign_property_ownership)
679 << ivar->getDeclName()
700 /// 'ivar's attribute, if any. If no backing 'ivar', property's
703 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {
710 if (!ivar) {
711 // if no backing ivar, make property 'strong'.
715 // property assumes owenership of backing ivar.
716 QualType ivarType = ivar->getType();
976 ObjCIvarDecl *Ivar = 0;
979 // Check that we have a valid, previously declared ivar for @synthesize
984 // Check that this is a previously declared 'ivar' in 'IDecl' interface
986 Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared);
1001 setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);
1007 // Add GC __weak to the ivar type if the property is weak.
1021 // an ivar matching property name and issue warning; since this
1022 // is the most common case of not using an ivar used for backing
1031 << PropertyId << (Ivar == 0) << PropertyIvar
1038 if (!Ivar) {
1039 // In ARC, give the ivar a lifetime qualifier based on the
1088 Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl,
1098 Ivar->setInvalidDecl();
1100 Ivar->setInvalidDecl();
1101 ClassImpDecl->addDecl(Ivar);
1102 IDecl->makeDeclVisibleInContext(Ivar);
1112 << property->getDeclName() << Ivar->getDeclName()
1114 Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
1115 << Ivar << Ivar->getName();
1118 property->setPropertyIvarDecl(Ivar);
1120 QualType IvarType = Context.getCanonicalType(Ivar->getType());
1122 // Check that type of property and its ivar are type compatible.
1138 << Ivar->getDeclName() << IvarType;
1139 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1153 << Ivar->getDeclName() << IvarType;
1154 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1162 << property->getDeclName() << Ivar->getDeclName();
1163 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1171 << property->getDeclName() << Ivar->getDeclName();
1176 checkARCPropertyImpl(*this, PropertyLoc, property, Ivar);
1188 Ivar, PropertyIvarLoc);
1196 Ivar->getType()->isRecordType()) {
1197 // For Objective-C++, need to synthesize the AST for the IVAR object to be
1207 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), PropertyDiagLoc,
1208 Ivar->getLocation(),
1246 Ivar->getType()->isRecordType()) {
1255 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), PropertyDiagLoc,
1256 Ivar->getLocation(),
1305 // Diagnose if an ivar was lazily synthesdized due to a previous
1307 // but it requires an ivar of different name.
1309 ObjCIvarDecl *Ivar = 0;
1311 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1314 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1316 // Issue diagnostics only if Ivar belongs to current class.
1317 if (Ivar && Ivar->getSynthesize() &&
1319 Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
1321 Ivar->setInvalidDecl();
1527 /// an ivar
1621 /* ivar = */ Prop->getDefaultSynthIvarName(Context),
2052 // its life time will be determined by its backing ivar.