minix/external/bsd/llvm/dist/clang/test/Rewriter/rewrite-anonymous-union.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

30 lines
603 B
Objective-C

// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
// rdar://6948022
typedef unsigned int uint32_t;
typedef struct {
union {
uint32_t daysOfWeek;
uint32_t dayOfMonth;
};
uint32_t nthOccurrence;
} OSPatternSpecificData;
@interface NSNumber
+ (NSNumber *)numberWithLong:(long)value;
@end
@interface OSRecurrence {
OSPatternSpecificData _pts;
}
- (void)_setTypeSpecificInfoOnRecord;
@end
@implementation OSRecurrence
- (void)_setTypeSpecificInfoOnRecord
{
[NSNumber numberWithLong:(_pts.dayOfMonth >= 31 ? -1 : _pts.dayOfMonth)];
}
@end