Lines Matching defs: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.
151 unsigned Attributes = ODS.getPropertyAttributes();
154 Attributes |= deduceWeakPropertyFromType(*this, T);
156 bool isReadWrite = ((Attributes & ObjCDeclSpec::DQ_PR_readwrite) ||
158 !(Attributes & ObjCDeclSpec::DQ_PR_readonly));
161 bool isAssign = ((Attributes & ObjCDeclSpec::DQ_PR_assign) ||
163 !(Attributes & ObjCDeclSpec::DQ_PR_retain) &&
164 !(Attributes & ObjCDeclSpec::DQ_PR_strong) &&
165 !(Attributes & ObjCDeclSpec::DQ_PR_copy) &&
166 !(Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained) &&
167 !(Attributes & ObjCDeclSpec::DQ_PR_weak)));
177 Attributes,
189 Attributes, ODS.getPropertyAttributes(),
195 // Validate the attributes on the @property.
196 CheckObjCPropertyAttributes(Res, AtLoc, Attributes,
254 makePropertyAttributesAsWritten(unsigned Attributes) {
256 if (Attributes & ObjCDeclSpec::DQ_PR_readonly)
258 if (Attributes & ObjCDeclSpec::DQ_PR_readwrite)
260 if (Attributes & ObjCDeclSpec::DQ_PR_getter)
262 if (Attributes & ObjCDeclSpec::DQ_PR_setter)
264 if (Attributes & ObjCDeclSpec::DQ_PR_assign)
266 if (Attributes & ObjCDeclSpec::DQ_PR_retain)
268 if (Attributes & ObjCDeclSpec::DQ_PR_strong)
270 if (Attributes & ObjCDeclSpec::DQ_PR_weak)
272 if (Attributes & ObjCDeclSpec::DQ_PR_copy)
274 if (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained)
276 if (Attributes & ObjCDeclSpec::DQ_PR_nonatomic)
278 if (Attributes & ObjCDeclSpec::DQ_PR_atomic)
332 const unsigned Attributes,
367 if (Attributes & ObjCDeclSpec::DQ_PR_readonly)
369 if (Attributes & ObjCDeclSpec::DQ_PR_readwrite)
371 if (Attributes & ObjCDeclSpec::DQ_PR_nonatomic)
373 if (Attributes & ObjCDeclSpec::DQ_PR_atomic)
399 Attributes,AttributesAsWritten, T, MethodImplKind, DC);
438 unsigned ClassExtensionMemoryModel = getOwnershipRule(Attributes);
470 if (Attributes & ObjCDeclSpec::DQ_PR_retain)
472 if (Attributes & ObjCDeclSpec::DQ_PR_strong)
474 if (Attributes & ObjCDeclSpec::DQ_PR_copy)
483 (Attributes & ObjCDeclSpec::DQ_PR_readwrite) &&
511 const unsigned Attributes,
522 isAssign && !(Attributes & ObjCDeclSpec::DQ_PR_assign))
574 if (Attributes & ObjCDeclSpec::DQ_PR_readonly)
577 if (Attributes & ObjCDeclSpec::DQ_PR_getter)
580 if (Attributes & ObjCDeclSpec::DQ_PR_setter)
586 if (Attributes & ObjCDeclSpec::DQ_PR_retain)
589 if (Attributes & ObjCDeclSpec::DQ_PR_strong)
592 if (Attributes & ObjCDeclSpec::DQ_PR_weak)
595 if (Attributes & ObjCDeclSpec::DQ_PR_copy)
598 if (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained)
604 // In the semantic attributes, one of nonatomic or atomic is always set.
605 if (Attributes & ObjCDeclSpec::DQ_PR_nonatomic)
611 if (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained)
632 // The lifetime implied by the property's attributes.
698 /// This routine evaludates life-time attributes for a 'readonly'
779 /// attribute declared in primary class and attributes overridden in any of its
784 unsigned Attributes = property->getPropertyAttributesAsWritten();
785 bool warn = (Attributes & ObjCDeclSpec::DQ_PR_readonly);
803 // can override readonly->readwrite and 'setter' attributes originally
806 if (Attributes & ObjCDeclSpec::DQ_PR_readonly) {
827 if (Attributes & setterAttrs) {
829 (Attributes & ObjCDeclSpec::DQ_PR_assign) ?
831 (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained) ?
833 (Attributes & ObjCDeclSpec::DQ_PR_copy) ?
835 (Attributes & ObjCDeclSpec::DQ_PR_retain) ?
1040 // property attributes.
1351 /// attributes and types and warns on a variety of inconsistencies.
1756 unsigned Attributes = Property->getPropertyAttributes();
1779 if ((Attributes & ObjCPropertyDecl::OBJC_PR_nonatomic) ||
1780 !(Attributes & ObjCPropertyDecl::OBJC_PR_readwrite))
1861 /// AddPropertyAttrs - Propagates attributes from a property to the
1865 // Should we just clone all attributes over?
2039 unsigned &Attributes,
2049 (Attributes & ObjCDeclSpec::DQ_PR_readonly) &&
2059 if ((Attributes & rel) == 0)
2066 // extensions making other attributes, which make no sense, to make sense.
2067 if ((Attributes & ObjCDeclSpec::DQ_PR_readonly) &&
2068 (Attributes & ObjCDeclSpec::DQ_PR_readwrite))
2073 else if ((Attributes & ObjCDeclSpec::DQ_PR_readonly) &&
2074 (Attributes & (ObjCDeclSpec::DQ_PR_readwrite |
2080 const char * which = (Attributes & ObjCDeclSpec::DQ_PR_readwrite) ?
2082 (Attributes & ObjCDeclSpec::DQ_PR_assign) ?
2084 (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained) ?
2086 (Attributes & ObjCDeclSpec::DQ_PR_copy) ?
2089 Diag(Loc, (Attributes & (ObjCDeclSpec::DQ_PR_readwrite)) ?
2096 if ((Attributes & (ObjCDeclSpec::DQ_PR_weak | ObjCDeclSpec::DQ_PR_copy |
2101 << (Attributes & ObjCDeclSpec::DQ_PR_weak ? "weak" :
2102 Attributes & ObjCDeclSpec::DQ_PR_copy ? "copy" : "retain (or strong)");
2103 Attributes &= ~(ObjCDeclSpec::DQ_PR_weak | ObjCDeclSpec::DQ_PR_copy |
2109 if (Attributes & ObjCDeclSpec::DQ_PR_assign) {
2110 if (Attributes & ObjCDeclSpec::DQ_PR_copy) {
2113 Attributes &= ~ObjCDeclSpec::DQ_PR_copy;
2115 if (Attributes & ObjCDeclSpec::DQ_PR_retain) {
2118 Attributes &= ~ObjCDeclSpec::DQ_PR_retain;
2120 if (Attributes & ObjCDeclSpec::DQ_PR_strong) {
2123 Attributes &= ~ObjCDeclSpec::DQ_PR_strong;
2126 (Attributes & ObjCDeclSpec::DQ_PR_weak)) {
2129 Attributes &= ~ObjCDeclSpec::DQ_PR_weak;
2133 } else if (Attributes & ObjCDeclSpec::DQ_PR_unsafe_unretained) {
2134 if (Attributes & ObjCDeclSpec::DQ_PR_copy) {
2137 Attributes &= ~ObjCDeclSpec::DQ_PR_copy;
2139 if (Attributes & ObjCDeclSpec::DQ_PR_retain) {
2142 Attributes &= ~ObjCDeclSpec::DQ_PR_retain;
2144 if (Attributes & ObjCDeclSpec::DQ_PR_strong) {
2147 Attributes &= ~ObjCDeclSpec::DQ_PR_strong;
2150 (Attributes & ObjCDeclSpec::DQ_PR_weak)) {
2153 Attributes &= ~ObjCDeclSpec::DQ_PR_weak;
2155 } else if (Attributes & ObjCDeclSpec::DQ_PR_copy) {
2156 if (Attributes & ObjCDeclSpec::DQ_PR_retain) {
2159 Attributes &= ~ObjCDeclSpec::DQ_PR_retain;
2161 if (Attributes & ObjCDeclSpec::DQ_PR_strong) {
2164 Attributes &= ~ObjCDeclSpec::DQ_PR_strong;
2166 if (Attributes & ObjCDeclSpec::DQ_PR_weak) {
2169 Attributes &= ~ObjCDeclSpec::DQ_PR_weak;
2172 else if ((Attributes & ObjCDeclSpec::DQ_PR_retain) &&
2173 (Attributes & ObjCDeclSpec::DQ_PR_weak)) {
2176 Attributes &= ~ObjCDeclSpec::DQ_PR_retain;
2178 else if ((Attributes & ObjCDeclSpec::DQ_PR_strong) &&
2179 (Attributes & ObjCDeclSpec::DQ_PR_weak)) {
2182 Attributes &= ~ObjCDeclSpec::DQ_PR_weak;
2185 if ((Attributes & ObjCDeclSpec::DQ_PR_atomic) &&
2186 (Attributes & ObjCDeclSpec::DQ_PR_nonatomic)) {
2189 Attributes &= ~ObjCDeclSpec::DQ_PR_atomic;
2194 if (!(Attributes & (ObjCDeclSpec::DQ_PR_assign | ObjCDeclSpec::DQ_PR_copy |
2203 else if (!(Attributes & ObjCDeclSpec::DQ_PR_readonly)) {
2230 if (!(Attributes & ObjCDeclSpec::DQ_PR_copy)
2231 &&!(Attributes & ObjCDeclSpec::DQ_PR_readonly)
2235 else if ((Attributes & ObjCDeclSpec::DQ_PR_retain) &&
2236 !(Attributes & ObjCDeclSpec::DQ_PR_readonly) &&
2237 !(Attributes & ObjCDeclSpec::DQ_PR_strong) &&
2241 if ((Attributes & ObjCDeclSpec::DQ_PR_readonly) &&
2242 (Attributes & ObjCDeclSpec::DQ_PR_setter))