1 | // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s |
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 | |
31 | |