Lines Matching refs:ObjCPropertyAttribute
39 getImpliedARCOwnership(ObjCPropertyAttribute::Kind attrs, QualType type) {
43 (ObjCPropertyAttribute::kind_retain | ObjCPropertyAttribute::kind_strong |
44 ObjCPropertyAttribute::kind_copy)) {
46 } else if (attrs & ObjCPropertyAttribute::kind_weak) {
48 } else if (attrs & ObjCPropertyAttribute::kind_unsafe_unretained) {
54 if (attrs & ObjCPropertyAttribute::kind_assign &&
68 ObjCPropertyAttribute::Kind propertyKind = property->getPropertyAttributes();
81 ObjCPropertyAttribute::Kind attr;
83 attr = ObjCPropertyAttribute::kind_strong;
85 attr = ObjCPropertyAttribute::kind_weak;
88 attr = ObjCPropertyAttribute::kind_unsafe_unretained;
130 return ObjCPropertyAttribute::kind_weak;
137 return ObjCPropertyAttribute::kind_weak;
139 return ObjCPropertyAttribute::kind_strong;
141 return ObjCPropertyAttribute::kind_unsafe_unretained;
153 (ObjCPropertyAttribute::kind_assign | ObjCPropertyAttribute::kind_retain |
154 ObjCPropertyAttribute::kind_copy | ObjCPropertyAttribute::kind_weak |
155 ObjCPropertyAttribute::kind_strong |
156 ObjCPropertyAttribute::kind_unsafe_unretained);
163 if (result & (ObjCPropertyAttribute::kind_assign |
164 ObjCPropertyAttribute::kind_unsafe_unretained)) {
165 result |= ObjCPropertyAttribute::kind_assign |
166 ObjCPropertyAttribute::kind_unsafe_unretained;
181 FD.D.setObjCWeakProperty((Attributes & ObjCPropertyAttribute::kind_weak) !=
188 bool isReadWrite = ((Attributes & ObjCPropertyAttribute::kind_readwrite) ||
190 !(Attributes & ObjCPropertyAttribute::kind_readonly));
271 static ObjCPropertyAttribute::Kind
274 if (Attributes & ObjCPropertyAttribute::kind_readonly)
275 attributesAsWritten |= ObjCPropertyAttribute::kind_readonly;
276 if (Attributes & ObjCPropertyAttribute::kind_readwrite)
277 attributesAsWritten |= ObjCPropertyAttribute::kind_readwrite;
278 if (Attributes & ObjCPropertyAttribute::kind_getter)
279 attributesAsWritten |= ObjCPropertyAttribute::kind_getter;
280 if (Attributes & ObjCPropertyAttribute::kind_setter)
281 attributesAsWritten |= ObjCPropertyAttribute::kind_setter;
282 if (Attributes & ObjCPropertyAttribute::kind_assign)
283 attributesAsWritten |= ObjCPropertyAttribute::kind_assign;
284 if (Attributes & ObjCPropertyAttribute::kind_retain)
285 attributesAsWritten |= ObjCPropertyAttribute::kind_retain;
286 if (Attributes & ObjCPropertyAttribute::kind_strong)
287 attributesAsWritten |= ObjCPropertyAttribute::kind_strong;
288 if (Attributes & ObjCPropertyAttribute::kind_weak)
289 attributesAsWritten |= ObjCPropertyAttribute::kind_weak;
290 if (Attributes & ObjCPropertyAttribute::kind_copy)
291 attributesAsWritten |= ObjCPropertyAttribute::kind_copy;
292 if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained)
293 attributesAsWritten |= ObjCPropertyAttribute::kind_unsafe_unretained;
294 if (Attributes & ObjCPropertyAttribute::kind_nonatomic)
295 attributesAsWritten |= ObjCPropertyAttribute::kind_nonatomic;
296 if (Attributes & ObjCPropertyAttribute::kind_atomic)
297 attributesAsWritten |= ObjCPropertyAttribute::kind_atomic;
298 if (Attributes & ObjCPropertyAttribute::kind_class)
299 attributesAsWritten |= ObjCPropertyAttribute::kind_class;
300 if (Attributes & ObjCPropertyAttribute::kind_direct)
301 attributesAsWritten |= ObjCPropertyAttribute::kind_direct;
303 return (ObjCPropertyAttribute::Kind)attributesAsWritten;
342 ObjCPropertyAttribute::kind_nonatomic) == 0;
344 ObjCPropertyAttribute::kind_nonatomic) == 0;
352 if ((Attrs & ObjCPropertyAttribute::kind_readonly) == 0)
356 if (Attrs & ObjCPropertyAttribute::kind_nonatomic)
361 ObjCPropertyAttribute::kind_atomic)
369 const unsigned AtomicityMask = (ObjCPropertyAttribute::kind_atomic |
370 ObjCPropertyAttribute::kind_nonatomic);
376 Attrs |= ObjCPropertyAttribute::kind_atomic;
378 Attrs |= ObjCPropertyAttribute::kind_nonatomic;
433 (AttributesAsWritten & ObjCPropertyAttribute::kind_class) ||
434 (Attributes & ObjCPropertyAttribute::kind_class);
459 (Attributes & ObjCPropertyAttribute::kind_readwrite) &&
461 ObjCPropertyAttribute::kind_readwrite)
473 if (AttributesAsWritten & ObjCPropertyAttribute::kind_getter) {
481 Attributes |= ObjCPropertyAttribute::kind_getter;
500 if ((Attributes & ObjCPropertyAttribute::kind_weak) &&
502 ObjCPropertyAttribute::kind_weak) &&
579 if (Attributes & (ObjCPropertyAttribute::kind_assign |
580 ObjCPropertyAttribute::kind_unsafe_unretained)) {
592 !(Attributes & ObjCPropertyAttribute::kind_assign)) {
621 (AttributesAsWritten & ObjCPropertyAttribute::kind_class) ||
622 (Attributes & ObjCPropertyAttribute::kind_class);
650 if (Attributes & ObjCPropertyAttribute::kind_readonly)
651 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_readonly);
653 if (Attributes & ObjCPropertyAttribute::kind_getter)
654 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_getter);
656 if (Attributes & ObjCPropertyAttribute::kind_setter)
657 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_setter);
660 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_readwrite);
662 if (Attributes & ObjCPropertyAttribute::kind_retain)
663 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_retain);
665 if (Attributes & ObjCPropertyAttribute::kind_strong)
666 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_strong);
668 if (Attributes & ObjCPropertyAttribute::kind_weak)
669 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_weak);
671 if (Attributes & ObjCPropertyAttribute::kind_copy)
672 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_copy);
674 if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained)
675 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_unsafe_unretained);
678 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_assign);
681 if (Attributes & ObjCPropertyAttribute::kind_nonatomic)
682 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_nonatomic);
684 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_atomic);
687 if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained)
688 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_assign);
690 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_unsafe_unretained);
697 if (Attributes & ObjCPropertyAttribute::kind_nullability)
698 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_nullability);
700 if (Attributes & ObjCPropertyAttribute::kind_null_resettable)
701 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_null_resettable);
703 if (Attributes & ObjCPropertyAttribute::kind_class)
704 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_class);
706 if ((Attributes & ObjCPropertyAttribute::kind_direct) ||
711 PDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_direct);
779 ObjCPropertyAttribute::kind_assign) != 0);
810 property->setPropertyAttributes(ObjCPropertyAttribute::kind_strong);
817 property->setPropertyAttributes(ObjCPropertyAttribute::kind_strong);
819 property->setPropertyAttributes(ObjCPropertyAttribute::kind_weak);
823 ObjCPropertyAttribute::Kind Kind) {
907 (Attr & (ObjCPropertyAttribute::kind_retain |
908 ObjCPropertyAttribute::kind_strong |
909 ObjCPropertyAttribute::kind_copy |
910 ObjCPropertyAttribute::kind_assign |
911 ObjCPropertyAttribute::kind_unsafe_unretained |
912 ObjCPropertyAttribute::kind_weak)) != 0;
915 ObjCPropertyAttribute::kind_copy)) {
916 Diag(OriginalAttributes & ObjCPropertyAttribute::kind_copy, "copy");
921 ObjCPropertyAttribute::kind_retain |
922 ObjCPropertyAttribute::kind_strong)) {
923 Diag(OriginalAttributes & (ObjCPropertyAttribute::kind_retain |
924 ObjCPropertyAttribute::kind_strong),
929 ObjCPropertyAttribute::kind_atomic)) {
930 Diag(OriginalAttributes & ObjCPropertyAttribute::kind_atomic, "atomic");
1121 if ((PIkind & (ObjCPropertyAttribute::kind_atomic |
1122 ObjCPropertyAttribute::kind_nonatomic)) == 0) {
1138 if (Synthesize && (PIkind & ObjCPropertyAttribute::kind_readonly) &&
1147 if (PIkind & ObjCPropertyAttribute::kind_readwrite) {
1224 ObjCPropertyAttribute::kind_readonly) &&
1229 ObjCPropertyAttribute::Kind kind = property->getPropertyAttributes();
1232 if (kind & ObjCPropertyAttribute::kind_weak) {
1303 !(kind & ObjCPropertyAttribute::kind_strong)) {
1540 ObjCPropertyAttribute::kind_atomic) {
1640 ObjCPropertyAttribute::Kind CAttr = Property->getPropertyAttributes();
1641 ObjCPropertyAttribute::Kind SAttr = SuperProperty->getPropertyAttributes();
1650 if ((CAttr & ObjCPropertyAttribute::kind_readonly) &&
1651 (SAttr & ObjCPropertyAttribute::kind_readwrite))
1654 if ((CAttr & ObjCPropertyAttribute::kind_copy) !=
1655 (SAttr & ObjCPropertyAttribute::kind_copy))
1658 else if (!(SAttr & ObjCPropertyAttribute::kind_readonly)) {
1659 unsigned CAttrRetain = (CAttr & (ObjCPropertyAttribute::kind_retain |
1660 ObjCPropertyAttribute::kind_strong));
1661 unsigned SAttrRetain = (SAttr & (ObjCPropertyAttribute::kind_retain |
1662 ObjCPropertyAttribute::kind_strong));
1870 if (Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly)
1913 if (Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly)
1951 ObjCPropertyAttribute::kind_readwrite) &&
1953 ObjCPropertyAttribute::kind_readonly) &&
2149 ObjCPropertyAttribute::kind_null_resettable) &&
2188 if (!(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic) &&
2189 !(AttributesAsWritten & ObjCPropertyAttribute::kind_nonatomic)) {
2215 if ((Attributes & ObjCPropertyAttribute::kind_nonatomic) ||
2216 !(Attributes & ObjCPropertyAttribute::kind_readwrite))
2237 !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {
2481 ObjCPropertyAttribute::kind_null_resettable) {
2560 ObjCPropertyAttribute::kind_null_resettable) {
2648 if ((Attributes & ObjCPropertyAttribute::kind_readonly) &&
2649 (Attributes & ObjCPropertyAttribute::kind_readwrite))
2658 (ObjCPropertyAttribute::kind_weak | ObjCPropertyAttribute::kind_copy |
2659 ObjCPropertyAttribute::kind_retain |
2660 ObjCPropertyAttribute::kind_strong)) &&
2664 << (Attributes & ObjCPropertyAttribute::kind_weak
2666 : Attributes & ObjCPropertyAttribute::kind_copy
2670 ~(ObjCPropertyAttribute::kind_weak | ObjCPropertyAttribute::kind_copy |
2671 ObjCPropertyAttribute::kind_retain |
2672 ObjCPropertyAttribute::kind_strong);
2677 if ((Attributes & ObjCPropertyAttribute::kind_assign) &&
2678 !(Attributes & ObjCPropertyAttribute::kind_unsafe_unretained) &&
2685 if (Attributes & ObjCPropertyAttribute::kind_assign) {
2686 if (Attributes & ObjCPropertyAttribute::kind_copy) {
2689 Attributes &= ~ObjCPropertyAttribute::kind_copy;
2691 if (Attributes & ObjCPropertyAttribute::kind_retain) {
2694 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2696 if (Attributes & ObjCPropertyAttribute::kind_strong) {
2699 Attributes &= ~ObjCPropertyAttribute::kind_strong;
2702 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2705 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2709 } else if (Attributes & ObjCPropertyAttribute::kind_unsafe_unretained) {
2710 if (Attributes & ObjCPropertyAttribute::kind_copy) {
2713 Attributes &= ~ObjCPropertyAttribute::kind_copy;
2715 if (Attributes & ObjCPropertyAttribute::kind_retain) {
2718 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2720 if (Attributes & ObjCPropertyAttribute::kind_strong) {
2723 Attributes &= ~ObjCPropertyAttribute::kind_strong;
2726 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2729 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2731 } else if (Attributes & ObjCPropertyAttribute::kind_copy) {
2732 if (Attributes & ObjCPropertyAttribute::kind_retain) {
2735 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2737 if (Attributes & ObjCPropertyAttribute::kind_strong) {
2740 Attributes &= ~ObjCPropertyAttribute::kind_strong;
2742 if (Attributes & ObjCPropertyAttribute::kind_weak) {
2745 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2747 } else if ((Attributes & ObjCPropertyAttribute::kind_retain) &&
2748 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2751 Attributes &= ~ObjCPropertyAttribute::kind_retain;
2752 } else if ((Attributes & ObjCPropertyAttribute::kind_strong) &&
2753 (Attributes & ObjCPropertyAttribute::kind_weak)) {
2756 Attributes &= ~ObjCPropertyAttribute::kind_weak;
2759 if (Attributes & ObjCPropertyAttribute::kind_weak) {
2768 if ((Attributes & ObjCPropertyAttribute::kind_atomic) &&
2769 (Attributes & ObjCPropertyAttribute::kind_nonatomic)) {
2772 Attributes &= ~ObjCPropertyAttribute::kind_atomic;
2778 if (Attributes & ObjCPropertyAttribute::kind_readonly) {
2783 PropertyDecl->setPropertyAttributes(ObjCPropertyAttribute::kind_strong);
2810 if (!(Attributes & ObjCPropertyAttribute::kind_copy) &&
2811 !(Attributes & ObjCPropertyAttribute::kind_readonly) &&
2815 else if ((Attributes & ObjCPropertyAttribute::kind_retain) &&
2816 !(Attributes & ObjCPropertyAttribute::kind_readonly) &&
2817 !(Attributes & ObjCPropertyAttribute::kind_strong) &&
2821 if ((Attributes & ObjCPropertyAttribute::kind_readonly) &&
2822 (Attributes & ObjCPropertyAttribute::kind_setter))