• Home
  • Raw
  • Download

Lines Matching refs:ObjCPropertyDecl

40                                ObjCPropertyDecl::PropertyAttributeKind attrs,  in getImpliedARCOwnership()
44 if (attrs & (ObjCPropertyDecl::OBJC_PR_retain | in getImpliedARCOwnership()
45 ObjCPropertyDecl::OBJC_PR_strong | in getImpliedARCOwnership()
46 ObjCPropertyDecl::OBJC_PR_copy)) { in getImpliedARCOwnership()
48 } else if (attrs & ObjCPropertyDecl::OBJC_PR_weak) { in getImpliedARCOwnership()
50 } else if (attrs & ObjCPropertyDecl::OBJC_PR_unsafe_unretained) { in getImpliedARCOwnership()
56 if (attrs & ObjCPropertyDecl::OBJC_PR_assign && in getImpliedARCOwnership()
67 ObjCPropertyDecl *property) { in checkPropertyDeclWithOwnership()
70 ObjCPropertyDecl::PropertyAttributeKind propertyKind in checkPropertyDeclWithOwnership()
84 ObjCPropertyDecl::PropertyAttributeKind attr; in checkPropertyDeclWithOwnership()
86 attr = ObjCPropertyDecl::OBJC_PR_strong; in checkPropertyDeclWithOwnership()
88 attr = ObjCPropertyDecl::OBJC_PR_weak; in checkPropertyDeclWithOwnership()
91 attr = ObjCPropertyDecl::OBJC_PR_unsafe_unretained; in checkPropertyDeclWithOwnership()
110 CheckPropertyAgainstProtocol(Sema &S, ObjCPropertyDecl *Prop, in CheckPropertyAgainstProtocol()
120 if (ObjCPropertyDecl *ProtoProp = dyn_cast<ObjCPropertyDecl>(R[I])) { in CheckPropertyAgainstProtocol()
157 (ObjCPropertyDecl::OBJC_PR_assign |
158 ObjCPropertyDecl::OBJC_PR_retain |
159 ObjCPropertyDecl::OBJC_PR_copy |
160 ObjCPropertyDecl::OBJC_PR_weak |
161 ObjCPropertyDecl::OBJC_PR_strong |
162 ObjCPropertyDecl::OBJC_PR_unsafe_unretained);
169 if (result & (ObjCPropertyDecl::OBJC_PR_assign | in getOwnershipRule()
170 ObjCPropertyDecl::OBJC_PR_unsafe_unretained)) { in getOwnershipRule()
171 result |= ObjCPropertyDecl::OBJC_PR_assign | in getOwnershipRule()
172 ObjCPropertyDecl::OBJC_PR_unsafe_unretained; in getOwnershipRule()
199 ObjCPropertyDecl *Res = nullptr; in ActOnProperty()
239 if (ObjCPropertyDecl *SuperProp = dyn_cast<ObjCPropertyDecl>(R[I])) { in ActOnProperty()
279 static ObjCPropertyDecl::PropertyAttributeKind
283 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_readonly; in makePropertyAttributesAsWritten()
285 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_readwrite; in makePropertyAttributesAsWritten()
287 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_getter; in makePropertyAttributesAsWritten()
289 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_setter; in makePropertyAttributesAsWritten()
291 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_assign; in makePropertyAttributesAsWritten()
293 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_retain; in makePropertyAttributesAsWritten()
295 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_strong; in makePropertyAttributesAsWritten()
297 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_weak; in makePropertyAttributesAsWritten()
299 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_copy; in makePropertyAttributesAsWritten()
301 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_unsafe_unretained; in makePropertyAttributesAsWritten()
303 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_nonatomic; in makePropertyAttributesAsWritten()
305 attributesAsWritten |= ObjCPropertyDecl::OBJC_PR_atomic; in makePropertyAttributesAsWritten()
307 return (ObjCPropertyDecl::PropertyAttributeKind)attributesAsWritten; in makePropertyAttributesAsWritten()
342 ObjCPropertyDecl *OldProperty, in checkAtomicPropertyMismatch()
343 ObjCPropertyDecl *NewProperty, in checkAtomicPropertyMismatch()
347 (OldProperty->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_nonatomic) in checkAtomicPropertyMismatch()
350 (NewProperty->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_nonatomic) in checkAtomicPropertyMismatch()
356 auto isImplicitlyReadonlyAtomic = [](ObjCPropertyDecl *Property) -> bool { in checkAtomicPropertyMismatch()
359 if ((Attrs & ObjCPropertyDecl::OBJC_PR_readonly) == 0) return false; in checkAtomicPropertyMismatch()
362 if (Attrs & ObjCPropertyDecl::OBJC_PR_nonatomic) return false; in checkAtomicPropertyMismatch()
366 ObjCPropertyDecl::OBJC_PR_atomic) in checkAtomicPropertyMismatch()
375 (ObjCPropertyDecl::OBJC_PR_atomic | ObjCPropertyDecl::OBJC_PR_nonatomic); in checkAtomicPropertyMismatch()
381 Attrs |= ObjCPropertyDecl::OBJC_PR_atomic; in checkAtomicPropertyMismatch()
383 Attrs |= ObjCPropertyDecl::OBJC_PR_nonatomic; in checkAtomicPropertyMismatch()
409 ObjCPropertyDecl *
436 ObjCPropertyDecl *PIDecl = in HandlePropertyInClassExtension()
459 ObjCPropertyDecl::OBJC_PR_readwrite) in HandlePropertyInClassExtension()
498 if ((Attributes & ObjCPropertyDecl::OBJC_PR_weak) && in HandlePropertyInClassExtension()
500 & ObjCPropertyDecl::OBJC_PR_weak) && in HandlePropertyInClassExtension()
510 ObjCPropertyDecl *PDecl = CreatePropertyDecl(S, CDecl, AtLoc, LParenLoc, in HandlePropertyInClassExtension()
555 ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, in CreatePropertyDecl()
610 ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, DC, in CreatePropertyDecl()
615 if (ObjCPropertyDecl *prevDecl = in CreatePropertyDecl()
616 ObjCPropertyDecl::findPropertyDecl(DC, PropertyId)) { in CreatePropertyDecl()
642 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly); in CreatePropertyDecl()
645 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_getter); in CreatePropertyDecl()
648 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_setter); in CreatePropertyDecl()
651 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readwrite); in CreatePropertyDecl()
654 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_retain); in CreatePropertyDecl()
657 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_strong); in CreatePropertyDecl()
660 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_weak); in CreatePropertyDecl()
663 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_copy); in CreatePropertyDecl()
666 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_unsafe_unretained); in CreatePropertyDecl()
669 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_assign); in CreatePropertyDecl()
673 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nonatomic); in CreatePropertyDecl()
675 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_atomic); in CreatePropertyDecl()
679 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_assign); in CreatePropertyDecl()
681 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_unsafe_unretained); in CreatePropertyDecl()
684 PDecl->setPropertyImplementation(ObjCPropertyDecl::Required); in CreatePropertyDecl()
686 PDecl->setPropertyImplementation(ObjCPropertyDecl::Optional); in CreatePropertyDecl()
689 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nullability); in CreatePropertyDecl()
692 PDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_null_resettable); in CreatePropertyDecl()
698 ObjCPropertyDecl *property, in checkARCPropertyImpl()
756 & ObjCPropertyDecl::OBJC_PR_assign) != 0); in checkARCPropertyImpl()
778 ObjCPropertyDecl *property, ObjCIvarDecl *ivar) { in setImpliedPropertyAttributeForReadOnlyProperty()
787 property->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_strong); in setImpliedPropertyAttributeForReadOnlyProperty()
794 property->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_strong); in setImpliedPropertyAttributeForReadOnlyProperty()
796 property->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_weak); in setImpliedPropertyAttributeForReadOnlyProperty()
806 ObjCPropertyDecl *Property) { in DiagnosePropertyMismatchDeclInProtocols()
828 ObjCPropertyDecl *Prop = I->second; in DiagnosePropertyMismatchDeclInProtocols()
850 static bool hasWrittenStorageAttribute(ObjCPropertyDecl *Prop) { in hasWrittenStorageAttribute()
867 if (ObjCPropertyDecl *OrigProp = dyn_cast<ObjCPropertyDecl>(Found)) in hasWrittenStorageAttribute()
873 if (ObjCPropertyDecl *OrigProp = in hasWrittenStorageAttribute()
904 ObjCPropertyDecl *property = nullptr; in ActOnPropertyImplDecl()
924 if ((PIkind & (ObjCPropertyDecl::OBJC_PR_atomic | in ActOnPropertyImplDecl()
925 ObjCPropertyDecl::OBJC_PR_nonatomic) ) == 0) { in ActOnPropertyImplDecl()
942 (PIkind & ObjCPropertyDecl::OBJC_PR_readonly) && in ActOnPropertyImplDecl()
951 if (ObjCPropertyDecl *ExtProp = dyn_cast<ObjCPropertyDecl>(R[0])) { in ActOnPropertyImplDecl()
953 if (PIkind & ObjCPropertyDecl::OBJC_PR_readwrite) { in ActOnPropertyImplDecl()
1029 ObjCPropertyDecl::OBJC_PR_readonly) && in ActOnPropertyImplDecl()
1034 ObjCPropertyDecl::PropertyAttributeKind kind in ActOnPropertyImplDecl()
1038 if (kind & ObjCPropertyDecl::OBJC_PR_weak) { in ActOnPropertyImplDecl()
1109 !(kind & ObjCPropertyDecl::OBJC_PR_strong)) { in ActOnPropertyImplDecl()
1314 ObjCPropertyDecl::OBJC_PR_atomic) { in ActOnPropertyImplDecl()
1401 Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, in DiagnosePropertyMismatch()
1402 ObjCPropertyDecl *SuperProperty, in DiagnosePropertyMismatch()
1405 ObjCPropertyDecl::PropertyAttributeKind CAttr = in DiagnosePropertyMismatch()
1407 ObjCPropertyDecl::PropertyAttributeKind SAttr = in DiagnosePropertyMismatch()
1417 if ((CAttr & ObjCPropertyDecl::OBJC_PR_readonly) in DiagnosePropertyMismatch()
1418 && (SAttr & ObjCPropertyDecl::OBJC_PR_readwrite)) in DiagnosePropertyMismatch()
1421 if ((CAttr & ObjCPropertyDecl::OBJC_PR_copy) in DiagnosePropertyMismatch()
1422 != (SAttr & ObjCPropertyDecl::OBJC_PR_copy)) in DiagnosePropertyMismatch()
1425 else if (!(SAttr & ObjCPropertyDecl::OBJC_PR_readonly)){ in DiagnosePropertyMismatch()
1428 (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_strong)); in DiagnosePropertyMismatch()
1431 (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_strong)); in DiagnosePropertyMismatch()
1475 bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, in DiagnosePropertyAccessorMismatch()
1548 ObjCPropertyDecl *PropertyFromSuper = SuperPropMap[Prop->getIdentifier()]; in CollectImmediateProperties()
1553 ObjCPropertyDecl *&PropEntry = PropMap[Prop->getIdentifier()]; in CollectImmediateProperties()
1611 ObjCPropertyDecl *Prop) { in SuperClassImplementsProperty()
1614 if (Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readonly) in SuperClassImplementsProperty()
1645 ObjCPropertyDecl *Prop = PropertyOrder[i]; in DefaultSynthesizeProperties()
1648 Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional) in DefaultSynthesizeProperties()
1654 if (Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readonly) in DefaultSynthesizeProperties()
1667 ObjCPropertyDecl *PropInSuperClass = SuperPropMap[Prop->getIdentifier()]; in DefaultSynthesizeProperties()
1684 if ((Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readwrite) && in DefaultSynthesizeProperties()
1686 ObjCPropertyDecl::OBJC_PR_readonly) && in DefaultSynthesizeProperties()
1735 ObjCPropertyDecl *Prop, in DiagnoseUnimplementedAccessor()
1820 llvm::DenseSet<ObjCPropertyDecl *> PropImplMap; in DiagnoseUnimplementedProperties()
1844 ObjCPropertyDecl *Prop = P->second; in DiagnoseUnimplementedProperties()
1847 Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional || in DiagnoseUnimplementedProperties()
1871 ObjCPropertyDecl::OBJC_PR_null_resettable) && in diagnoseNullResettableSynthesizedSetters()
1904 const ObjCPropertyDecl *Property = I->second; in AtomicPropertySetterGetterRules()
1912 if (!(AttributesAsWritten & ObjCPropertyDecl::OBJC_PR_atomic) && in AtomicPropertySetterGetterRules()
1913 !(AttributesAsWritten & ObjCPropertyDecl::OBJC_PR_nonatomic)) { in AtomicPropertySetterGetterRules()
1932 if ((Attributes & ObjCPropertyDecl::OBJC_PR_nonatomic) || in AtomicPropertySetterGetterRules()
1933 !(Attributes & ObjCPropertyDecl::OBJC_PR_readwrite)) in AtomicPropertySetterGetterRules()
1952 !(AttributesAsWritten & ObjCPropertyDecl::OBJC_PR_atomic)) { in AtomicPropertySetterGetterRules()
1982 const ObjCPropertyDecl *PD = PID->getPropertyDecl(); in DiagnoseOwningPropertyGetterSynthesis()
2069 ObjCPropertyDecl *Property) { in AddPropertyAttrs()
2083 void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property) { in ProcessPropertyDecl()
2108 ObjCPropertyDecl::PropertyAttributeKind CAttr = in ProcessPropertyDecl()
2110 if ((!(CAttr & ObjCPropertyDecl::OBJC_PR_readonly)) && in ProcessPropertyDecl()
2141 ObjCPropertyDecl::OBJC_PR_null_resettable) { in ProcessPropertyDecl()
2157 ObjCPropertyDecl::Optional) ? in ProcessPropertyDecl()
2203 ObjCPropertyDecl::Optional) ? in ProcessPropertyDecl()
2211 ObjCPropertyDecl::OBJC_PR_null_resettable) { in ProcessPropertyDecl()
2291 ObjCPropertyDecl *PropertyDecl = cast<ObjCPropertyDecl>(PDecl); in CheckObjCPropertyAttributes()
2408 PropertyDecl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_strong); in CheckObjCPropertyAttributes()