Lines Matching full:attributes
33 /// getImpliedARCOwnership - Given a set of property attributes and a
37 /// Returns OCL_None if the attributes as stated do not imply an ownership.
180 unsigned Attributes = ODS.getPropertyAttributes();
181 FD.D.setObjCWeakProperty((Attributes & ObjCPropertyAttribute::kind_weak) !=
185 if (!getOwnershipRule(Attributes)) {
186 Attributes |= deducePropertyOwnershipFromType(SemaRef, T);
188 bool isReadWrite = ((Attributes & ObjCPropertyAttribute::kind_readwrite) ||
190 !(Attributes & ObjCPropertyAttribute::kind_readonly));
201 isReadWrite, Attributes,
212 ODS.getSetterNameLoc(), isReadWrite, Attributes,
219 // Validate the attributes on the @property.
220 CheckObjCPropertyAttributes(Res, AtLoc, Attributes,
256 // are meant to override some of the attributes and checking has already done
272 makePropertyAttributesAsWritten(unsigned Attributes) {
274 if (Attributes & ObjCPropertyAttribute::kind_readonly)
276 if (Attributes & ObjCPropertyAttribute::kind_readwrite)
278 if (Attributes & ObjCPropertyAttribute::kind_getter)
280 if (Attributes & ObjCPropertyAttribute::kind_setter)
282 if (Attributes & ObjCPropertyAttribute::kind_assign)
284 if (Attributes & ObjCPropertyAttribute::kind_retain)
286 if (Attributes & ObjCPropertyAttribute::kind_strong)
288 if (Attributes & ObjCPropertyAttribute::kind_weak)
290 if (Attributes & ObjCPropertyAttribute::kind_copy)
292 if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained)
294 if (Attributes & ObjCPropertyAttribute::kind_nonatomic)
296 if (Attributes & ObjCPropertyAttribute::kind_atomic)
298 if (Attributes & ObjCPropertyAttribute::kind_class)
300 if (Attributes & ObjCPropertyAttribute::kind_direct)
408 unsigned &Attributes, const unsigned AttributesAsWritten, QualType T,
425 (Attributes & ObjCPropertyAttribute::kind_class);
450 (Attributes & ObjCPropertyAttribute::kind_readwrite) &&
472 Attributes |= ObjCPropertyAttribute::kind_getter;
478 unsigned NewOwnership = getOwnershipRule(Attributes);
487 Attributes = (Attributes & ~OwnershipMask) | ExistingOwnership;
491 if ((Attributes & ObjCPropertyAttribute::kind_weak) &&
507 Attributes, AttributesAsWritten,
555 const unsigned Attributes, const unsigned AttributesAsWritten, QualType T,
564 if (Attributes & (ObjCPropertyAttribute::kind_assign |
567 } else if (getOwnershipRule(Attributes) || !isReadWrite) {
577 !(Attributes & ObjCPropertyAttribute::kind_assign)) {
607 (Attributes & ObjCPropertyAttribute::kind_class);
635 if (Attributes & ObjCPropertyAttribute::kind_readonly)
638 if (Attributes & ObjCPropertyAttribute::kind_getter)
641 if (Attributes & ObjCPropertyAttribute::kind_setter)
647 if (Attributes & ObjCPropertyAttribute::kind_retain)
650 if (Attributes & ObjCPropertyAttribute::kind_strong)
653 if (Attributes & ObjCPropertyAttribute::kind_weak)
656 if (Attributes & ObjCPropertyAttribute::kind_copy)
659 if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained)
665 // In the semantic attributes, one of nonatomic or atomic is always set.
666 if (Attributes & ObjCPropertyAttribute::kind_nonatomic)
672 if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained)
682 if (Attributes & ObjCPropertyAttribute::kind_nullability)
685 if (Attributes & ObjCPropertyAttribute::kind_null_resettable)
688 if (Attributes & ObjCPropertyAttribute::kind_class)
691 if ((Attributes & ObjCPropertyAttribute::kind_direct) ||
714 // The lifetime implied by the property's attributes.
781 /// This routine evaludates life-time attributes for a 'readonly'
820 /// mismatched types or attributes, since any of them can be candidate for
881 // Verify the property attributes.
949 // Promote the warning to an error if there are incompatible attributes or
998 /// Determine whether any storage attributes were written on the property.
1277 // property attributes.
1610 /// attributes and types and warns on a variety of inconsistencies.
2162 unsigned Attributes = Property->getPropertyAttributes();
2192 if ((Attributes & ObjCPropertyAttribute::kind_nonatomic) ||
2193 !(Attributes & ObjCPropertyAttribute::kind_readwrite))
2339 /// AddPropertyAttrs - Propagates attributes from a property to the
2343 // Should we just clone all attributes over?
2620 unsigned &Attributes,
2626 if ((Attributes & ObjCPropertyAttribute::kind_readonly) &&
2627 (Attributes & ObjCPropertyAttribute::kind_readwrite))
2635 if ((Attributes &
2642 << (Attributes & ObjCPropertyAttribute::kind_weak
2644 : Attributes & ObjCPropertyAttribute::kind_copy
2647 Attributes &=
2655 if ((Attributes & ObjCPropertyAttribute::kind_assign) &&
2656 !(Attributes & ObjCPropertyAttribute::kind_unsafe_unretained) &&
2663 if (Attributes & ObjCPropertyAttribute::kind_assign) {
2664 if (Attributes & ObjCPropertyAttribute::kind_copy) {
2667 Attributes &= ~ObjCPropertyAttribute::kind_copy;
2669 if (Attributes & ObjCPropertyAttribute::kind_retain) {
2672 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2674 if (Attributes & ObjCPropertyAttribute::kind_strong) {
2677 Attributes &= ~ObjCPropertyAttribute::kind_strong;
2680 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2683 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2687 } else if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained) {
2688 if (Attributes & ObjCPropertyAttribute::kind_copy) {
2691 Attributes &= ~ObjCPropertyAttribute::kind_copy;
2693 if (Attributes & ObjCPropertyAttribute::kind_retain) {
2696 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2698 if (Attributes & ObjCPropertyAttribute::kind_strong) {
2701 Attributes &= ~ObjCPropertyAttribute::kind_strong;
2704 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2707 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2709 } else if (Attributes & ObjCPropertyAttribute::kind_copy) {
2710 if (Attributes & ObjCPropertyAttribute::kind_retain) {
2713 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2715 if (Attributes & ObjCPropertyAttribute::kind_strong) {
2718 Attributes &= ~ObjCPropertyAttribute::kind_strong;
2720 if (Attributes & ObjCPropertyAttribute::kind_weak) {
2723 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2725 } else if ((Attributes & ObjCPropertyAttribute::kind_retain) &&
2726 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2729 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2730 } else if ((Attributes & ObjCPropertyAttribute::kind_strong) &&
2731 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2734 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2737 if (Attributes & ObjCPropertyAttribute::kind_weak) {
2746 if ((Attributes & ObjCPropertyAttribute::kind_atomic) &&
2747 (Attributes & ObjCPropertyAttribute::kind_nonatomic)) {
2750 Attributes &= ~ObjCPropertyAttribute::kind_atomic;
2755 if (!getOwnershipRule(Attributes) && PropertyTy->isObjCRetainableType()) {
2756 if (Attributes & ObjCPropertyAttribute::kind_readonly) {
2786 if (!(Attributes & ObjCPropertyAttribute::kind_copy) &&
2787 !(Attributes & ObjCPropertyAttribute::kind_readonly) &&
2791 else if ((Attributes & ObjCPropertyAttribute::kind_retain) &&
2792 !(Attributes & ObjCPropertyAttribute::kind_readonly) &&
2793 !(Attributes & ObjCPropertyAttribute::kind_strong) &&
2797 if ((Attributes & ObjCPropertyAttribute::kind_readonly) &&
2798 (Attributes & ObjCPropertyAttribute::kind_setter))