[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Rewriter / rewrite-anonymous-union.m
blobbc35fd02e9fc9f5130b87b882a942e0a89cae163
1 // RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5  -o - %s
2 // rdar://6948022
4 typedef unsigned int uint32_t;
6 typedef struct {
7     union {
8         uint32_t daysOfWeek;
9         uint32_t dayOfMonth;
10     };
11     uint32_t nthOccurrence;
12 } OSPatternSpecificData;
14 @interface NSNumber
15 + (NSNumber *)numberWithLong:(long)value;
16 @end
18 @interface OSRecurrence  {
19     OSPatternSpecificData _pts;
21 - (void)_setTypeSpecificInfoOnRecord;
22 @end
24 @implementation OSRecurrence
25 - (void)_setTypeSpecificInfoOnRecord
27     [NSNumber numberWithLong:(_pts.dayOfMonth >= 31 ? -1 : _pts.dayOfMonth)];
29 @end