John McCall | 260611a | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s |
Fariborz Jahanian | 97fd83a | 2010-01-11 21:17:32 +0000 | [diff] [blame] | 2 | // rdar://6948022 |
| 3 | |
| 4 | typedef unsigned int uint32_t; |
| 5 | |
| 6 | typedef struct { |
| 7 | union { |
| 8 | uint32_t daysOfWeek; |
| 9 | uint32_t dayOfMonth; |
| 10 | }; |
| 11 | uint32_t nthOccurrence; |
| 12 | } OSPatternSpecificData; |
| 13 | |
| 14 | @interface NSNumber |
| 15 | + (NSNumber *)numberWithLong:(long)value; |
| 16 | @end |
| 17 | |
| 18 | @interface OSRecurrence { |
| 19 | OSPatternSpecificData _pts; |
| 20 | } |
| 21 | - (void)_setTypeSpecificInfoOnRecord; |
| 22 | @end |
| 23 | |
| 24 | @implementation OSRecurrence |
| 25 | - (void)_setTypeSpecificInfoOnRecord |
| 26 | { |
| 27 | [NSNumber numberWithLong:(_pts.dayOfMonth >= 31 ? -1 : _pts.dayOfMonth)]; |
| 28 | } |
| 29 | @end |
| 30 | |