Home | History | Annotate | Download | only in Sema

Lines Matching refs:ivar

644                                  ObjCIvarDecl *ivar) {
645 if (property->isInvalidDecl() || ivar->isInvalidDecl()) return;
647 QualType ivarType = ivar->getType();
663 // If the ivar is private, and it's implicitly __unsafe_unretained
669 ivar->getAccessControl() == ObjCIvarDecl::Private) {
675 ivar->setType(ivarType);
682 S.Diag(ivar->getLocation(), diag::err_arc_strong_property_ownership)
684 << ivar->getDeclName()
689 S.Diag(ivar->getLocation(), diag::error_weak_property)
691 << ivar->getDeclName();
695 S.Diag(ivar->getLocation(), diag::err_arc_assign_property_ownership)
697 << ivar->getDeclName()
718 /// 'ivar's attribute, if any. If no backing 'ivar', property's
721 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {
728 if (!ivar) {
729 // if no backing ivar, make property 'strong'.
733 // property assumes owenership of backing ivar.
734 QualType ivarType = ivar->getType();
917 ObjCIvarDecl *Ivar = nullptr;
920 // Check that we have a valid, previously declared ivar for @synthesize
925 // Check that this is a previously declared 'ivar' in 'IDecl' interface
927 Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared);
942 setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);
948 // Add GC __weak to the ivar type if the property is weak.
962 // an ivar matching property name and issue warning; since this
963 // is the most common case of not using an ivar used for backing
972 << PropertyId << (Ivar == nullptr) << PropertyIvar
979 if (!Ivar) {
980 // In ARC, give the ivar a lifetime qualifier based on the
1029 Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl,
1039 Ivar->setInvalidDecl();
1041 Ivar->setInvalidDecl();
1042 ClassImpDecl->addDecl(Ivar);
1043 IDecl->makeDeclVisibleInContext(Ivar);
1053 << property->getDeclName() << Ivar->getDeclName()
1055 Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
1056 << Ivar << Ivar->getName();
1059 property->setPropertyIvarDecl(Ivar);
1061 QualType IvarType = Context.getCanonicalType(Ivar->getType());
1063 // Check that type of property and its ivar are type compatible.
1079 << Ivar->getDeclName() << IvarType;
1080 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1094 << Ivar->getDeclName() << IvarType;
1095 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1103 << property->getDeclName() << Ivar->getDeclName();
1104 Diag(Ivar->getLocation(), diag::note_ivar_decl);
1112 << property->getDeclName() << Ivar->getDeclName();
1117 checkARCPropertyImpl(*this, PropertyLoc, property, Ivar);
1129 Ivar, PropertyIvarLoc);
1137 Ivar->getType()->isRecordType()) {
1138 // For Objective-C++, need to synthesize the AST for the IVAR object to be
1152 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), PropertyDiagLoc,
1153 Ivar->getLocation(),
1189 Ivar->getType()->isRecordType()) {
1202 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), PropertyDiagLoc,
1203 Ivar->getLocation(),
1252 // Diagnose if an ivar was lazily synthesdized due to a previous
1254 // but it requires an ivar of different name.
1256 ObjCIvarDecl *Ivar = nullptr;
1258 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1261 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
1263 // Issue diagnostics only if Ivar belongs to current class.
1264 if (Ivar && Ivar->getSynthesize() &&
1266 Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
1268 Ivar->setInvalidDecl();
1478 /// an ivar synthesized for 'Method' and 'Method' is a property accessor
1596 /* ivar = */ Prop->getDefaultSynthIvarName(Context),
2094 // its life time will be determined by its backing ivar.