blob: 0f44a2248a23deae8271b77f006971333a7b2fb2 [file] [log] [blame]
Fariborz Jahanian3911a1a2010-09-25 01:08:05 +00001// RUN: %clang_cc1 -emit-llvm -o - %s
2
3struct CGRect {
4 char* origin;
5 unsigned size;
6};
7typedef struct CGRect CGRect;
8
9extern "C" bool CGRectIsEmpty(CGRect);
10
11@interface Foo {
12 CGRect out;
13}
14@property CGRect bounds;
15- (CGRect) out;
16@end
17
18
19@implementation Foo
20
21- (void)bar {
22 CGRect dataRect;
23 CGRect virtualBounds;
24
25 dataRect = CGRectIsEmpty(virtualBounds) ? self.bounds : virtualBounds;
26 dataRect = CGRectIsEmpty(virtualBounds) ? [self bounds] : virtualBounds;
27 dataRect = CGRectIsEmpty(virtualBounds) ? virtualBounds : self.bounds;
28
29 dataRect = CGRectIsEmpty(virtualBounds) ? self.out : virtualBounds;
30 dataRect = CGRectIsEmpty(virtualBounds) ? [self out] : virtualBounds;
31 dataRect = CGRectIsEmpty(virtualBounds) ? virtualBounds : self.out;
32}
33
34@dynamic bounds;
35- (CGRect) out { return out; }
36@end