Home | History | Annotate | Download | only in Sema

Lines Matching refs:Ivar

491                                  ObjCIvarDecl *ivar) {
492 if (property->isInvalidDecl() || ivar->isInvalidDecl()) return;
494 QualType ivarType = ivar->getType();
514 << ivar->getDeclName()
521 << ivar->getDeclName();
527 << ivar->getDeclName()
546 /// 'ivar's attribute, if any. If no backing 'ivar', property's
549 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {
556 if (!ivar) {
557 // if no backing ivar, make property 'strong'.
561 // property assumes owenership of backing ivar.
562 QualType ivarType = ivar->getType();
656 ObjCIvarDecl *Ivar = 0;
657 // Check that we have a valid, previously declared ivar for @synthesize
662 // Check that this is a previously declared 'ivar' in 'IDecl' interface
664 Ivar = IDecl->lookupInstanceVariable(PropertyIvar, ClassDeclared);
672 setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);
678 // Add GC __weak to the ivar type if the property is weak.
691 if (!Ivar) {
692 // In ARC, give the ivar a lifetime qualifier based on the
737 Ivar = ObjCIvarDecl::Create(Context, ClassImpDecl,
742 ClassImpDecl->addDecl(Ivar);
743 IDecl->makeDeclVisibleInContext(Ivar);
744 property->setPropertyIvarDecl(Ivar);
753 << property->getDeclName() << Ivar->getDeclName()
755 Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
756 << Ivar << Ivar->getName();
759 QualType IvarType = Context.getCanonicalType(Ivar->getType());
761 // Check that type of property and its ivar are type compatible.
778 << Ivar->getDeclName() << IvarType;
779 Diag(Ivar->getLocation(), diag::note_ivar_decl);
793 << Ivar->getDeclName() << IvarType;
794 Diag(Ivar->getLocation(), diag::note_ivar_decl);
801 << property->getDeclName() << Ivar->getDeclName();
802 Diag(Ivar->getLocation(), diag::note_ivar_decl);
810 << property->getDeclName() << Ivar->getDeclName();
815 checkARCPropertyImpl(*this, PropertyLoc, property, Ivar);
827 Ivar, PropertyIvarLoc);
831 Ivar->getType()->isRecordType()) {
832 // For Objective-C++, need to synthesize the AST for the IVAR object to be
840 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), AtLoc,
866 && Ivar->getType()->isRecordType()) {
873 new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), AtLoc,
921 // Diagnose if an ivar was lazily synthesdized due to a previous
923 // but it requires an ivar of different name.
925 ObjCIvarDecl *Ivar = 0;
927 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
930 Ivar = IDecl->lookupInstanceVariable(PropertyId, ClassDeclared);
932 // Issue diagnostics only if Ivar belongs to current class.
933 if (Ivar && Ivar->getSynthesize() &&
935 Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
937 Ivar->setInvalidDecl();
1408 /* ivar = */ getDefaultSynthIvarName(Prop, Context),
1772 // its life time will be determined by its backing ivar.