Debian Codegraph @

clang/test/Rewriter/rewrite-anonymous-union.m

raw
1 // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
2
3 typedef unsigned int uint32_t;
4
5 typedef struct {
6 union {
7 uint32_t daysOfWeek;
8 uint32_t dayOfMonth;
9 };
10 uint32_t nthOccurrence;
11 } OSPatternSpecificData;
12
13 @interface NSNumber
14 + (NSNumber *)numberWithLong:(long)value;
15 @end
16
17 @interface OSRecurrence {
18 OSPatternSpecificData _pts;
19 }
20 - (void)_setTypeSpecificInfoOnRecord;
21 @end
22
23 @implementation OSRecurrence
24 - (void)_setTypeSpecificInfoOnRecord
25 {
26 [NSNumber numberWithLong:(_pts.dayOfMonth >= 31 ? -1 : _pts.dayOfMonth)];
27 }
28 @end
29