blob: bc35fd02e9fc9f5130b87b882a942e0a89cae163 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
Fariborz Jahanian97fd83a2010-01-11 21:17:32 +00002// rdar://6948022
3
4typedef unsigned int uint32_t;
5
6typedef 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